diff --git a/bobtherobber2/34d6aae0257d4e4c8068cbdfc11a8758-512x512.jpeg b/bobtherobber2/icon.png similarity index 100% rename from bobtherobber2/34d6aae0257d4e4c8068cbdfc11a8758-512x512.jpeg rename to bobtherobber2/icon.png diff --git a/boxingphysics2/icon.png b/boxingphysics2/icon.png new file mode 100644 index 00000000..0a391857 Binary files /dev/null and b/boxingphysics2/icon.png differ diff --git a/burgerandfrights/icon.png b/burgerandfrights/icon.png new file mode 100644 index 00000000..69e4d4b3 Binary files /dev/null and b/burgerandfrights/icon.png differ diff --git a/flippyfish/icon.png b/flippyfish/icon.png new file mode 100644 index 00000000..2f350d86 Binary files /dev/null and b/flippyfish/icon.png differ diff --git a/games.json b/games.json index 1f25dcb1..9c293306 100644 --- a/games.json +++ b/games.json @@ -964,5 +964,70 @@ "name": "Townscaper", "directory": "townscaper", "image": "icon.png" + }, + { + "name": "Bad Ice Cream", + "directory": "badicecream", + "image": "bad-ice-cream.png" + }, + { + "name": "Bad Ice Cream 2", + "directory": "badicecream2", + "image": "bad-ice-cream-2.png" + }, + { + "name": "Bad Ice Cream 3", + "directory": "badicecream3", + "image": "bad-ice-cream-3.png" + }, + { + "name": "Bob the Robber 2", + "directory": "bobtherobber2", + "image": "icon.png" + }, + { + "name": "Boxing Physics 2", + "directory": "boxingphysics2", + "image": "icon.png" + }, + { + "name": "Burger and Frights", + "directory": "burgerandfrights", + "image": "icon.png" + }, + { + "name": "Flippy Fish", + "directory": "flippyfish", + "image": "icon.png" + }, + { + "name": "Knife Hit", + "directory": "knifehit", + "image": "icon.png" + }, + { + "name": "Lazy Jump 3D", + "directory": "lazyjump3d", + "image": "icon.png" + }, + { + "name": "Moto X3M Spooky", + "directory": "motox3m-spooky", + "image": "icon.png" + }, + { + "name": "Rooftop Snipers 2", + "directory": "rooftopsnipers2", + "image": "icon.png" + }, + { + "name": "Skibidi Toilet Attack", + "directory": "skibiditoiletattack", + "image": "logo.png" + }, + { + "name": "Tiny Fishing", + "directory": "tinyfishing", + "image": "thumb.png" } ] diff --git a/knifehit/icon.png b/knifehit/icon.png new file mode 100644 index 00000000..050ffd83 Binary files /dev/null and b/knifehit/icon.png differ diff --git a/lazyjump3d/icon.png b/lazyjump3d/icon.png new file mode 100644 index 00000000..c503c342 Binary files /dev/null and b/lazyjump3d/icon.png differ diff --git a/motox3m-spooky/icon.png b/motox3m-spooky/icon.png new file mode 100644 index 00000000..002371b3 Binary files /dev/null and b/motox3m-spooky/icon.png differ diff --git a/motox3mspooky/assets/atlases/x1/cars_game.json b/motox3mspooky/assets/atlases/x1/cars_game.json deleted file mode 100644 index 38c0b12f..00000000 --- a/motox3mspooky/assets/atlases/x1/cars_game.json +++ /dev/null @@ -1,323 +0,0 @@ -{"frames": { - -"Car1FrameExploded0000": -{ - "frame": {"x":2,"y":2,"w":115,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":115,"h":68}, - "sourceSize": {"w":115,"h":68} -}, -"Car3FrameExploded0000": -{ - "frame": {"x":114,"y":122,"w":109,"h":54}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":109,"h":54}, - "sourceSize": {"w":109,"h":54} -}, -"Car5FrameExploded0000": -{ - "frame": {"x":119,"y":2,"w":115,"h":61}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":115,"h":61}, - "sourceSize": {"w":115,"h":61} -}, -"RocketAnim0000": -{ - "frame": {"x":111,"y":178,"w":128,"h":29}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":29}, - "sourceSize": {"w":128,"h":29} -}, -"RocketAnim0001": -{ - "frame": {"x":2,"y":240,"w":87,"h":29}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":41,"y":0,"w":128,"h":29}, - "sourceSize": {"w":128,"h":29} -}, -"RocketAnim0002": -{ - "frame": {"x":127,"y":271,"w":46,"h":29}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":82,"y":0,"w":128,"h":29}, - "sourceSize": {"w":128,"h":29} -}, -"RocketAnim0003": -{ - "frame": {"x":91,"y":240,"w":83,"h":29}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":45,"y":0,"w":128,"h":29}, - "sourceSize": {"w":128,"h":29} -}, -"RocketAnim0004": -{ - "frame": {"x":128,"y":209,"w":120,"h":29}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":8,"y":0,"w":128,"h":29}, - "sourceSize": {"w":128,"h":29} -}, -"RocketAnim0005": -{ - "frame": {"x":2,"y":209,"w":124,"h":29}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":4,"y":0,"w":128,"h":29}, - "sourceSize": {"w":128,"h":29} -}, -"Wheel_1_00000": -{ - "frame": {"x":176,"y":240,"w":42,"h":42}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":42,"h":42}, - "sourceSize": {"w":42,"h":42} -}, -"Wheel_3_00000": -{ - "frame": {"x":44,"y":271,"w":38,"h":38}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":38,"h":38}, - "sourceSize": {"w":38,"h":38} -}, -"Wheel_5_00000": -{ - "frame": {"x":2,"y":271,"w":40,"h":40}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":40,"h":40}, - "sourceSize": {"w":40,"h":40} -}, -"bike_1_base0000": -{ - "frame": {"x":2,"y":72,"w":110,"h":54}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":110,"h":54}, - "sourceSize": {"w":110,"h":54} -}, -"bike_3_base0000": -{ - "frame": {"x":119,"y":65,"w":108,"h":55}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":108,"h":55}, - "sourceSize": {"w":108,"h":55} -}, -"bike_5_base0000": -{ - "frame": {"x":2,"y":128,"w":107,"h":52}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":107,"h":52}, - "sourceSize": {"w":107,"h":52} -}, -"driver_arm10000": -{ - "frame": {"x":84,"y":182,"w":20,"h":13}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":20,"h":13}, - "sourceSize": {"w":20,"h":13} -}, -"driver_arm30000": -{ - "frame": {"x":23,"y":313,"w":19,"h":10}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":19,"h":10}, - "sourceSize": {"w":19,"h":10} -}, -"driver_arm50000": -{ - "frame": {"x":44,"y":311,"w":21,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":21,"h":12}, - "sourceSize": {"w":21,"h":12} -}, -"driver_corpse10000": -{ - "frame": {"x":236,"y":2,"w":18,"h":33}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":18,"h":33}, - "sourceSize": {"w":18,"h":33} -}, -"driver_corpse30000": -{ - "frame": {"x":229,"y":65,"w":21,"h":36}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":21,"h":36}, - "sourceSize": {"w":21,"h":36} -}, -"driver_corpse50000": -{ - "frame": {"x":225,"y":122,"w":26,"h":37}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":26,"h":37}, - "sourceSize": {"w":26,"h":37} -}, -"driver_forearm10000": -{ - "frame": {"x":84,"y":197,"w":22,"h":10}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":22,"h":10}, - "sourceSize": {"w":22,"h":10} -}, -"driver_forearm30000": -{ - "frame": {"x":225,"y":161,"w":23,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":23,"h":12}, - "sourceSize": {"w":23,"h":12} -}, -"driver_forearm50000": -{ - "frame": {"x":168,"y":320,"w":20,"h":8}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":20,"h":8}, - "sourceSize": {"w":20,"h":8} -}, -"driver_head10000": -{ - "frame": {"x":220,"y":274,"w":34,"h":27}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":34,"h":27}, - "sourceSize": {"w":34,"h":27} -}, -"driver_head30000": -{ - "frame": {"x":84,"y":271,"w":41,"h":33}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":41,"h":33}, - "sourceSize": {"w":41,"h":33} -}, -"driver_head50000": -{ - "frame": {"x":175,"y":284,"w":37,"h":34}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":37,"h":34}, - "sourceSize": {"w":37,"h":34} -}, -"driver_hip10000": -{ - "frame": {"x":2,"y":313,"w":19,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":19,"h":12}, - "sourceSize": {"w":19,"h":12} -}, -"driver_hip30000": -{ - "frame": {"x":220,"y":240,"w":31,"h":32}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":31,"h":32}, - "sourceSize": {"w":31,"h":32} -}, -"driver_hip50000": -{ - "frame": {"x":241,"y":175,"w":13,"h":11}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":13,"h":11}, - "sourceSize": {"w":13,"h":11} -}, -"driver_shin10000": -{ - "frame": {"x":127,"y":302,"w":20,"h":34}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":20,"h":34}, - "sourceSize": {"w":20,"h":34} -}, -"driver_shin30000": -{ - "frame": {"x":236,"y":37,"w":16,"h":21}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":16,"h":21}, - "sourceSize": {"w":16,"h":21} -}, -"driver_shin50000": -{ - "frame": {"x":149,"y":302,"w":17,"h":32}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":17,"h":32}, - "sourceSize": {"w":17,"h":32} -}, -"suspend_back10000": -{ - "frame": {"x":2,"y":182,"w":38,"h":17}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":38,"h":17}, - "sourceSize": {"w":38,"h":17} -}, -"suspend_back30000": -{ - "frame": {"x":214,"y":303,"w":33,"h":16}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":33,"h":16}, - "sourceSize": {"w":33,"h":16} -}, -"suspend_back50000": -{ - "frame": {"x":42,"y":182,"w":40,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":40,"h":14}, - "sourceSize": {"w":40,"h":14} -}, -"suspend_front10000": -{ - "frame": {"x":229,"y":103,"w":25,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":25,"h":14}, - "sourceSize": {"w":25,"h":14} -}, -"suspend_front30000": -{ - "frame": {"x":42,"y":198,"w":28,"h":6}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":28,"h":6}, - "sourceSize": {"w":28,"h":6} -}, -"suspend_front50000": -{ - "frame": {"x":84,"y":306,"w":39,"h":13}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":39,"h":13}, - "sourceSize": {"w":39,"h":13} -}}, -"meta": { - "app": "Adobe Flash Professional", - "version": "15.0.1.179", - "image": "cars_game.png", - "format": "RGBA8888", - "size": {"w":256,"h":512}, - "scale": "1" -} -} diff --git a/motox3mspooky/assets/atlases/x1/cars_game.png b/motox3mspooky/assets/atlases/x1/cars_game.png deleted file mode 100644 index 8fdc6297..00000000 Binary files a/motox3mspooky/assets/atlases/x1/cars_game.png and /dev/null differ diff --git a/motox3mspooky/assets/atlases/x1/garage.json b/motox3mspooky/assets/atlases/x1/garage.json deleted file mode 100644 index 81341c8d..00000000 --- a/motox3mspooky/assets/atlases/x1/garage.json +++ /dev/null @@ -1,419 +0,0 @@ -{"frames": { - -"0bg_garage0000": -{ - "frame": {"x":2,"y":2,"w":720,"h":480}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":720,"h":480}, - "sourceSize": {"w":720,"h":480} -}, -"0bg_garage_l0000": -{ - "frame": {"x":893,"y":980,"w":30,"h":480}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":30,"h":480}, - "sourceSize": {"w":30,"h":480} -}, -"0bg_garage_r0000": -{ - "frame": {"x":925,"y":980,"w":30,"h":480}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":30,"h":480}, - "sourceSize": {"w":30,"h":480} -}, -"0logo0000": -{ - "frame": {"x":724,"y":2,"w":271,"h":181}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":271,"h":181}, - "sourceSize": {"w":271,"h":181} -}, -"0popup_bg0000": -{ - "frame": {"x":2,"y":484,"w":680,"h":436}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":680,"h":436}, - "sourceSize": {"w":680,"h":436} -}, -"InGameMusicButton0000": -{ - "frame": {"x":468,"y":1212,"w":53,"h":44}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":53,"h":44}, - "sourceSize": {"w":53,"h":44} -}, -"InGameMusicButton0001": -{ - "frame": {"x":991,"y":482,"w":27,"h":33}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":8,"w":53,"h":44}, - "sourceSize": {"w":53,"h":44} -}, -"InGameMusicButton0002": -{ - "frame": {"x":957,"y":1216,"w":53,"h":33}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":8,"w":53,"h":44}, - "sourceSize": {"w":53,"h":44} -}, -"InGamePauseButton0000": -{ - "frame": {"x":610,"y":1223,"w":33,"h":49}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":33,"h":49}, - "sourceSize": {"w":33,"h":49} -}, -"LeveMapItemLocked0000": -{ - "frame": {"x":957,"y":980,"w":63,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":63,"h":79}, - "sourceSize": {"w":63,"h":79} -}, -"LeveMapItemLocked0001": -{ - "frame": {"x":548,"y":1208,"w":60,"h":46}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":2,"y":22,"w":63,"h":79}, - "sourceSize": {"w":63,"h":79} -}, -"LeveMapItemLocked0002": -{ - "frame": {"x":2,"y":2,"w":0,"h":0}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":31,"y":39,"w":63,"h":79}, - "sourceSize": {"w":63,"h":79} -}, -"LeveMapItemLocked0003": -{ - "frame": {"x":997,"y":2,"w":25,"h":26}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":2,"w":63,"h":79}, - "sourceSize": {"w":63,"h":79} -}, -"LeveMapItemLocked0004": -{ - "frame": {"x":779,"y":1225,"w":42,"h":28}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":0,"w":63,"h":79}, - "sourceSize": {"w":63,"h":79} -}, -"LeveMapItemLocked0005": -{ - "frame": {"x":2,"y":1218,"w":61,"h":28}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":0,"w":63,"h":79}, - "sourceSize": {"w":63,"h":79} -}, -"apple_btn0000": -{ - "frame": {"x":135,"y":1104,"w":180,"h":60}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":180,"h":60}, - "sourceSize": {"w":180,"h":60} -}, -"arrow_btn0000": -{ - "frame": {"x":957,"y":1061,"w":54,"h":86}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":54,"h":86}, - "sourceSize": {"w":54,"h":86} -}, -"arrow_btn0001": -{ - "frame": {"x":633,"y":1153,"w":42,"h":68}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":6,"y":9,"w":54,"h":86}, - "sourceSize": {"w":54,"h":86} -}, -"arrow_key0000": -{ - "frame": {"x":930,"y":417,"w":78,"h":63}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":78,"h":63}, - "sourceSize": {"w":78,"h":63} -}, -"arrow_key20000": -{ - "frame": {"x":548,"y":1153,"w":83,"h":53}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":83,"h":53}, - "sourceSize": {"w":83,"h":53} -}, -"bg0000": -{ - "frame": {"x":997,"y":30,"w":10,"h":10}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":10,"h":10}, - "sourceSize": {"w":10,"h":10} -}, -"black0000": -{ - "frame": {"x":396,"y":1225,"w":40,"h":40}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":40,"h":40}, - "sourceSize": {"w":40,"h":40} -}, -"branding_l0000": -{ - "frame": {"x":724,"y":185,"w":287,"h":90}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":287,"h":90}, - "sourceSize": {"w":287,"h":90} -}, -"btn_body0000": -{ - "frame": {"x":681,"y":1143,"w":96,"h":96}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":96,"h":96}, - "sourceSize": {"w":96,"h":96} -}, -"btn_body0001": -{ - "frame": {"x":681,"y":1143,"w":96,"h":96}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":96,"h":96}, - "sourceSize": {"w":96,"h":96} -}, -"btn_credits0000": -{ - "frame": {"x":229,"y":1166,"w":62,"h":60}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":62,"h":60}, - "sourceSize": {"w":62,"h":60} -}, -"exit_btn0000": -{ - "frame": {"x":779,"y":1143,"w":92,"h":80}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":92,"h":80}, - "sourceSize": {"w":92,"h":80} -}, -"fb_icon0000": -{ - "frame": {"x":396,"y":1153,"w":70,"h":70}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":70,"h":70}, - "sourceSize": {"w":70,"h":70} -}, -"frame_space0000": -{ - "frame": {"x":2,"y":922,"w":366,"h":88}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":366,"h":88}, - "sourceSize": {"w":366,"h":88} -}, -"google_btn0000": -{ - "frame": {"x":681,"y":1081,"w":203,"h":60}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":203,"h":60}, - "sourceSize": {"w":203,"h":60} -}, -"green_btn_big0000": -{ - "frame": {"x":684,"y":890,"w":330,"h":88}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":330,"h":88}, - "sourceSize": {"w":330,"h":88} -}, -"improved_bg0000": -{ - "frame": {"x":724,"y":277,"w":153,"h":136}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":153,"h":136}, - "sourceSize": {"w":153,"h":136} -}, -"logo_mad0000": -{ - "frame": {"x":684,"y":484,"w":305,"h":404}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":305,"h":404}, - "sourceSize": {"w":305,"h":404} -}, -"moto10000": -{ - "frame": {"x":317,"y":1065,"w":180,"h":86}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":180,"h":86}, - "sourceSize": {"w":180,"h":86} -}, -"moto40000": -{ - "frame": {"x":135,"y":1012,"w":180,"h":90}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":180,"h":90}, - "sourceSize": {"w":180,"h":90} -}, -"moto50000": -{ - "frame": {"x":499,"y":1065,"w":180,"h":86}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":180,"h":86}, - "sourceSize": {"w":180,"h":86} -}, -"next_btn0000": -{ - "frame": {"x":317,"y":1153,"w":77,"h":76}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":77,"h":76}, - "sourceSize": {"w":77,"h":76} -}, -"orange_btn0000": -{ - "frame": {"x":699,"y":980,"w":192,"h":99}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":192,"h":99}, - "sourceSize": {"w":192,"h":99} -}, -"orange_btn_big0000": -{ - "frame": {"x":370,"y":980,"w":327,"h":83}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":327,"h":83}, - "sourceSize": {"w":327,"h":83} -}, -"pause_bg0000": -{ - "frame": {"x":540,"y":922,"w":89,"h":54}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":89,"h":54}, - "sourceSize": {"w":89,"h":54} -}, -"play_btn0000": -{ - "frame": {"x":165,"y":1166,"w":62,"h":65}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":62,"h":65}, - "sourceSize": {"w":62,"h":65} -}, -"restart_btn0000": -{ - "frame": {"x":631,"y":922,"w":45,"h":52}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":45,"h":52}, - "sourceSize": {"w":45,"h":52} -}, -"select_level0000": -{ - "frame": {"x":2,"y":1146,"w":94,"h":70}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":94,"h":70}, - "sourceSize": {"w":94,"h":70} -}, -"shop_btn0000": -{ - "frame": {"x":468,"y":1153,"w":78,"h":57}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":78,"h":57}, - "sourceSize": {"w":78,"h":57} -}, -"star00000": -{ - "frame": {"x":879,"y":277,"w":137,"h":138}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":137,"h":138}, - "sourceSize": {"w":137,"h":138} -}, -"star10000": -{ - "frame": {"x":2,"y":1012,"w":131,"h":132}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":131,"h":132}, - "sourceSize": {"w":131,"h":132} -}, -"timer_bg0000": -{ - "frame": {"x":370,"y":922,"w":168,"h":48}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":168,"h":48}, - "sourceSize": {"w":168,"h":48} -}, -"top_bg0000": -{ - "frame": {"x":724,"y":417,"w":204,"h":61}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":204,"h":61}, - "sourceSize": {"w":204,"h":61} -}, -"tw_icon0000": -{ - "frame": {"x":957,"y":1149,"w":65,"h":65}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":65,"h":65}, - "sourceSize": {"w":65,"h":65} -}, -"vk_icon0000": -{ - "frame": {"x":98,"y":1166,"w":65,"h":65}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":65,"h":65}, - "sourceSize": {"w":65,"h":65} -}, -"w_star0000": -{ - "frame": {"x":317,"y":1012,"w":40,"h":44}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":40,"h":44}, - "sourceSize": {"w":40,"h":44} -}}, -"meta": { - "app": "Adobe Flash Professional", - "version": "15.0.1.179", - "image": "garage.png", - "format": "RGBA8888", - "size": {"w":1024,"h":2048}, - "scale": "1" -} -} diff --git a/motox3mspooky/assets/atlases/x1/garage.png b/motox3mspooky/assets/atlases/x1/garage.png deleted file mode 100644 index 4ad09d0c..00000000 Binary files a/motox3mspooky/assets/atlases/x1/garage.png and /dev/null differ diff --git a/motox3mspooky/assets/atlases/x1/theme0.json b/motox3mspooky/assets/atlases/x1/theme0.json deleted file mode 100644 index 81ae9174..00000000 --- a/motox3mspooky/assets/atlases/x1/theme0.json +++ /dev/null @@ -1,1563 +0,0 @@ -{"frames": { - -"BarrelE0000": -{ - "frame": {"x":372,"y":1796,"w":54,"h":54}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":54,"h":54}, - "sourceSize": {"w":54,"h":54} -}, -"Bg0_00000": -{ - "frame": {"x":276,"y":207,"w":427,"h":170}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":427,"h":170}, - "sourceSize": {"w":427,"h":170} -}, -"Bg2_00000": -{ - "frame": {"x":2,"y":2,"w":800,"h":203}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":800,"h":203}, - "sourceSize": {"w":800,"h":203} -}, -"CarExplode0000": -{ - "frame": {"x":664,"y":421,"w":37,"h":38}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":88,"y":91,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0001": -{ - "frame": {"x":440,"y":895,"w":76,"h":79}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":72,"y":69,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0002": -{ - "frame": {"x":652,"y":981,"w":115,"h":138}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":54,"y":44,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0003": -{ - "frame": {"x":501,"y":1390,"w":144,"h":174}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":41,"y":23,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0004": -{ - "frame": {"x":832,"y":1390,"w":150,"h":179}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":38,"y":22,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0005": -{ - "frame": {"x":370,"y":1192,"w":196,"h":196}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":15,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0006": -{ - "frame": {"x":804,"y":2,"w":196,"h":200}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":15,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0007": -{ - "frame": {"x":792,"y":695,"w":226,"h":226}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0008": -{ - "frame": {"x":792,"y":465,"w":226,"h":228}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0009": -{ - "frame": {"x":652,"y":1171,"w":178,"h":228}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":10,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0010": -{ - "frame": {"x":832,"y":1171,"w":178,"h":217}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":10,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0011": -{ - "frame": {"x":185,"y":1151,"w":183,"h":236}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":13,"y":7,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0012": -{ - "frame": {"x":185,"y":1151,"w":183,"h":236}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":13,"y":7,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0013": -{ - "frame": {"x":2,"y":996,"w":181,"h":242}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":14,"y":5,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0014": -{ - "frame": {"x":2,"y":996,"w":181,"h":242}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":14,"y":5,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0015": -{ - "frame": {"x":776,"y":923,"w":179,"h":246}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":6,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0016": -{ - "frame": {"x":776,"y":923,"w":179,"h":246}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":6,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0017": -{ - "frame": {"x":260,"y":895,"w":178,"h":254}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":3,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0018": -{ - "frame": {"x":260,"y":895,"w":178,"h":254}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":15,"y":3,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0019": -{ - "frame": {"x":2,"y":1240,"w":166,"h":179}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":16,"y":3,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0020": -{ - "frame": {"x":2,"y":1240,"w":166,"h":179}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":16,"y":3,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0021": -{ - "frame": {"x":170,"y":1389,"w":164,"h":170}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":17,"y":2,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0022": -{ - "frame": {"x":170,"y":1389,"w":164,"h":170}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":17,"y":2,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0023": -{ - "frame": {"x":336,"y":1390,"w":163,"h":170}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":17,"y":2,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0024": -{ - "frame": {"x":336,"y":1390,"w":163,"h":170}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":17,"y":2,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0025": -{ - "frame": {"x":647,"y":1401,"w":136,"h":168}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":40,"y":1,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"CarExplode0026": -{ - "frame": {"x":647,"y":1401,"w":136,"h":168}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":40,"y":1,"w":226,"h":257}, - "sourceSize": {"w":226,"h":257} -}, -"Dec12_anim0000": -{ - "frame": {"x":82,"y":1692,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0001": -{ - "frame": {"x":144,"y":1692,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0002": -{ - "frame": {"x":206,"y":1702,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0003": -{ - "frame": {"x":268,"y":1711,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0004": -{ - "frame": {"x":330,"y":1715,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0005": -{ - "frame": {"x":392,"y":1715,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0006": -{ - "frame": {"x":576,"y":1718,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0007": -{ - "frame": {"x":638,"y":1718,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0008": -{ - "frame": {"x":854,"y":1740,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0009": -{ - "frame": {"x":916,"y":1740,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec12_anim0010": -{ - "frame": {"x":454,"y":1745,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec170000": -{ - "frame": {"x":957,"y":1047,"w":60,"h":79}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":60,"h":79}, - "sourceSize": {"w":60,"h":79} -}, -"Dec180000": -{ - "frame": {"x":568,"y":1299,"w":74,"h":86}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":74,"h":86}, - "sourceSize": {"w":74,"h":86} -}, -"Dec190000": -{ - "frame": {"x":296,"y":1604,"w":72,"h":105}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":72,"h":105}, - "sourceSize": {"w":72,"h":105} -}, -"Dec200000": -{ - "frame": {"x":957,"y":923,"w":56,"h":122}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":56,"h":122}, - "sourceSize": {"w":56,"h":122} -}, -"Dec210000": -{ - "frame": {"x":568,"y":1192,"w":75,"h":105}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":75,"h":105}, - "sourceSize": {"w":75,"h":105} -}, -"Dec220000": -{ - "frame": {"x":185,"y":996,"w":70,"h":115}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":70,"h":115}, - "sourceSize": {"w":70,"h":115} -}, -"Dec230000": -{ - "frame": {"x":2,"y":1665,"w":78,"h":80}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":78,"h":80}, - "sourceSize": {"w":78,"h":80} -}, -"Dec240000": -{ - "frame": {"x":212,"y":1604,"w":82,"h":96}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":82,"h":96}, - "sourceSize": {"w":82,"h":96} -}, -"Dec250000": -{ - "frame": {"x":963,"y":361,"w":35,"h":91}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":35,"h":91}, - "sourceSize": {"w":35,"h":91} -}, -"Dec260000": -{ - "frame": {"x":884,"y":1664,"w":96,"h":74}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":96,"h":74}, - "sourceSize": {"w":96,"h":74} -}, -"Dec270000": -{ - "frame": {"x":116,"y":1604,"w":94,"h":86}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":94,"h":86}, - "sourceSize": {"w":94,"h":86} -}, -"Dec280000": -{ - "frame": {"x":706,"y":1674,"w":72,"h":74}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":72,"h":74}, - "sourceSize": {"w":72,"h":74} -}, -"GeyserBase0000": -{ - "frame": {"x":984,"y":1390,"w":25,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":25,"h":128}, - "sourceSize": {"w":25,"h":128} -}, -"GlassCrashed00000": -{ - "frame": {"x":234,"y":1796,"w":136,"h":22}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":136,"h":22}, - "sourceSize": {"w":136,"h":22} -}, -"GlassCrashed0_00000": -{ - "frame": {"x":957,"y":1160,"w":40,"h":6}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":40,"h":6}, - "sourceSize": {"w":40,"h":6} -}, -"GlassCrashed0_10000": -{ - "frame": {"x":428,"y":1826,"w":63,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":63,"h":14}, - "sourceSize": {"w":63,"h":14} -}, -"GlassCrashed0_20000": -{ - "frame": {"x":516,"y":1805,"w":56,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":56,"h":14}, - "sourceSize": {"w":56,"h":14} -}, -"GlassCrashed0_30000": -{ - "frame": {"x":132,"y":1477,"w":34,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":34,"h":14}, - "sourceSize": {"w":34,"h":14} -}, -"GlassCrashed0_40000": -{ - "frame": {"x":732,"y":1159,"w":36,"h":10}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":36,"h":10}, - "sourceSize": {"w":36,"h":10} -}, -"GlassCrashed0_50000": -{ - "frame": {"x":652,"y":1159,"w":78,"h":10}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":78,"h":10}, - "sourceSize": {"w":78,"h":10} -}, -"GlassCrashed10000": -{ - "frame": {"x":796,"y":1821,"w":70,"h":22}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":70,"h":22}, - "sourceSize": {"w":70,"h":22} -}, -"Motor00000": -{ - "frame": {"x":72,"y":1804,"w":47,"h":46}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":47,"h":46}, - "sourceSize": {"w":47,"h":46} -}, -"Motor10000": -{ - "frame": {"x":72,"y":1804,"w":47,"h":46}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":47,"h":46}, - "sourceSize": {"w":47,"h":46} -}, -"Pivot00000": -{ - "frame": {"x":132,"y":1493,"w":16,"h":16}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":16,"h":16}, - "sourceSize": {"w":16,"h":16} -}, -"Plank00000": -{ - "frame": {"x":720,"y":1814,"w":74,"h":21}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":74,"h":21}, - "sourceSize": {"w":74,"h":21} -}, -"PlankBone0000": -{ - "frame": {"x":275,"y":1820,"w":86,"h":18}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":86,"h":18}, - "sourceSize": {"w":86,"h":18} -}, -"Removed00000": -{ - "frame": {"x":1000,"y":361,"w":18,"h":75}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":18,"h":75}, - "sourceSize": {"w":18,"h":75} -}, -"Removed10000": -{ - "frame": {"x":785,"y":1435,"w":18,"h":51}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":18,"h":51}, - "sourceSize": {"w":18,"h":51} -}, -"RoadLine0_40000": -{ - "frame": {"x":370,"y":1151,"w":64,"h":36}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":64,"h":36}, - "sourceSize": {"w":64,"h":36} -}, -"RoadLine0_80000": -{ - "frame": {"x":963,"y":454,"w":20,"h":7}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":20,"h":7}, - "sourceSize": {"w":20,"h":7} -}, -"RoadLine0_Bg0000": -{ - "frame": {"x":785,"y":1401,"w":30,"h":32}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":30,"h":32}, - "sourceSize": {"w":30,"h":32} -}, -"RoadPillar0_00000": -{ - "frame": {"x":868,"y":1821,"w":128,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":12}, - "sourceSize": {"w":128,"h":12} -}, -"RoadTile0_10000": -{ - "frame": {"x":2,"y":1421,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128} -}, -"SafePointAnim0000": -{ - "frame": {"x":664,"y":379,"w":38,"h":40}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":10,"y":10,"w":58,"h":58}, - "sourceSize": {"w":58,"h":58} -}, -"SafePointAnim0001": -{ - "frame": {"x":516,"y":1745,"w":58,"h":58}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":58,"h":58}, - "sourceSize": {"w":58,"h":58} -}, -"Sign10000": -{ - "frame": {"x":500,"y":1669,"w":74,"h":74}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":74,"h":74}, - "sourceSize": {"w":74,"h":74} -}, -"Sign150000": -{ - "frame": {"x":652,"y":1121,"w":112,"h":36}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":112,"h":36}, - "sourceSize": {"w":112,"h":36} -}, -"Sign20000": -{ - "frame": {"x":780,"y":1674,"w":72,"h":72}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":72,"h":72}, - "sourceSize": {"w":72,"h":72} -}, -"Sign210000": -{ - "frame": {"x":884,"y":1571,"w":102,"h":91}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":102,"h":91}, - "sourceSize": {"w":102,"h":91} -}, -"SignPillar0000": -{ - "frame": {"x":1012,"y":1160,"w":10,"h":130}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":10,"h":130}, - "sourceSize": {"w":10,"h":130} -}, -"SpikeBall137E0000": -{ - "frame": {"x":440,"y":981,"w":210,"h":209}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":210,"h":209}, - "sourceSize": {"w":210,"h":209} -}, -"SpikeBall200E0000": -{ - "frame": {"x":2,"y":207,"w":272,"h":271}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":272,"h":271}, - "sourceSize": {"w":272,"h":271} -}, -"SpikeBall52E0000": -{ - "frame": {"x":2,"y":1551,"w":112,"h":112}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":112,"h":112}, - "sourceSize": {"w":112,"h":112} -}, -"Tnt10000": -{ - "frame": {"x":700,"y":1750,"w":58,"h":58}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":58,"h":58}, - "sourceSize": {"w":58,"h":58} -}, -"UnLine00000": -{ - "frame": {"x":121,"y":1804,"w":64,"h":32}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":64,"h":32}, - "sourceSize": {"w":64,"h":32} -}, -"bg0000": -{ - "frame": {"x":776,"y":876,"w":11,"h":11}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":11,"h":11}, - "sourceSize": {"w":11,"h":11} -}, -"bone_joint00000": -{ - "frame": {"x":805,"y":1435,"w":21,"h":23}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":21,"h":23}, - "sourceSize": {"w":21,"h":23} -}, -"bone_joint10000": -{ - "frame": {"x":132,"y":1455,"w":28,"h":20}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":28,"h":20}, - "sourceSize": {"w":28,"h":20} -}, -"bone_l0000": -{ - "frame": {"x":72,"y":1783,"w":160,"h":19}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":160,"h":19}, - "sourceSize": {"w":160,"h":19} -}, -"bone_m0000": -{ - "frame": {"x":534,"y":445,"w":122,"h":18}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":122,"h":18}, - "sourceSize": {"w":122,"h":18} -}, -"bone_s0000": -{ - "frame": {"x":187,"y":1820,"w":86,"h":18}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":86,"h":18}, - "sourceSize": {"w":86,"h":18} -}, -"boost_anim0000": -{ - "frame": {"x":374,"y":1562,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0001": -{ - "frame": {"x":374,"y":1562,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0002": -{ - "frame": {"x":476,"y":1566,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0003": -{ - "frame": {"x":476,"y":1566,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0004": -{ - "frame": {"x":578,"y":1571,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0005": -{ - "frame": {"x":578,"y":1571,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0006": -{ - "frame": {"x":680,"y":1571,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0007": -{ - "frame": {"x":680,"y":1571,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0008": -{ - "frame": {"x":782,"y":1571,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"boost_anim0009": -{ - "frame": {"x":782,"y":1571,"w":100,"h":101}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":100,"h":101}, - "sourceSize": {"w":100,"h":101} -}, -"fence_part0000": -{ - "frame": {"x":963,"y":204,"w":50,"h":155}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":50,"h":155}, - "sourceSize": {"w":50,"h":155} -}, -"fence_pillar0000": -{ - "frame": {"x":1002,"y":2,"w":16,"h":164}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":16,"h":164}, - "sourceSize": {"w":16,"h":164} -}, -"finish0000": -{ - "frame": {"x":780,"y":1748,"w":64,"h":64}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":64,"h":64}, - "sourceSize": {"w":64,"h":64} -}, -"geyser_anim0000": -{ - "frame": {"x":260,"y":480,"w":12,"h":112}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, - "sourceSize": {"w":12,"h":112} -}, -"geyser_anim0001": -{ - "frame": {"x":260,"y":480,"w":12,"h":112}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, - "sourceSize": {"w":12,"h":112} -}, -"geyser_anim0002": -{ - "frame": {"x":776,"y":723,"w":12,"h":112}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, - "sourceSize": {"w":12,"h":112} -}, -"geyser_anim0003": -{ - "frame": {"x":776,"y":723,"w":12,"h":112}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, - "sourceSize": {"w":12,"h":112} -}, -"geyser_anim0004": -{ - "frame": {"x":170,"y":1240,"w":12,"h":112}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, - "sourceSize": {"w":12,"h":112} -}, -"geyser_anim0005": -{ - "frame": {"x":170,"y":1240,"w":12,"h":112}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, - "sourceSize": {"w":12,"h":112} -}, -"glass_explode_anim0000": -{ - "frame": {"x":957,"y":1128,"w":61,"h":30}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":10,"y":5,"w":76,"h":38}, - "sourceSize": {"w":76,"h":38} -}, -"glass_explode_anim0001": -{ - "frame": {"x":957,"y":1128,"w":61,"h":30}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":10,"y":5,"w":76,"h":38}, - "sourceSize": {"w":76,"h":38} -}, -"glass_explode_anim0002": -{ - "frame": {"x":185,"y":1113,"w":68,"h":36}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":0,"w":76,"h":38}, - "sourceSize": {"w":76,"h":38} -}, -"glass_explode_anim0003": -{ - "frame": {"x":185,"y":1113,"w":68,"h":36}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":0,"w":76,"h":38}, - "sourceSize": {"w":76,"h":38} -}, -"glass_explode_anim0004": -{ - "frame": {"x":576,"y":1799,"w":76,"h":38}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, - "sourceSize": {"w":76,"h":38} -}, -"glass_explode_anim0005": -{ - "frame": {"x":576,"y":1799,"w":76,"h":38}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, - "sourceSize": {"w":76,"h":38} -}, -"ground_part_anim0000": -{ - "frame": {"x":1015,"y":222,"w":5,"h":5}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":4,"y":4,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0001": -{ - "frame": {"x":1015,"y":222,"w":5,"h":5}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":4,"y":4,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0002": -{ - "frame": {"x":1015,"y":204,"w":7,"h":7}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":3,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0003": -{ - "frame": {"x":1015,"y":204,"w":7,"h":7}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":3,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0004": -{ - "frame": {"x":776,"y":863,"w":11,"h":11}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0005": -{ - "frame": {"x":776,"y":863,"w":11,"h":11}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0006": -{ - "frame": {"x":518,"y":652,"w":13,"h":13}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0007": -{ - "frame": {"x":518,"y":652,"w":13,"h":13}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0008": -{ - "frame": {"x":776,"y":889,"w":10,"h":10}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":2,"y":2,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0009": -{ - "frame": {"x":776,"y":889,"w":10,"h":10}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":2,"y":2,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0010": -{ - "frame": {"x":776,"y":901,"w":10,"h":10}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":2,"y":2,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0011": -{ - "frame": {"x":776,"y":901,"w":10,"h":10}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":2,"y":2,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0012": -{ - "frame": {"x":518,"y":667,"w":12,"h":12}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0013": -{ - "frame": {"x":518,"y":667,"w":12,"h":12}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0014": -{ - "frame": {"x":518,"y":681,"w":12,"h":12}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0015": -{ - "frame": {"x":518,"y":681,"w":12,"h":12}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0016": -{ - "frame": {"x":260,"y":611,"w":14,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0017": -{ - "frame": {"x":260,"y":611,"w":14,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0018": -{ - "frame": {"x":518,"y":695,"w":12,"h":12}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0019": -{ - "frame": {"x":518,"y":695,"w":12,"h":12}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0020": -{ - "frame": {"x":776,"y":837,"w":12,"h":11}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0021": -{ - "frame": {"x":776,"y":837,"w":12,"h":11}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0022": -{ - "frame": {"x":1012,"y":1292,"w":10,"h":10}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":2,"y":2,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0023": -{ - "frame": {"x":1012,"y":1292,"w":10,"h":10}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":2,"y":2,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0024": -{ - "frame": {"x":260,"y":627,"w":8,"h":8}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":3,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"ground_part_anim0025": -{ - "frame": {"x":260,"y":627,"w":8,"h":8}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":3,"w":14,"h":14}, - "sourceSize": {"w":14,"h":14} -}, -"hell_rider_head0000": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0001": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0002": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0003": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0004": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0005": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0006": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0007": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0008": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0009": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0010": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0011": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0012": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0013": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0014": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0015": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0016": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0017": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0018": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"hell_rider_head0019": -{ - "frame": {"x":2,"y":1747,"w":68,"h":68}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, - "sourceSize": {"w":68,"h":68} -}, -"line0000": -{ - "frame": {"x":132,"y":1421,"w":30,"h":32}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":30,"h":32}, - "sourceSize": {"w":30,"h":32} -}, -"line_alum0000": -{ - "frame": {"x":2,"y":1817,"w":64,"h":14}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":64,"h":14}, - "sourceSize": {"w":64,"h":14} -}, -"line_metal_g0000": -{ - "frame": {"x":576,"y":1674,"w":128,"h":42}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":42}, - "sourceSize": {"w":128,"h":42} -}, -"line_rivet0000": -{ - "frame": {"x":654,"y":1810,"w":64,"h":32}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":64,"h":32}, - "sourceSize": {"w":64,"h":32} -}, -"line_spike0000": -{ - "frame": {"x":534,"y":379,"w":128,"h":64}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":64}, - "sourceSize": {"w":128,"h":64} -}, -"line_stone_shape0000": -{ - "frame": {"x":116,"y":1562,"w":256,"h":40}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":40}, - "sourceSize": {"w":256,"h":40} -}, -"line_wood0000": -{ - "frame": {"x":370,"y":1669,"w":128,"h":44}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":44}, - "sourceSize": {"w":128,"h":44} -}, -"line_wood_g0000": -{ - "frame": {"x":370,"y":1669,"w":128,"h":44}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":44}, - "sourceSize": {"w":128,"h":44} -}, -"particle_boost0000": -{ - "frame": {"x":493,"y":1826,"w":69,"h":9}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":69,"h":9}, - "sourceSize": {"w":69,"h":9} -}, -"smoke_part_anim0000": -{ - "frame": {"x":1015,"y":213,"w":7,"h":7}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":7,"y":6,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0001": -{ - "frame": {"x":776,"y":913,"w":8,"h":8}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":6,"y":6,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0002": -{ - "frame": {"x":985,"y":454,"w":10,"h":9}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":6,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0003": -{ - "frame": {"x":1012,"y":1304,"w":10,"h":10}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":5,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0004": -{ - "frame": {"x":776,"y":850,"w":12,"h":11}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":4,"y":5,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0005": -{ - "frame": {"x":518,"y":709,"w":13,"h":11}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":5,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0006": -{ - "frame": {"x":1002,"y":189,"w":14,"h":13}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":4,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0007": -{ - "frame": {"x":518,"y":637,"w":14,"h":13}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":4,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0008": -{ - "frame": {"x":260,"y":594,"w":14,"h":15}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":3,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0009": -{ - "frame": {"x":150,"y":1493,"w":15,"h":16}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":2,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0010": -{ - "frame": {"x":785,"y":1488,"w":17,"h":17}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":1,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0011": -{ - "frame": {"x":805,"y":1480,"w":17,"h":19}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":0,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0012": -{ - "frame": {"x":1002,"y":168,"w":18,"h":19}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0013": -{ - "frame": {"x":1000,"y":438,"w":18,"h":19}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"smoke_part_anim0014": -{ - "frame": {"x":805,"y":1460,"w":19,"h":18}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":1,"w":19,"h":19}, - "sourceSize": {"w":19,"h":19} -}, -"tile0000": -{ - "frame": {"x":2,"y":480,"w":256,"h":256}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, - "sourceSize": {"w":256,"h":256} -}, -"tile_bg0000": -{ - "frame": {"x":260,"y":637,"w":256,"h":256}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, - "sourceSize": {"w":256,"h":256} -}, -"tile_rivet0000": -{ - "frame": {"x":534,"y":465,"w":256,"h":256}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, - "sourceSize": {"w":256,"h":256} -}, -"tile_rivet_bg0000": -{ - "frame": {"x":276,"y":379,"w":256,"h":256}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, - "sourceSize": {"w":256,"h":256} -}, -"tile_saw0000": -{ - "frame": {"x":705,"y":207,"w":256,"h":256}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, - "sourceSize": {"w":256,"h":256} -}, -"tile_stone0000": -{ - "frame": {"x":518,"y":723,"w":256,"h":256}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, - "sourceSize": {"w":256,"h":256} -}, -"tile_stone_hall0000": -{ - "frame": {"x":2,"y":738,"w":256,"h":256}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, - "sourceSize": {"w":256,"h":256} -}}, -"meta": { - "app": "Adobe Flash Professional", - "version": "15.0.1.179", - "image": "theme0.png", - "format": "RGBA8888", - "size": {"w":1024,"h":2048}, - "scale": "1" -} -} diff --git a/motox3mspooky/assets/atlases/x1/theme0.png b/motox3mspooky/assets/atlases/x1/theme0.png deleted file mode 100644 index 1f367c1f..00000000 Binary files a/motox3mspooky/assets/atlases/x1/theme0.png and /dev/null differ diff --git a/motox3mspooky/assets/css/AllerDisplay.css b/motox3mspooky/assets/css/AllerDisplay.css deleted file mode 100644 index 7dfcce5f..00000000 --- a/motox3mspooky/assets/css/AllerDisplay.css +++ /dev/null @@ -1,9 +0,0 @@ -@font-face { - font-family:"Aller Display"; - src: url("../fonts/AllerDisplay/AllerDisplay.eot?") format("eot"), - url("../fonts/AllerDisplay/AllerDisplay.woff") format("woff"), - url("../fonts/AllerDisplay/AllerDisplay.ttf") format("truetype"), - url("../fonts/AllerDisplay/AllerDisplay.svg#AllerDisplay") format("svg"); - font-weight:normal; - font-style:normal; -} diff --git a/motox3mspooky/assets/css/CfCrackBold.css b/motox3mspooky/assets/css/CfCrackBold.css deleted file mode 100644 index e0f44abc..00000000 --- a/motox3mspooky/assets/css/CfCrackBold.css +++ /dev/null @@ -1,9 +0,0 @@ -@font-face { - font-family:"CfCrackBold"; - src: url("../fonts/CfCrackBold/cfcrackandbold.eot?") format("eot"), - url("../fonts/CfCrackBold/cfcrackandbold.woff") format("woff"), - url("../fonts/CfCrackBold/cfcrackandbold.ttf") format("truetype"), - url("../fonts/CfCrackBold/cfcrackandbold.svg#cfcrackandbold") format("svg"); - font-weight:normal; - font-style:normal; -} diff --git a/motox3mspooky/assets/css/app.css b/motox3mspooky/assets/css/app.css deleted file mode 100644 index 1058bca0..00000000 --- a/motox3mspooky/assets/css/app.css +++ /dev/null @@ -1,84 +0,0 @@ -/*Stylesheet*/ -body, html { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-touch-callout: none; - -webkit-text-size-adjust: none; - -webkit-user-select: none; - margin: 0; - padding: 0; - font-family: Arial, Verdana, sans-serif; - font-size: 12px; - font-weight: normal; - color: #ccc; - background-color: #000000; - overflow: hidden; -} -#orientation { - margin: 0 auto; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-image: url(../images/rotate.png); - background-repeat: no-repeat; - background-position: center; - background-color: rgb(0, 0, 0); - background-size: 25%; - z-index: 999; - display: none; -} -#loader { - width: 100%; - height: 50px; - position: absolute; - text-align: center; - margin-top: 250px; - display: block; -} -#loader, -#loader:after { - border-radius: 50%; - width: 10em; - height: 10em; -} -#loader { - margin: 60px auto; - font-size: 10px; - position: absolute; - z-index: 99; - left: 50%; - top: 50%; - margin-left: -5em; - margin-top: -5em; - text-indent: -9999em; - border-top: 1.1em solid rgba(255, 255, 255, 0.2); - border-right: 1.1em solid rgba(255, 255, 255, 0.2); - border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); - border-left: 1.1em solid #ffffff; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load8 1.1s infinite linear; - animation: load8 1.1s infinite linear; -} -@-webkit-keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} diff --git a/motox3mspooky/assets/css/impact.css b/motox3mspooky/assets/css/impact.css deleted file mode 100644 index db6b5393..00000000 --- a/motox3mspooky/assets/css/impact.css +++ /dev/null @@ -1,9 +0,0 @@ -@font-face { - font-family:"Impact"; - src: url("../fonts/Impact/impact.eot?") format("eot"), - url("../fonts/Impact/impact.woff") format("woff"), - url("../fonts/Impact/impact.ttf") format("truetype"), - url("../fonts/Impact/impact.svg#impact") format("svg"); - font-weight:normal; - font-style:normal; -} diff --git a/motox3mspooky/assets/images/note.tx b/motox3mspooky/assets/images/note.tx deleted file mode 100644 index d6ed9d01..00000000 --- a/motox3mspooky/assets/images/note.tx +++ /dev/null @@ -1,8 +0,0 @@ -Three -k -h -o -dot -github -dot -io \ No newline at end of file diff --git a/motox3mspooky/assets/images/x1/bikes_texture.png b/motox3mspooky/assets/images/x1/bikes_texture.png deleted file mode 100644 index 64129520..00000000 Binary files a/motox3mspooky/assets/images/x1/bikes_texture.png and /dev/null differ diff --git a/motox3mspooky/assets/images/x1/menu_texture.png b/motox3mspooky/assets/images/x1/menu_texture.png deleted file mode 100644 index 843f3f45..00000000 Binary files a/motox3mspooky/assets/images/x1/menu_texture.png and /dev/null differ diff --git a/motox3mspooky/assets/levels/1.json b/motox3mspooky/assets/levels/1.json deleted file mode 100644 index 5fcd854f..00000000 --- a/motox3mspooky/assets/levels/1.json +++ /dev/null @@ -1 +0,0 @@ -{"maxSpeed":700,"maxTorque":600000,"torque":400000,"handlingPct":0,"bodyDensity":1,"weapon":0,"boostValue":0,"bodyMassType":1,"health":0,"wheelFrictionPct":0,"bodyW":96,"wheelRadiusValue":0,"bodyH":24,"engineCount":3,"handlingCount":3,"boostCount":3,"wheelBackDensity":1,"wheelBackFriction":6,"wheelFrontDensity":3,"wheelFrontFriction":5,"wheelsCount":3,"baseHealth":2700,"healthCount":3,"healthValue":900,"wheelBackR":19,"wheelFrontR":19,"wheelBackDx":34,"wheelFrontDx":45,"axisBackY":13,"driverDensity":1,"axisFrontY":13,"wd":0,"axisBackLen":14,"driverW":32,"flipTorque":200000,"axisFrontLen":14,"driverH":32,"maxFlipSpeed":0.2,"damperBackY":12,"boostForce":0,"damperFrontY":12,"damperBackLen":12,"damperFrontLen":12,"driverDy":-16,"skinId":1,"damperBackFreq":5,"maxSpeedPct":2,"damperFrontFreq":5,"torquePct":5,"damperBackDamp":0,"damperFrontDamp":0,"driverDx":45,"axisBackAngle":1.5707963267948966,"axisFrontAngle":1.0995574287564276,"wheels":0} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/bike.json b/motox3mspooky/assets/levels/bike.json deleted file mode 100644 index d5bad56b..00000000 --- a/motox3mspooky/assets/levels/bike.json +++ /dev/null @@ -1 +0,0 @@ -{"forearm_joint":{"y":-35.15,"x":0.85},"driver_hip":{"r":0.5235966450694268,"h":9.1,"x":-7.4,"y":-18.5,"w":13.1},"firepoint":{"r":0,"x":-29.8,"y":-8.65},"driver_shin":{"r":0.05238118284855052,"h":31.2,"x":-1.8,"y":-2.7,"w":9.1},"hip_joint":{"y":-15,"x":-3},"arm_joint":{"y":-43.65,"x":-7.75},"shin_joint":{"y":10,"x":-1},"top":[],"corpse_joint":{"y":-23.2,"x":-11},"steer_joint":{"y":-30.5,"x":16.05},"driver_arm":{"r":0.785390440230287,"h":10.1,"x":-4.25,"y":-39.4,"w":16.1},"suspend_back":{"y":12,"x":-6},"driver_corpse":{"r":0.274591615779236,"h":30.2,"x":-8.35,"y":-33.75,"w":14.1},"suspend_front":{},"driver_forearm":{"r":0.19200219668591673,"h":6,"x":8.8,"y":-33.35,"w":19.1},"driver_head":{"r":0.2617948604252963,"h":23.1,"x":-1.8,"y":-59.5,"w":25.2},"suspend_back_w":28.1,"points":[{"y":6.75,"x":-12.45},{"y":-17,"x":-40.1},{"y":-28.5,"x":23.5},{"y":8.85,"x":15.8}],"rect":{"height":133.2,"x":-69,"y":-95,"width":155.2,"top":-95,"size":{"x":155.2,"y":133.2,"length":204.52207704793142},"topLeft":{"x":-69,"y":-95,"length":117.41379816699569},"bottom":38.19999999999999,"bottomRight":{"x":86.19999999999999,"y":38.19999999999999,"length":94.28509956509563},"right":86.19999999999999,"left":-69},"head_joint":{"y":-48.5,"x":-5.6}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/bikes_skeleton.json b/motox3mspooky/assets/levels/bikes_skeleton.json deleted file mode 100644 index 9f14e010..00000000 --- a/motox3mspooky/assets/levels/bikes_skeleton.json +++ /dev/null @@ -1 +0,0 @@ -{"frameRate":24,"name":"bikes_skeleton","version":"5.5","compatibleVersion":"5.5","armature":[{"name":"biker0_anim_btn","bone":[{"inheritScale":false,"name":"wheel back","transform":{"x":-42.9,"y":-17.95}},{"inheritScale":false,"name":"wheel front","transform":{"x":40.2,"y":-17.95}},{"inheritScale":false,"name":"suspend_back","transform":{"x":-15.8,"y":-28.05,"skX":161.71,"skY":161.71}},{"inheritScale":false,"name":"suspend_front","transform":{"x":40.15,"y":-17.5,"skX":63,"skY":63}},{"inheritScale":false,"name":"base","transform":{"x":-9.8,"y":-40.05}},{"inheritScale":false,"name":"driver_corpse","transform":{"x":-18.2,"y":-73.8,"skX":15.73,"skY":15.73}},{"inheritScale":false,"name":"driver_shin","transform":{"x":-11.6,"y":-42.8,"skX":3,"skY":3}},{"inheritScale":false,"name":"driver_hip","transform":{"x":-17.15,"y":-58.55,"skX":30,"skY":30}},{"inheritScale":false,"name":"driver_arm","transform":{"x":-14.15,"y":-79.65,"skX":45,"skY":45}},{"inheritScale":false,"name":"driver_forearm","transform":{"x":-1.1,"y":-73.5,"skX":11,"skY":11}},{"inheritScale":false,"name":"driver_head","transform":{"x":-11.6,"y":-99.55,"skX":15,"skY":15}},{"inheritScale":false,"name":"fx","transform":{"x":-104.2,"y":-4.9,"scX":1.4022,"scY":1.4022}}],"slot":[{"name":"wheel back","parent":"wheel back"},{"name":"wheel front","parent":"wheel front"},{"name":"suspend_back","parent":"suspend_back"},{"name":"suspend_front","parent":"suspend_front"},{"name":"base","parent":"base"},{"name":"driver_corpse","parent":"driver_corpse"},{"name":"driver_shin","parent":"driver_shin"},{"name":"driver_hip","parent":"driver_hip"},{"name":"driver_arm","parent":"driver_arm"},{"name":"driver_forearm","parent":"driver_forearm"},{"name":"driver_head","parent":"driver_head"},{"name":"fx","parent":"fx"}],"skin":[{"slot":[{"name":"wheel back","display":[{"name":"wheel"}]},{"name":"wheel front","display":[{"name":"wheel"}]},{"name":"suspend_back","display":[{"name":"supend_back0","transform":{"x":20.4,"y":0.4}}]},{"name":"suspend_front","display":[{"name":"suspend_front0","transform":{"x":-10.55,"y":0.3}}]},{"name":"base","display":[{"name":"base","transform":{"x":-5.85,"y":-10.05}}]},{"name":"driver_corpse","display":[{"name":"driver_corpse","transform":{"x":0.95,"y":-1.65}}]},{"name":"driver_shin","display":[{"name":"driver_shin","transform":{"x":3.95,"y":5.25}}]},{"name":"driver_hip","display":[{"name":"drive_hip","transform":{"x":5.25,"y":1.9}}]},{"name":"driver_arm","display":[{"name":"driver_arm","transform":{"x":0.7,"y":0.15}}]},{"name":"driver_forearm","display":[{"name":"driver_forearm","transform":{"x":1.75,"y":3.1}}]},{"name":"driver_head","display":[{"name":"driver_head","transform":{"x":-1.7,"y":-1.95}}]},{"name":"fx","display":[{"name":"dust1","transform":{"x":-2.45}},{"name":"dust2","transform":{"x":-5.95,"y":-2}},{"name":"dust3","transform":{"x":-7.55,"y":-4}},{"name":"dust4","transform":{"x":-10.1,"y":-6.05}},{"name":"dust5","transform":{"x":-11.1,"y":-6.5}},{"name":"dust6","transform":{"x":-12.2,"y":-6.3}},{"name":"dust7","transform":{"x":-12.9,"y":-6.5}},{"name":"dust8","transform":{"x":-13.7,"y":-6.05}},{"name":"dust9","transform":{"x":-13.8,"y":-7.3}},{"name":"dust10","transform":{"x":-26.45,"y":-3.55}}]}]}],"animation":[{"duration":89,"playTimes":0,"fadeInTime":0.3,"name":"animation","bone":[{"name":"wheel back","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.1},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":66.05},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":49.1,"y":1},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0,"clockwise":2},{"duration":13,"tweenEasing":0,"clockwise":-2},{"duration":18,"tweenEasing":1,"clockwise":-4},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":7,"tweenEasing":1},{"duration":19,"tweenEasing":1,"clockwise":2},{"tweenEasing":0,"clockwise":2}],"scaleFrame":[{"duration":62,"tweenEasing":0},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"y":0.9435},{"duration":20}]},{"name":"wheel front","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.1},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":34.7,"y":-65},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":49.1,"y":1},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0,"clockwise":2},{"duration":13,"tweenEasing":0,"clockwise":-2},{"duration":18,"tweenEasing":1,"clockwise":-2},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":7,"tweenEasing":1},{"duration":19,"tweenEasing":1,"clockwise":2},{"tweenEasing":0}],"scaleFrame":[{"duration":62,"tweenEasing":0},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"y":0.9435},{"duration":20}]},{"name":"suspend_back","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.1},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":47.9,"y":-17.4},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":49.1,"y":1.5},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":-1.98},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":27}],"scaleFrame":[{"duration":89}]},{"name":"suspend_front","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.5,"y":-0.45},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":35.05,"y":-65.1},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":46.85,"y":0.1},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":1.48},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"base","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":34.1,"y":-1.75},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":36.25,"y":-17.6},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":50.15,"y":7.4},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":1.48},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_corpse","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":36.63,"y":-3.65},{"duration":18,"tweenEasing":1,"x":-27.36,"y":3.75},{"duration":11,"tweenEasing":-1,"x":12.99,"y":1.82},{"duration":4,"tweenEasing":1,"x":49.09,"y":0.05},{"duration":3,"tweenEasing":0,"x":50.3,"y":6.7},{"duration":19,"tweenEasing":1,"x":49.09,"y":0.05},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.18},{"duration":18,"tweenEasing":1,"rotate":-8.7},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":13.9},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_shin","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":34.15,"y":-1.8},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":34.75,"y":-15.17},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":50.3,"y":7.35},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":1.49},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_hip","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":35.21,"y":-3.73},{"duration":18,"tweenEasing":1,"x":-26.99,"y":0.17},{"duration":11,"tweenEasing":-1,"x":24.52,"y":-4.79},{"duration":4,"tweenEasing":1,"x":49.17,"y":-0.02},{"duration":3,"tweenEasing":0,"x":50.83,"y":7.16},{"duration":19,"tweenEasing":1,"x":49.17,"y":-0.02},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-15},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_arm","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":37.19,"y":-3.23},{"duration":18,"tweenEasing":1,"x":-28.23,"y":3.14},{"duration":11,"tweenEasing":-1,"x":7,"y":0.74},{"duration":4,"tweenEasing":1,"x":49.17},{"duration":3,"tweenEasing":0,"x":51.58,"y":8.02},{"duration":19,"tweenEasing":1,"x":49.17},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-8.71},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":13.9},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_forearm","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":36.6,"y":-2.25},{"duration":18,"tweenEasing":1,"x":-27.55,"y":1.1},{"duration":11,"tweenEasing":-1,"x":6.78,"y":-11.71},{"duration":4,"tweenEasing":1,"x":49.11,"y":-0.05},{"duration":3,"tweenEasing":0,"x":51.2,"y":7.75},{"duration":19,"tweenEasing":1,"x":49.11,"y":-0.05},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-8.7},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":-13.02},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_head","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":38.95,"y":-3},{"duration":18,"tweenEasing":1,"x":-31.3,"y":3},{"duration":11,"tweenEasing":-1,"x":-9.6,"y":6.3},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":56.3,"y":9},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-8.71},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":13.9},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"fx","translateFrame":[{"duration":33,"tweenEasing":0,"x":104.2,"y":4.9},{"tweenEasing":0},{"tweenEasing":0,"x":13.4,"y":0.3},{"tweenEasing":0,"x":24.65,"y":0.65},{"tweenEasing":0,"x":33.9,"y":0.9},{"tweenEasing":0,"x":43.2,"y":1.15},{"tweenEasing":0,"x":51.75,"y":1.35},{"tweenEasing":0,"x":57.7,"y":1.45},{"tweenEasing":0,"x":67.2,"y":1.5},{"tweenEasing":0,"x":76.85,"y":0.9},{"tweenEasing":0,"x":81.9,"y":1.15},{"tweenEasing":0,"x":90.4,"y":1.35},{"tweenEasing":0,"x":92.1,"y":1.45},{"tweenEasing":0,"x":97.3,"y":1.5},{"tweenEasing":0,"x":102.65,"y":0.9},{"tweenEasing":0,"x":103.35,"y":1.15},{"tweenEasing":0,"x":107.6,"y":1.35},{"tweenEasing":0,"x":109.25,"y":1.45},{"tweenEasing":0,"x":110.2,"y":1.5},{"tweenEasing":0,"x":111.25,"y":0.9},{"tweenEasing":0,"x":111.95,"y":1.15},{"tweenEasing":0,"x":107.6,"y":1.35},{"tweenEasing":0,"x":109.25,"y":1.45},{"tweenEasing":0,"x":110.2,"y":1.5},{"tweenEasing":0,"x":100.45,"y":1.6},{"x":110.05,"y":1.6},{"duration":31,"tweenEasing":0,"x":104.2,"y":4.9}],"scaleFrame":[{"duration":33,"tweenEasing":0,"x":0.7132,"y":0.7132},{"tweenEasing":0},{"tweenEasing":0,"x":0.9325,"y":0.9325},{"tweenEasing":0,"x":0.873,"y":0.873},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.6825,"y":0.6825},{"x":0.6786,"y":0.6786},{"duration":31,"tweenEasing":0,"x":0.7132,"y":0.7132}]}],"slot":[{"name":"fx","displayFrame":[{"duration":33,"value":-1},{},{"value":1},{"value":2},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":8},{"value":9},{"duration":31,"value":-1}]}]}]},{"name":"biker1_anim_btn","bone":[{"inheritScale":false,"name":"wheel back","transform":{"x":-42.9,"y":-17.95}},{"inheritScale":false,"name":"wheel front","transform":{"x":40.2,"y":-17.95}},{"inheritScale":false,"name":"suspend_front","transform":{"x":40.15,"y":-17.5,"skX":63,"skY":63}},{"inheritScale":false,"name":"suspend_back","transform":{"x":-15.8,"y":-28.05,"skX":161.71,"skY":161.71}},{"inheritScale":false,"name":"base","transform":{"x":-9.8,"y":-40.05}},{"inheritScale":false,"name":"driver_hip","transform":{"x":-17.15,"y":-58.55,"skX":30,"skY":30}},{"inheritScale":false,"name":"driver_corpse","transform":{"x":-18.2,"y":-73.8,"skX":15.73,"skY":15.73}},{"inheritScale":false,"name":"driver_shin","transform":{"x":-11.6,"y":-42.8,"skX":3,"skY":3}},{"inheritScale":false,"name":"driver_arm","transform":{"x":-14.15,"y":-79.65,"skX":45,"skY":45}},{"inheritScale":false,"name":"driver_forearm","transform":{"x":-1.1,"y":-73.5,"skX":11,"skY":11}},{"inheritScale":false,"name":"driver_head","transform":{"x":-11.6,"y":-99.55,"skX":15,"skY":15}},{"inheritScale":false,"name":"fx","transform":{"x":-104.2,"y":-4.9,"scX":1.4022,"scY":1.4022}}],"slot":[{"name":"wheel back","parent":"wheel back"},{"name":"wheel front","parent":"wheel front"},{"name":"suspend_front","parent":"suspend_front"},{"name":"suspend_back","parent":"suspend_back"},{"name":"base","parent":"base"},{"name":"driver_hip","parent":"driver_hip"},{"name":"driver_corpse","parent":"driver_corpse"},{"name":"driver_shin","parent":"driver_shin"},{"name":"driver_arm","parent":"driver_arm"},{"name":"driver_forearm","parent":"driver_forearm"},{"name":"driver_head","parent":"driver_head"},{"name":"fx","parent":"fx"}],"skin":[{"slot":[{"name":"wheel back","display":[{"name":"wheel1","transform":{"x":0.2,"y":0.25}}]},{"name":"wheel front","display":[{"name":"wheel1","transform":{"x":0.2,"y":0.25}}]},{"name":"suspend_front","display":[{"name":"suspend_front","transform":{"x":-15.25,"y":1.2}}]},{"name":"suspend_back","display":[{"name":"supend_back1","transform":{"x":15.6,"y":-0.8}}]},{"name":"base","display":[{"name":"base1","transform":{"x":-8.35,"y":-7.5}}]},{"name":"driver_hip","display":[{"name":"drive_hip1","transform":{"x":1.6,"y":2.35}}]},{"name":"driver_corpse","display":[{"name":"driver_corpse1","transform":{"x":1.45,"y":-0.2}}]},{"name":"driver_shin","display":[{"name":"driver_shin1","transform":{"x":4.05,"y":2.4}}]},{"name":"driver_arm","display":[{"name":"driver_arm1","transform":{"x":-0.3,"y":0.5}}]},{"name":"driver_forearm","display":[{"name":"driver_forearm1","transform":{"x":1,"y":0.8}}]},{"name":"driver_head","display":[{"name":"driver_head1","transform":{"x":2.35,"y":-1.3}}]},{"name":"fx","display":[{"name":"dust1","transform":{"x":-2.45}},{"name":"dust2","transform":{"x":-5.95,"y":-2}},{"name":"dust3","transform":{"x":-7.55,"y":-4}},{"name":"dust4","transform":{"x":-10.1,"y":-6.05}},{"name":"dust5","transform":{"x":-11.1,"y":-6.5}},{"name":"dust6","transform":{"x":-12.2,"y":-6.3}},{"name":"dust7","transform":{"x":-12.9,"y":-6.5}},{"name":"dust8","transform":{"x":-13.7,"y":-6.05}},{"name":"dust9","transform":{"x":-13.8,"y":-7.3}},{"name":"dust10","transform":{"x":-26.45,"y":-3.55}}]}]}],"animation":[{"duration":89,"playTimes":0,"fadeInTime":0.3,"name":"animation","bone":[{"name":"wheel back","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.1},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":66.05},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":49.1,"y":1},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0,"clockwise":2},{"duration":13,"tweenEasing":0,"clockwise":-2},{"duration":18,"tweenEasing":1,"clockwise":-4},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":7,"tweenEasing":1},{"duration":19,"tweenEasing":1,"clockwise":2},{"tweenEasing":0,"clockwise":2}],"scaleFrame":[{"duration":62,"tweenEasing":0},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"y":0.9435},{"duration":20}]},{"name":"wheel front","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.1},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":34.7,"y":-65},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":49.1,"y":1},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0,"clockwise":2},{"duration":13,"tweenEasing":0,"clockwise":-2},{"duration":18,"tweenEasing":1,"clockwise":-2},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":7,"tweenEasing":1},{"duration":19,"tweenEasing":1,"clockwise":2},{"tweenEasing":0}],"scaleFrame":[{"duration":62,"tweenEasing":0},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"y":0.9435},{"duration":20}]},{"name":"suspend_front","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.5,"y":-0.45},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":35.05,"y":-65.1},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":46.85,"y":0.1},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":1.48},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"suspend_back","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":33.1},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":47.9,"y":-17.4},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":49.1,"y":1.5},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":-1.98},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":27}],"scaleFrame":[{"duration":89}]},{"name":"base","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":34.1,"y":-1.75},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":36.25,"y":-17.6},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":50.15,"y":7.4},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":1.48},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_hip","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":35.21,"y":-3.73},{"duration":18,"tweenEasing":1,"x":-26.99,"y":0.17},{"duration":11,"tweenEasing":-1,"x":24.52,"y":-4.79},{"duration":4,"tweenEasing":1,"x":49.17,"y":-0.02},{"duration":3,"tweenEasing":0,"x":50.83,"y":7.16},{"duration":19,"tweenEasing":1,"x":49.17,"y":-0.02},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-15},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_corpse","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":36.63,"y":-3.65},{"duration":18,"tweenEasing":1,"x":-27.36,"y":3.75},{"duration":11,"tweenEasing":-1,"x":12.99,"y":1.82},{"duration":4,"tweenEasing":1,"x":49.09,"y":0.05},{"duration":3,"tweenEasing":0,"x":50.3,"y":6.7},{"duration":19,"tweenEasing":1,"x":49.09,"y":0.05},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.18},{"duration":18,"tweenEasing":1,"rotate":-8.7},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":13.9},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_shin","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":34.15,"y":-1.8},{"duration":18,"tweenEasing":1,"x":-27},{"duration":11,"tweenEasing":-1,"x":34.75,"y":-15.17},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":50.3,"y":7.35},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":1.49},{"duration":18,"tweenEasing":1},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":1.98},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_arm","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":37.19,"y":-3.23},{"duration":18,"tweenEasing":1,"x":-28.23,"y":3.14},{"duration":11,"tweenEasing":-1,"x":7,"y":0.74},{"duration":4,"tweenEasing":1,"x":49.17},{"duration":3,"tweenEasing":0,"x":51.58,"y":8.02},{"duration":19,"tweenEasing":1,"x":49.17},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-8.71},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":13.9},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_forearm","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":36.6,"y":-2.25},{"duration":18,"tweenEasing":1,"x":-27.55,"y":1.1},{"duration":11,"tweenEasing":-1,"x":6.78,"y":-11.71},{"duration":4,"tweenEasing":1,"x":49.11,"y":-0.05},{"duration":3,"tweenEasing":0,"x":51.2,"y":7.75},{"duration":19,"tweenEasing":1,"x":49.11,"y":-0.05},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-8.7},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":-13.02},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"driver_head","translateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"x":38.95,"y":-3},{"duration":18,"tweenEasing":1,"x":-31.3,"y":3},{"duration":11,"tweenEasing":-1,"x":-9.6,"y":6.3},{"duration":4,"tweenEasing":1,"x":49.1},{"duration":3,"tweenEasing":0,"x":56.3,"y":9},{"duration":19,"tweenEasing":1,"x":49.1},{"tweenEasing":0}],"rotateFrame":[{"duration":20,"tweenEasing":0},{"duration":13,"tweenEasing":0,"rotate":5.17},{"duration":18,"tweenEasing":1,"rotate":-8.71},{"duration":11,"tweenEasing":-1,"rotate":-51.47},{"duration":4,"tweenEasing":1},{"duration":3,"tweenEasing":0,"rotate":13.9},{"duration":20}],"scaleFrame":[{"duration":89}]},{"name":"fx","translateFrame":[{"duration":33,"tweenEasing":0,"x":104.2,"y":4.9},{"tweenEasing":0},{"tweenEasing":0,"x":13.4,"y":0.3},{"tweenEasing":0,"x":24.65,"y":0.65},{"tweenEasing":0,"x":33.9,"y":0.9},{"tweenEasing":0,"x":43.2,"y":1.15},{"tweenEasing":0,"x":51.75,"y":1.35},{"tweenEasing":0,"x":57.7,"y":1.45},{"tweenEasing":0,"x":67.2,"y":1.5},{"tweenEasing":0,"x":76.85,"y":0.9},{"tweenEasing":0,"x":81.9,"y":1.15},{"tweenEasing":0,"x":90.4,"y":1.35},{"tweenEasing":0,"x":92.1,"y":1.45},{"tweenEasing":0,"x":97.3,"y":1.5},{"tweenEasing":0,"x":102.65,"y":0.9},{"tweenEasing":0,"x":103.35,"y":1.15},{"tweenEasing":0,"x":107.6,"y":1.35},{"tweenEasing":0,"x":109.25,"y":1.45},{"tweenEasing":0,"x":110.2,"y":1.5},{"tweenEasing":0,"x":111.25,"y":0.9},{"tweenEasing":0,"x":111.95,"y":1.15},{"tweenEasing":0,"x":107.6,"y":1.35},{"tweenEasing":0,"x":109.25,"y":1.45},{"tweenEasing":0,"x":110.2,"y":1.5},{"tweenEasing":0,"x":100.45,"y":1.6},{"x":110.05,"y":1.6},{"duration":31,"tweenEasing":0,"x":104.2,"y":4.9}],"scaleFrame":[{"duration":33,"tweenEasing":0,"x":0.7132,"y":0.7132},{"tweenEasing":0},{"tweenEasing":0,"x":0.9325,"y":0.9325},{"tweenEasing":0,"x":0.873,"y":0.873},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.8214,"y":0.8214},{"tweenEasing":0,"x":0.7778,"y":0.7778},{"tweenEasing":0,"x":0.742,"y":0.742},{"tweenEasing":0,"x":0.7143,"y":0.7143},{"tweenEasing":0,"x":0.6944,"y":0.6944},{"tweenEasing":0,"x":0.6825,"y":0.6825},{"x":0.6786,"y":0.6786},{"duration":31,"tweenEasing":0,"x":0.7132,"y":0.7132}]}],"slot":[{"name":"fx","displayFrame":[{"duration":33,"value":-1},{},{"value":1},{"value":2},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":3},{"value":4},{"value":5},{"value":6},{"value":7},{"value":8},{"value":9},{"duration":31,"value":-1}]}]}]}]} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/bikes_texture.json b/motox3mspooky/assets/levels/bikes_texture.json deleted file mode 100644 index f8113b62..00000000 --- a/motox3mspooky/assets/levels/bikes_texture.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"bikes_skeleton","imagePath":"bikes_texture.png","SubTexture":[{"name":"wheel","x":42,"height":38,"width":38,"y":54},{"name":"supend_back0","x":42,"height":23,"width":34,"y":94},{"name":"suspend_front0","x":0,"height":4,"width":26,"y":137},{"name":"base","x":0,"height":53,"width":107,"y":0},{"name":"driver_corpse","x":82,"height":37,"width":25,"y":54},{"name":"driver_shin","x":185,"height":22,"width":17,"y":97},{"name":"drive_hip","x":0,"height":41,"width":41,"y":54},{"name":"driver_arm","x":129,"height":10,"width":19,"y":129},{"name":"driver_forearm","x":69,"height":12,"width":22,"y":126},{"name":"driver_head","x":203,"height":33,"width":40,"y":85},{"name":"dust1","x":27,"height":12,"width":14,"y":137},{"name":"dust2","x":133,"height":16,"width":18,"y":99},{"name":"dust3","x":104,"height":20,"width":24,"y":122},{"name":"dust4","x":42,"height":23,"width":26,"y":118},{"name":"dust5","x":154,"height":24,"width":26,"y":119},{"name":"dust6","x":203,"height":24,"width":26,"y":119},{"name":"dust7","x":104,"height":22,"width":28,"y":99},{"name":"dust8","x":155,"height":21,"width":29,"y":97},{"name":"dust9","x":0,"height":16,"width":31,"y":120},{"name":"dust10","x":203,"height":8,"width":7,"y":53},{"name":"wheel1","x":215,"height":40,"width":40,"y":0},{"name":"suspend_front","x":155,"height":43,"width":47,"y":53},{"name":"supend_back1","x":0,"height":23,"width":41,"y":96},{"name":"base1","x":108,"height":52,"width":106,"y":0},{"name":"drive_hip1","x":181,"height":16,"width":16,"y":121},{"name":"driver_corpse1","x":215,"height":43,"width":36,"y":41},{"name":"driver_shin1","x":82,"height":33,"width":21,"y":92},{"name":"driver_arm1","x":230,"height":23,"width":23,"y":119},{"name":"driver_forearm1","x":133,"height":12,"width":20,"y":116},{"name":"driver_head1","x":108,"height":45,"width":46,"y":53}]} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map1.json b/motox3mspooky/assets/levels/map1.json deleted file mode 100644 index 0c633db0..00000000 --- a/motox3mspooky/assets/levels/map1.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":15920,"rotation":0,"y":-2700,"width":1339,"height":1343},"className":"FinishZone"},{"params":{"x":14255,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":3,"vertices":[{"x":0,"y":0,"length":0},{"x":38,"y":-37,"length":53.03772242470448},{"x":97,"y":-79,"length":125.09996003196804},{"x":144,"y":-112,"length":182.42806801586207},{"x":194,"y":-137,"length":237.49736840647307},{"x":257,"y":-166,"length":305.94934221207274},{"x":319,"y":-186,"length":369.2654871498283},{"x":379,"y":-198,"length":427.6037885706814},{"x":446,"y":-211,"length":493.39335220491165},{"x":506,"y":-214,"length":549.3923916473543},{"x":574,"y":-214,"length":612.5944825086168},{"x":626,"y":-210,"length":660.2847870426821},{"x":681,"y":-201,"length":710.043660629401},{"x":739,"y":-190,"length":763.0340752548342},{"x":801,"y":-171,"length":819.0494490566489},{"x":869,"y":-143,"length":880.6872316549162},{"x":924,"y":-115,"length":931.128884741527},{"x":979,"y":-77,"length":982.0234213092883},{"x":1031,"y":-38,"length":1031.7000533100693},{"x":1093,"y":18,"length":1093.1482058714637},{"x":1148,"y":77,"length":1150.5794192492754},{"x":1195,"y":139,"length":1203.0569396333658},{"x":1230,"y":203,"length":1246.6390816912487},{"x":1269,"y":295,"length":1302.8376721602733},{"x":1287,"y":361,"length":1336.6712385624223},{"x":1303,"y":447,"length":1377.5405620162333},{"x":1310,"y":561,"length":1425.0687702704035},{"x":1303,"y":664,"length":1462.4311949626895},{"x":1285,"y":752,"length":1488.868362213396},{"x":1265,"y":825,"length":1510.248323952058},{"x":1241,"y":885,"length":1524.239482496107},{"x":1207,"y":944,"length":1532.3136101986433},{"x":1173,"y":997,"length":1539.4602950384917},{"x":1130,"y":1050,"length":1542.5303886795878},{"x":1080,"y":1105,"length":1545.1294444155803},{"x":1020,"y":1160,"length":1544.6682491719703},{"x":953,"y":1207,"length":1537.874507233929},{"x":850,"y":1263,"length":1522.389240634602},{"x":725,"y":1307,"length":1494.6150005937984},{"x":588,"y":1327,"length":1451.4382522174342},{"x":462,"y":1324,"length":1402.2909826423331},{"x":329,"y":1302,"length":1342.9240484852448},{"x":216,"y":1263,"length":1281.337192155133},{"x":130,"y":1214,"length":1220.9406209967788},{"x":46,"y":1154,"length":1154.9164471943413},{"x":-27,"y":1079,"length":1079.3377599250384},{"x":-97,"y":991,"length":995.7359087629611},{"x":-130,"y":942,"length":950.9279678293199},{"x":-164,"y":874,"length":889.2536196159114},{"x":-190,"y":814,"length":835.8803742163109},{"x":-207,"y":755,"length":782.8626954964708},{"x":-219,"y":686,"length":720.1090195241273},{"x":-229,"y":621,"length":661.8776321949549},{"x":-233,"y":552,"length":599.1602456772312},{"x":-230,"y":485,"length":536.7727638395972},{"x":-223,"y":435,"length":488.8292135296335},{"x":-214,"y":389,"length":443.9786030880317},{"x":-200,"y":330,"length":385.87562763149475},{"x":-185,"y":279,"length":334.7626024513491},{"x":-155,"y":215,"length":265.04716561397146},{"x":-121,"y":155,"length":196.6367208839692},{"x":-78,"y":94,"length":122.14745187681976},{"x":-38,"y":38,"length":53.74011537017761}],"y":-2273},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9820,"bg":true,"rotation":0,"y":-1020,"vertices":[{"x":0,"y":0,"length":0},{"x":2130,"y":0,"length":2130},{"x":2145,"y":670,"length":2247.2038180814843},{"x":15,"y":670,"length":670.1678894127948}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":3840,"bg":true,"rotation":0,"y":50,"vertices":[{"x":0,"y":0,"length":0},{"x":1195,"y":0,"length":1195},{"x":1195,"y":230,"length":1216.9326193343657},{"x":0,"y":230,"length":230}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":4330,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":true,"layer":1,"rem":false,"safeId":-1,"vertices":[{"x":0,"y":10,"length":10},{"x":30,"y":-10,"length":31.622776601683793},{"x":602,"y":-175,"length":626.9202501116071},{"x":615,"y":-125,"length":627.5746967493193},{"x":435,"y":-70,"length":440.5961870012041},{"x":355,"y":345,"length":495.025251881154},{"x":480,"y":470,"length":671.7886572427374},{"x":435,"y":507,"length":668.0374241013748},{"x":-5,"y":95,"length":95.13148795220224},{"x":-20,"y":65,"length":68.00735254367721},{"x":-20,"y":45,"length":49.24428900898052},{"x":-15,"y":25,"length":29.154759474226502}],"y":-820},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":2270,"rotation":-54,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":550,"density":"1","height":17,"action":0,"isStatic":true,"wireframe":false,"width":383,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":65,"y":0,"length":65},{"x":135,"y":0,"length":135},{"x":210,"y":0,"length":210},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2680,"rotation":-75,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":740,"density":"1","height":17,"action":0,"isStatic":true,"wireframe":false,"width":383,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":65,"y":0,"length":65},{"x":135,"y":0,"length":135},{"x":210,"y":0,"length":210},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3140,"rotation":-102,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":740,"density":"1","height":17,"action":0,"isStatic":true,"wireframe":false,"width":383,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":65,"y":0,"length":65},{"x":135,"y":0,"length":135},{"x":210,"y":0,"length":210},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3580,"rotation":-129,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":520,"density":"1","height":17,"action":0,"isStatic":true,"wireframe":false,"width":383,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":65,"y":0,"length":65},{"x":135,"y":0,"length":135},{"x":210,"y":0,"length":210},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3880,"rotation":-147,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":150,"density":"1","height":17,"action":0,"isStatic":true,"wireframe":false,"width":383,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":65,"y":0,"length":65},{"x":135,"y":0,"length":135},{"x":210,"y":0,"length":210},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1930,"bg":true,"rotation":0,"y":400,"vertices":[{"x":0,"y":0,"length":0},{"x":1665,"y":0,"length":1665},{"x":1665,"y":230,"length":1680.8108162431606},{"x":0,"y":230,"length":230}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":-40,"physic":false,"lineId":-1,"y":490,"height":4283,"isRoad":false,"direction":90,"width":17633,"textureMode":true,"cameraOffsetY":120,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":5,"y":-80,"length":80.15609770940699},{"x":2600,"y":175,"length":2605.8827678926773},{"x":2875,"y":185,"length":2880.9460251799233},{"x":3100,"y":165,"length":3104.388023427484},{"x":3305,"y":85,"length":3306.0928601598594},{"x":3425,"y":20,"length":3425.0583936628},{"x":3600,"y":-115,"length":3601.836337203566},{"x":3800,"y":-315,"length":3813.033569220182},{"x":3870,"y":-370,"length":3887.6471033261237},{"x":3945,"y":-385,"length":3963.741918944774},{"x":4370,"y":-340,"length":4383.206588788624},{"x":4605,"y":-355,"length":4618.663226519119},{"x":4770,"y":-405,"length":4787.162520742324},{"x":5170,"y":-700,"length":5217.173564297052},{"x":6645,"y":-830,"length":6696.6353491884265},{"x":7250,"y":-1190,"length":7347.012998491292},{"x":8390,"y":-1715,"length":8563.487899214899},{"x":9315,"y":-1355,"length":9413.036173307739},{"x":9725,"y":-1415,"length":9827.403014021558},{"x":9890,"y":-1515,"length":10005.364810940178},{"x":11745,"y":-1545,"length":11846.182929534729},{"x":13905,"y":-1535,"length":13989.469253692221},{"x":14155,"y":-1830,"length":14272.803683929798},{"x":14605,"y":-2590,"length":14832.873120201628},{"x":15030,"y":-2930,"length":15312.929177658989},{"x":17625,"y":-4085,"length":18092.204122217943}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":10275,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":true,"layer":1,"rem":true,"safeId":2,"vertices":[{"x":0,"y":0,"length":0},{"x":38,"y":-37,"length":53.03772242470448},{"x":97,"y":-79,"length":125.09996003196804},{"x":144,"y":-112,"length":182.42806801586207},{"x":194,"y":-137,"length":237.49736840647307},{"x":257,"y":-166,"length":305.94934221207274},{"x":319,"y":-186,"length":369.2654871498283},{"x":379,"y":-198,"length":427.6037885706814},{"x":446,"y":-211,"length":493.39335220491165},{"x":506,"y":-214,"length":549.3923916473543},{"x":574,"y":-214,"length":612.5944825086168},{"x":626,"y":-210,"length":660.2847870426821},{"x":681,"y":-201,"length":710.043660629401},{"x":739,"y":-190,"length":763.0340752548342},{"x":801,"y":-171,"length":819.0494490566489},{"x":869,"y":-143,"length":880.6872316549162},{"x":924,"y":-115,"length":931.128884741527},{"x":979,"y":-77,"length":982.0234213092883},{"x":1031,"y":-38,"length":1031.7000533100693},{"x":1093,"y":18,"length":1093.1482058714637},{"x":1148,"y":77,"length":1150.5794192492754},{"x":1195,"y":139,"length":1203.0569396333658},{"x":1230,"y":203,"length":1246.6390816912487},{"x":1269,"y":295,"length":1302.8376721602733},{"x":1287,"y":361,"length":1336.6712385624223},{"x":1303,"y":447,"length":1377.5405620162333},{"x":1310,"y":561,"length":1425.0687702704035},{"x":1303,"y":664,"length":1462.4311949626895},{"x":1285,"y":752,"length":1488.868362213396},{"x":1265,"y":825,"length":1510.248323952058},{"x":1241,"y":885,"length":1524.239482496107},{"x":1207,"y":944,"length":1532.3136101986433},{"x":1173,"y":997,"length":1539.4602950384917},{"x":1130,"y":1050,"length":1542.5303886795878},{"x":1080,"y":1105,"length":1545.1294444155803},{"x":1020,"y":1160,"length":1544.6682491719703},{"x":953,"y":1207,"length":1537.874507233929},{"x":850,"y":1263,"length":1522.389240634602},{"x":725,"y":1307,"length":1494.6150005937984},{"x":588,"y":1327,"length":1451.4382522174342},{"x":462,"y":1324,"length":1402.2909826423331},{"x":329,"y":1302,"length":1342.9240484852448},{"x":216,"y":1263,"length":1281.337192155133},{"x":130,"y":1214,"length":1220.9406209967788},{"x":46,"y":1154,"length":1154.9164471943413},{"x":-27,"y":1079,"length":1079.3377599250384},{"x":-97,"y":991,"length":995.7359087629611},{"x":-130,"y":942,"length":950.9279678293199},{"x":-164,"y":874,"length":889.2536196159114},{"x":-190,"y":814,"length":835.8803742163109},{"x":-207,"y":755,"length":782.8626954964708},{"x":-219,"y":686,"length":720.1090195241273},{"x":-229,"y":621,"length":661.8776321949549},{"x":-233,"y":552,"length":599.1602456772312},{"x":-230,"y":485,"length":536.7727638395972},{"x":-223,"y":435,"length":488.8292135296335},{"x":-214,"y":389,"length":443.9786030880317},{"x":-200,"y":330,"length":385.87562763149475},{"x":-185,"y":279,"length":334.7626024513491},{"x":-155,"y":215,"length":265.04716561397146},{"x":-121,"y":155,"length":196.6367208839692},{"x":-78,"y":94,"length":122.14745187681976},{"x":-38,"y":38,"length":53.74011537017761}],"y":-2473},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6830,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":3140,"y":-1055,"length":3312.4952830155094},{"x":5115,"y":-1345,"length":5288.879843596374},{"x":5270,"y":-305,"length":5278.818523116702},{"x":5200,"y":-50,"length":5200.240379059414},{"x":5125,"y":0,"length":5125},{"x":5055,"y":0,"length":5055},{"x":4980,"y":0,"length":4980},{"x":4900,"y":0,"length":4900},{"x":4815,"y":0,"length":4815},{"x":4750,"y":0,"length":4750},{"x":4675,"y":0,"length":4675},{"x":4673,"y":-76,"length":4673.617977541596},{"x":4664,"y":-155,"length":4666.574868144729},{"x":4645,"y":-232,"length":4650.790147921103},{"x":4617,"y":-305,"length":4627.063215474801},{"x":4583,"y":-369,"length":4597.831010378698},{"x":4546,"y":-425,"length":4565.823145939842},{"x":4496,"y":-482,"length":4521.762930539371},{"x":4438,"y":-543,"length":4471.095279682597},{"x":4380,"y":-586,"length":4419.026589646186},{"x":4330,"y":-620,"length":4374.162777035167},{"x":4264,"y":-651,"length":4313.408976667991},{"x":4196,"y":-677,"length":4250.26410944073},{"x":4128,"y":-695,"length":4186.0971082859505},{"x":4062,"y":-706,"length":4122.897039703999},{"x":3987,"y":-707,"length":4049.199674009668},{"x":3916,"y":-705,"length":3978.9547622459845},{"x":3852,"y":-696,"length":3914.3735130924847},{"x":3768,"y":-676,"length":3828.1588263811627},{"x":3694,"y":-644,"length":3749.716255931907},{"x":3626,"y":-606,"length":3676.2905217079892},{"x":3565,"y":-561,"length":3608.870460407245},{"x":3493,"y":-500,"length":3528.6043983422114},{"x":3440,"y":-435,"length":3467.394554993706},{"x":3387,"y":-356,"length":3405.6577925563806},{"x":3348,"y":-273,"length":3359.1119362117124},{"x":3322,"y":-190,"length":3327.4290375603805},{"x":3306,"y":-112,"length":3307.89661265282},{"x":3300,"y":-45,"length":3300.3068039199024},{"x":3225,"y":-45,"length":3225.3139382081863},{"x":3165,"y":-45,"length":3165.319889047551},{"x":3085,"y":-45,"length":3085.3281835163016},{"x":3000,"y":-45,"length":3000.3374810177606},{"x":2920,"y":-45,"length":2920.346725989912},{"x":2885,"y":-95,"length":2886.5637010119835}],"y":-1900},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-40,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.5,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-265,"y":0,"length":265},{"x":1280,"y":0,"length":1280},{"x":1380,"y":-5,"length":1380.0090579412877},{"x":1425,"y":-15,"length":1425.0789451816345},{"x":1475,"y":-35,"length":1475.4151958008295},{"x":1539,"y":-73,"length":1540.7303462968464},{"x":1640,"y":-150,"length":1646.8454693747074},{"x":1691,"y":-187,"length":1701.3083200878082},{"x":1743,"y":-206,"length":1755.1310492382042},{"x":1795,"y":-210,"length":1807.242374447877},{"x":1860,"y":-200,"length":1870.721785835617},{"x":1925,"y":-165,"length":1932.0584877275326},{"x":1975,"y":-105,"length":1977.7891697549564},{"x":2020,"y":-35,"length":2020.3031950675127},{"x":2041,"y":35,"length":2041.3000759320028},{"x":2090,"y":80,"length":2091.5305400591214},{"x":2170,"y":100,"length":2172.3029254687294},{"x":2250,"y":85,"length":2251.6049831175983},{"x":2305,"y":50,"length":2305.542235570626},{"x":2360,"y":35,"length":2360.2595196291445},{"x":2390,"y":35,"length":2390.256262412045},{"x":2430,"y":45,"length":2430.41663095034},{"x":2485,"y":65,"length":2485.849955246696},{"x":2740,"y":180,"length":2745.906043549196},{"x":2835,"y":205,"length":2842.4021531092326},{"x":2945,"y":210,"length":2952.4777729900015},{"x":3055,"y":200,"length":3061.539645341866},{"x":3175,"y":180,"length":3180.09826892189},{"x":3260,"y":150,"length":3263.4490956655045},{"x":3352,"y":109,"length":3353.771757290588},{"x":3435,"y":52,"length":3435.393572794826},{"x":3508,"y":-6,"length":3508.005131125096},{"x":3570,"y":-65,"length":3570.5916876618644},{"x":3640,"y":-144,"length":3642.847238081773},{"x":3698,"y":-224,"length":3704.7779960478065},{"x":3750,"y":-310,"length":3762.7915169458965},{"x":3785,"y":-345,"length":3800.690726696925},{"x":3830,"y":-360,"length":3846.8818541774845},{"x":3910,"y":-345,"length":3925.191078151483},{"x":3970,"y":-320,"length":3982.875845416224},{"x":4055,"y":-280,"length":4064.6555819650944},{"x":4125,"y":-245,"length":4132.269352305098},{"x":4215,"y":-210,"length":4220.228074405458},{"x":4325,"y":-180,"length":4328.744044177249},{"x":4440,"y":-165,"length":4443.064820594001},{"x":4550,"y":-170,"length":4553.174716612575},{"x":4645,"y":-190,"length":4648.884274748082},{"x":4735,"y":-215,"length":4739.878690430801},{"x":4825,"y":-265,"length":4832.2717224924345},{"x":4920,"y":-345,"length":4932.081203711066},{"x":4990,"y":-440,"length":5009.361236724699},{"x":5040,"y":-520,"length":5066.754385205582},{"x":5155,"y":-755,"length":5209.995201533299},{"x":5190,"y":-770,"length":5246.808553778192},{"x":6540,"y":-770,"length":6585.172738812552},{"x":6606,"y":-777,"length":6651.538543825782},{"x":6645,"y":-772,"length":6689.694238154686},{"x":6673,"y":-770,"length":6717.278392325273},{"x":6702,"y":-762,"length":6745.179612137841},{"x":6745,"y":-772,"length":6789.03594039684},{"x":6795,"y":-801,"length":6842.048377496319},{"x":6875,"y":-848,"length":6927.101053110168},{"x":6930,"y":-898,"length":6987.939896707756},{"x":6967,"y":-943,"length":7030.528998588939},{"x":7001,"y":-987,"length":7070.231255058069},{"x":7038,"y":-1047,"length":7115.451707375998},{"x":7066,"y":-1113,"length":7153.119948665757},{"x":7087,"y":-1196,"length":7187.209820229266},{"x":7093,"y":-1280,"length":7207.56886890441},{"x":7096,"y":-1357,"length":7224.587531478874},{"x":7092,"y":-2029,"length":7376.537466860722},{"x":7432,"y":-2028,"length":7703.726890278497},{"x":7518,"y":-2025,"length":7785.945607310649},{"x":7580,"y":-2024,"length":7845.5704700168235},{"x":7654,"y":-2017,"length":7915.301952547356},{"x":7726,"y":-2004,"length":7981.672255862176},{"x":9093,"y":-1363,"length":9194.586341973194},{"x":9193,"y":-1330,"length":9288.710836278628},{"x":9300,"y":-1313,"length":9392.229181616045},{"x":9387,"y":-1310,"length":9477.96755639098},{"x":9477,"y":-1313,"length":9567.523085940269},{"x":9573,"y":-1330,"length":9664.948473737457},{"x":9656,"y":-1355,"length":9750.608237438319},{"x":9717,"y":-1390,"length":9815.915087244795},{"x":9771,"y":-1433,"length":9875.52175836801},{"x":9834,"y":-1460,"length":9941.788370308432},{"x":9860,"y":-1460,"length":9967.507210932932},{"x":10305,"y":-855,"length":10340.408599276916},{"x":11375,"y":-855,"length":11407.087708964107},{"x":11855,"y":-1440,"length":11942.13653413827},{"x":11920,"y":-1485,"length":12012.144895895986},{"x":13220,"y":-1485,"length":13303.143425521654},{"x":13220,"y":-1430,"length":13297.11622871666},{"x":13275,"y":-1430,"length":13351.798567983265},{"x":13275,"y":-1485,"length":13357.801091497058},{"x":13840,"y":-1485,"length":13919.440541918342},{"x":14120,"y":-1625,"length":14213.19897137868},{"x":15015,"y":-2885,"length":15289.651729192527},{"x":16945,"y":-2895,"length":17190.52209794688},{"x":16965,"y":-610,"length":16975.96315382429},{"x":15160,"y":30,"length":15160.029683348248},{"x":12785,"y":-180,"length":12786.267047109566},{"x":9420,"y":-115,"length":9420.701937753895},{"x":5921,"y":2180,"length":6309.567417818753},{"x":4392,"y":1952,"length":4806.242607276499},{"x":902,"y":1402,"length":1667.0956781180857},{"x":-260,"y":1400,"length":1423.938200906205}],"y":400},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4541,"rotation":-48,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":false,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":68,"y":29,"length":73.92563831310488},{"x":150,"y":56,"length":160.11246047700348},{"x":238,"y":71,"length":248.3646512690564},{"x":331,"y":71,"length":338.5291715642834},{"x":429,"y":56,"length":432.6395728548187},{"x":520,"y":26,"length":520.6495942570205},{"x":594,"y":-15,"length":594.1893637553604},{"x":660,"y":-63,"length":663},{"x":726,"y":-130,"length":737.5472866196445},{"x":777,"y":-196,"length":801.3395035813472},{"x":820,"y":-280,"length":866.4871608973788},{"x":850,"y":-380,"length":931.074647920348},{"x":860,"y":-470,"length":980.0510190801293},{"x":885,"y":-485,"length":1009.1828377454702},{"x":915,"y":-485,"length":1035.5916183515585},{"x":949,"y":-470,"length":1059.009442828533},{"x":942,"y":-386,"length":1018.0176815753251},{"x":917,"y":-286,"length":960.5649379401686},{"x":877,"y":-195,"length":898.4174976034249},{"x":833,"y":-122,"length":841.8865719323477},{"x":775,"y":-54,"length":776.8790124594691},{"x":707,"y":11,"length":707.0855676649044},{"x":634,"y":65,"length":637.3233088472443},{"x":560,"y":102,"length":569.2134924613084},{"x":468,"y":140,"length":488.49155571002456},{"x":374,"y":156,"length":405.2307984346698},{"x":284,"y":161,"length":326.4613300224086},{"x":188,"y":152,"length":241.76021178018522},{"x":100,"y":135,"length":168.00297616411441},{"x":22,"y":108,"length":110.21796586763884},{"x":-42,"y":73,"length":84.21995013059554},{"x":-40,"y":45,"length":60.207972893961475},{"x":-25,"y":15,"length":29.154759474226502}],"y":-217},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6560,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-447,"y":-2366,"length":2407.8548544295604},{"x":-280,"y":-2380,"length":2396.4139876073164},{"x":5650,"y":-3370,"length":6578.708079858841},{"x":9835,"y":-3020,"length":10288.227495540716},{"x":10644,"y":-1492,"length":10748.060290117468},{"x":8167,"y":-1480,"length":8300.017409620295},{"x":6520,"y":-523,"length":6540.9425161822055},{"x":6828,"y":-12,"length":6828.010544807324},{"x":6827,"y":260,"length":6831.949136227523},{"x":6735,"y":360,"length":6744.6145182656655},{"x":5752,"y":361,"length":5763.317187176149},{"x":5667,"y":277,"length":5673.765768869914},{"x":5667,"y":-7,"length":5667.004323273452},{"x":5580,"y":-104,"length":5580.969091475064},{"x":5112,"y":-102,"length":5113.017504370585},{"x":5050,"y":-175,"length":5053.031268456589},{"x":5053,"y":-501,"length":5077.776088013335},{"x":4661,"y":-863,"length":4740.220459008209},{"x":3905,"y":-859,"length":3998.3629149940853},{"x":3443,"y":-493,"length":3478.1170193080047},{"x":3430,"y":-182,"length":3434.82517750176},{"x":3355,"y":-127,"length":3357.4028653112214},{"x":3127,"y":-122,"length":3129.3790118807915},{"x":3010,"y":6,"length":3010.005980060505},{"x":3010,"y":580,"length":3065.371103145588},{"x":2515,"y":582,"length":2581.462569939762},{"x":1140,"y":-22,"length":1140.212260940918},{"x":452,"y":-24,"length":452.6367196770496},{"x":444,"y":-75,"length":450.28990661572686},{"x":427,"y":-120,"length":443.5414298574599},{"x":410,"y":-153,"length":437.61741281626354},{"x":383,"y":-184,"length":424.90587192930155},{"x":360,"y":-206,"length":414.77222664976017},{"x":335,"y":-225,"length":403.54677547962143},{"x":304,"y":-242,"length":388.5614494516923},{"x":275,"y":-251,"length":372.3251267373718},{"x":236,"y":-258,"length":349.6569747624091},{"x":199,"y":-259,"length":326.6221058042459},{"x":167,"y":-256,"length":305.6550343115585},{"x":134,"y":-248,"length":281.8865019826242},{"x":96,"y":-231,"length":250.15395259719563},{"x":64,"y":-210,"length":219.5358740616212},{"x":33,"y":-183,"length":185.9516066077408},{"x":10,"y":-154,"length":154.3243337908834},{"x":-7,"y":-123,"length":123.1990259701756},{"x":-21,"y":-87,"length":89.49860334105779},{"x":-28,"y":-49,"length":56.43580423808985},{"x":-29,"y":-7,"length":29.832867780352597},{"x":-26,"y":23,"length":34.713109915419565},{"x":-16,"y":58,"length":60.166435825965294},{"x":-3,"y":89,"length":89.05054744357274},{"x":15,"y":121,"length":121.92620719107111},{"x":38,"y":145,"length":149.8966310495336},{"x":65,"y":170,"length":182.00274723201295},{"x":90,"y":187,"length":207.53072061745462},{"x":117,"y":200,"length":231.70886905770354},{"x":146,"y":210,"length":255.76551761330143},{"x":177,"y":216,"length":279.2579452764057},{"x":200,"y":219,"length":296.5821977125397},{"x":226,"y":217,"length":313.31294259892934},{"x":256,"y":214,"length":333.66450215748154},{"x":279,"y":209,"length":348.6000573723418},{"x":291,"y":216,"length":362.4044701711059},{"x":292,"y":825,"length":875.1508441405973},{"x":286,"y":943,"length":985.4161557433489},{"x":281,"y":1003,"length":1041.6189322396172},{"x":267,"y":1055,"length":1088.261917003439},{"x":250,"y":1104,"length":1131.952295814625},{"x":218,"y":1159,"length":1179.3239588849199},{"x":189,"y":1190,"length":1204.9153497237887},{"x":156,"y":1219,"length":1228.9414143888227},{"x":121,"y":1248,"length":1253.8520646392062},{"x":85,"y":1267,"length":1269.8480224026812},{"x":38,"y":1289,"length":1289.5600024814667},{"x":-7,"y":1300,"length":1300.0188460172415},{"x":-60,"y":1309,"length":1310.3743739863048},{"x":-114,"y":1305,"length":1309.9698469812197},{"x":-168,"y":1299,"length":1309.8186897429734},{"x":-214,"y":1285,"length":1302.697585781136},{"x":-264,"y":1260,"length":1287.3600894854555},{"x":-309,"y":1229,"length":1267.2497780627148},{"x":-349,"y":1196,"length":1245.8800102738626},{"x":-389,"y":1148,"length":1212.1159185490471},{"x":-414,"y":1097,"length":1172.5207887282852},{"x":-434,"y":1050,"length":1136.158439655315},{"x":-450,"y":1000,"length":1096.5856099730654},{"x":-1516,"y":1000,"length":1816.110128819285},{"x":-1524,"y":934,"length":1787.4372716266157},{"x":-1537,"y":877,"length":1769.6039104839251},{"x":-1565,"y":808,"length":1761.2748223942792},{"x":-1601,"y":740,"length":1763.7462969486287},{"x":-1644,"y":673,"length":1776.419150988865},{"x":-1701,"y":602,"length":1804.3849367582295},{"x":-1749,"y":561,"length":1836.7694466099986},{"x":-1796,"y":522,"length":1870.320828093405},{"x":-1847,"y":492,"length":1911.4060269864171},{"x":-1911,"y":456,"length":1964.6518775599916},{"x":-1973,"y":431,"length":2019.527172384665},{"x":-2078,"y":406,"length":2117.2907216535004},{"x":-2162,"y":397,"length":2198.1476292551415},{"x":-2232,"y":398,"length":2267.207092437742},{"x":-2299,"y":406,"length":2334.574265256944},{"x":-2360,"y":418,"length":2396.731941623844},{"x":-2424,"y":439,"length":2463.4319556261344},{"x":-2498,"y":468,"length":2541.461784091982},{"x":-2611,"y":537,"length":2665.6500145367922},{"x":-2708,"y":628,"length":2779.8647449111622},{"x":-2784,"y":744,"length":2881.6994985598344},{"x":-2830,"y":843,"length":2952.888247123484},{"x":-2858,"y":941,"length":3008.927549809068},{"x":-2873,"y":1047,"length":3057.832238694595},{"x":-2883,"y":1143,"length":3101.3123028808304},{"x":-2900,"y":1230,"length":3150.0634914236252},{"x":-2962,"y":1346,"length":3253.4842861154257},{"x":-3244,"y":1751,"length":3686.398920355745},{"x":-3306,"y":1820,"length":3773.8622126410496},{"x":-3371,"y":1878,"length":3858.824302815561},{"x":-3447,"y":1923,"length":3947.117682562809},{"x":-3505,"y":1943,"length":4007.5271677182677},{"x":-3566,"y":1957,"length":4067.702668583337},{"x":-3628,"y":1963,"length":4125.015515122337},{"x":-3695,"y":1962,"length":4183.595224206089},{"x":-3770,"y":1951,"length":4244.914722347199},{"x":-3840,"y":1925,"length":4295.488912801428},{"x":-3903,"y":1893,"length":4337.840246021055},{"x":-3957,"y":1853,"length":4369.377301172331},{"x":-4017,"y":1797,"length":4400.624728376642},{"x":-4071,"y":1726,"length":4421.777583732587},{"x":-4111,"y":1655,"length":4431.630174100723},{"x":-4137,"y":1537,"length":4413.291062234623},{"x":-4191,"y":1446,"length":4433.440763109394},{"x":-4248,"y":1384,"length":4467.769018201367},{"x":-4377,"y":1311,"length":4569.119171131346},{"x":-4517,"y":1320,"length":4705.920632564897},{"x":-4651,"y":1362,"length":4846.322832829031},{"x":-5397,"y":1955,"length":5740.177174965944},{"x":-6582,"y":1962,"length":6868.199764130336},{"x":-6580,"y":2251,"length":6954.3799867421685},{"x":-6860,"y":2260,"length":7222.68648080477},{"x":-6871,"y":1702,"length":7078.661243483827},{"x":-6875,"y":384,"length":6885.715721695167},{"x":-4168,"y":-28,"length":4168.094048842948}],"y":-1850},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":6650,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-370,"density":"1","height":1309.5,"action":0,"isStatic":true,"wireframe":false,"width":433.15,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":7,"y":7,"length":9.899494936611665},{"x":50,"y":-9,"length":50.80354318352215},{"x":99,"y":-36,"length":105.34229919647663},{"x":158,"y":-72,"length":173.63179432350518},{"x":208,"y":-113,"length":236.7129062810053},{"x":251,"y":-156,"length":295.52834043455124},{"x":293,"y":-208,"length":359.3229744950913},{"x":327,"y":-261,"length":418.3897704294406},{"x":353,"y":-311,"length":470.45722441046644},{"x":375,"y":-370,"length":526.806416058119},{"x":390,"y":-444,"length":590.9619277076993},{"x":397,"y":-504,"length":641.5800807381726},{"x":393,"y":-1266,"length":1325.5960923297866}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":10830,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":2,"vertices":[{"x":-137,"y":-6,"length":137.13132391981054},{"x":-55,"y":2,"length":55.036351623268054},{"x":28,"y":0,"length":28},{"x":105,"y":-10,"length":105.47511554864494},{"x":198,"y":-33,"length":200.73116349984124},{"x":275,"y":-61,"length":281.6842203603177},{"x":355,"y":-104,"length":369.92026167810815},{"x":431,"y":-163,"length":460.792795082562},{"x":491,"y":-218,"length":537.2196943523198},{"x":540,"y":-281,"length":608.737217524935},{"x":582,"y":-340,"length":674.0356073680381},{"x":618,"y":-412,"length":742.7435627455818},{"x":642,"y":-470,"length":795.6531907810086},{"x":661,"y":-544,"length":856.0706746525079},{"x":670,"y":-600,"length":899.388681271896},{"x":674,"y":-665,"length":946.8373672389572},{"x":766,"y":-666,"length":1015.0428562381},{"x":762,"y":-600,"length":969.8680322600596},{"x":753,"y":-535,"length":923.7066633948247},{"x":737,"y":-463,"length":870.366589432292},{"x":718,"y":-406,"length":824.8393783034368},{"x":694,"y":-351,"length":777.7126718782458},{"x":674,"y":-311,"length":742.2917216297108},{"x":635,"y":-248,"length":681.7103490486264},{"x":591,"y":-188,"length":620.1814250685037},{"x":547,"y":-142,"length":565.1309582742747},{"x":505,"y":-104,"length":515.59771139911},{"x":462,"y":-65,"length":466.5501044903966},{"x":407,"y":-27,"length":407.89459422747933},{"x":349,"y":9,"length":349.11602655850675},{"x":274,"y":44,"length":277.5103601669675},{"x":204,"y":66,"length":214.41082062246764},{"x":144,"y":80,"length":164.730082255792},{"x":80,"y":93,"length":122.67436570041843},{"x":0,"y":100,"length":100},{"x":-77,"y":97,"length":123.84667940643382},{"x":-157,"y":86,"length":179.0111728356641}],"y":-1234},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":16018,"rotation":54,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":3,"vertices":[{"x":-440,"y":-290,"length":526.9724850502159},{"x":60,"y":70,"length":92.19544457292888},{"x":100,"y":95,"length":137.93114224133723},{"x":130,"y":75,"length":150.08331019803634},{"x":605,"y":-215,"length":642.0669746996804},{"x":640,"y":-235,"length":681.7807565486137},{"x":705,"y":-190,"length":730.1540933255117},{"x":685,"y":-165,"length":704.5920805686081},{"x":-50,"y":855,"length":856.4607404896035},{"x":-75,"y":890,"length":893.1545219053644},{"x":-130,"y":845,"length":854.9415184677839},{"x":-123,"y":810,"length":819.2856644663082},{"x":-27,"y":291,"length":292.2498930709813},{"x":-20,"y":260,"length":260.76809620810593},{"x":-60,"y":230,"length":237.69728648009425},{"x":-555,"y":-135,"length":571.1829829397931}],"y":-3787},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":15250,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-2495,"density":"1","height":69,"action":0,"isStatic":true,"wireframe":false,"width":1347,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1334,"y":-5,"length":1334.0093702819331}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":5234,"y":-433,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":7250,"y":-1690,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":12130,"y":-1146,"width":9.3,"height":128.35},"className":"SignPillar"}],[{"params":{"x":6598,"rotation":-11,"y":-375,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":6716,"rotation":-27,"y":-416,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":7018,"rotation":-90,"y":-902,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":7018,"rotation":-90,"y":-1292,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":7012,"rotation":-80.00000000000003,"y":-807,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":7018,"rotation":-90,"y":-1552,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":6771,"rotation":-34.00000000000001,"y":-448,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":7018,"rotation":-90,"y":-1422,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":7018,"rotation":-90,"y":-1812,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":6996,"rotation":-72.00000000000001,"y":-745,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":7018,"rotation":-90,"y":-1682,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":6867,"rotation":-46.00000000000001,"y":-529,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":6973,"rotation":-66.00000000000001,"y":-686,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":7018,"rotation":-90,"y":-1162,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":6659,"rotation":-20,"y":-391,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":6908,"rotation":-53.000000000000014,"y":-577,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":6944,"rotation":-59.000000000000014,"y":-630,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":6821,"rotation":-40.00000000000001,"y":-486,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":7018,"rotation":-90,"y":-1032,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":2863,"rotation":3.999999999999986,"y":384,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2991,"rotation":-6.000000000000015,"y":381,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2927,"rotation":-2.000000000000014,"y":385,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3423,"rotation":-48.99999999999999,"y":149,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3380,"rotation":-45,"y":194,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3535,"rotation":-57,"y":-7,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3499,"rotation":-54.99999999999999,"y":47,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3054,"rotation":-11.000000000000014,"y":372,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3174,"rotation":-23.000000000000018,"y":334,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3569,"rotation":-58.00000000000001,"y":-61,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3283,"rotation":-35,"y":275,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3230,"rotation":-29.000000000000004,"y":307,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3463,"rotation":-53.999999999999986,"y":98,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3333,"rotation":-39.99999999999999,"y":237,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3115,"rotation":-18.000000000000014,"y":356,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2511,"rotation":37.99999999999999,"y":257,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2618,"rotation":24.999999999999982,"y":323,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2563,"rotation":31.999999999999982,"y":293,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2675,"rotation":18.999999999999982,"y":346,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2736,"rotation":13.999999999999986,"y":364,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2799,"rotation":8.999999999999986,"y":377,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"speed":1000,"x":6950,"rotation":0,"y":-1090,"safeId":1,"id":42,"rate":1,"width":200,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":6950,"rotation":0,"y":-1250,"safeId":1,"id":42,"rate":1,"width":200,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":6950,"rotation":0,"y":-1410,"safeId":1,"id":42,"rate":1,"width":200,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":6950,"rotation":0,"y":-1570,"safeId":1,"id":42,"rate":1,"width":200,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":11160,"rotation":-33,"y":-2140,"safeId":-1,"id":43,"rate":1,"width":571,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":10816,"rotation":-90,"y":-2320,"safeId":-1,"id":43,"rate":1,"width":571,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":10490,"rotation":-141,"y":-2170,"safeId":-1,"id":43,"rate":1,"width":571,"height":128},"className":"GeyserE"},{"params":{"speed":3000,"x":13704,"rotation":-117,"y":-1423,"safeId":-1,"id":44,"rate":1,"width":689,"height":128},"className":"GeyserE"},{"params":{"x":13207,"stones":false,"physic":true,"impulse":5000,"id":31,"radius":64,"y":-1058,"height":53.2,"width":53.2,"safeId":3,"rotation":0,"count":20},"className":"Tnt1"},{"params":{"speed":1400,"x":13664,"rotation":-30,"y":-2434,"safeId":-1,"id":44,"rate":1,"width":1068,"height":128},"className":"GeyserE"},{"params":{"speed":1400,"x":13745,"rotation":-30,"y":-2305,"safeId":-1,"id":44,"rate":1,"width":1070,"height":128},"className":"GeyserE"},{"params":{"speed":1400,"x":13574,"rotation":-30,"y":-2564,"safeId":-1,"id":44,"rate":1,"width":1068,"height":128},"className":"GeyserE"},{"params":{"speed":1900,"x":13843,"rotation":-117,"y":-1491,"safeId":-1,"id":44,"rate":1,"width":689,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":6950,"rotation":0,"y":-931,"safeId":1,"id":42,"rate":1,"width":200,"height":128},"className":"GeyserE"}],null,[{"params":{"x":277,"rotation":0,"y":300,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":5231,"rotation":0,"y":-510,"id":1,"width":128,"height":889},"className":"SafePointE"},{"params":{"x":7250,"rotation":0,"y":-1750,"id":2,"width":128,"height":505},"className":"SafePointE"},{"params":{"x":12130,"rotation":0,"y":-1220,"id":3,"width":128,"height":2003},"className":"SafePointE"}],[{"params":{"x":4770,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-340,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4920,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-970,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4810,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":-1190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4370,"rotation":0,"graphic":0,"id":12,"y":-770,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":23,"useWeld":false},"className":"MotorJointE"},{"params":{"x":3620,"sndId":-1,"rotation":0,"y":-360,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":12,"width":64,"height":1608},"className":"ToggleE"},{"params":{"x":10870,"rotation":0,"graphic":0,"safeId":2,"id":-1,"y":-1190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":11550,"rotation":0,"graphic":0,"safeId":2,"id":-1,"y":-1840,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":10816,"rotation":0,"graphic":2,"id":25,"y":-1920,"height":17,"width":17,"time":2.5,"safeId":2,"snd":false,"rate":33,"useWeld":false},"className":"MotorJointE"},{"params":{"x":11200,"rotation":0,"graphic":0,"safeId":2,"id":25,"y":-1800,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":11530,"sndId":-1,"rotation":0,"y":-2140,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":25,"width":889,"height":64},"className":"ToggleE"},{"params":{"x":13320,"sndId":-1,"rotation":0,"y":-1220,"fnl":false,"safeId":3,"id_off":-1,"off":false,"id":31,"width":64,"height":1138},"className":"ToggleE"},{"params":{"x":11550,"sndId":-1,"rotation":0,"y":-1240,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":9,"width":64,"height":1138},"className":"ToggleE"},{"params":{"x":14796,"rotation":0,"graphic":2,"id":31,"y":-1720,"height":17,"width":17,"time":0,"safeId":3,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":15581,"sndId":-1,"rotation":0,"y":-2973,"fnl":false,"safeId":3,"id_off":-1,"off":false,"id":41,"width":64,"height":762},"className":"ToggleE"},{"params":{"x":15891,"active":0,"y":-3543,"cycle":0,"body":false,"id":41,"position":0,"width":13,"height":845,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":-96,"length":96},{"x":0,"y":736,"length":736}],"sideWait":0,"safeId":3,"startTime":"0","rotation":0,"speed":2000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":6470,"sndId":0,"rotation":0,"y":-1860,"fnl":false,"safeId":1,"id_off":-1,"off":false,"id":0,"width":414,"height":64},"className":"ToggleE"},{"params":{"x":10840,"sndId":0,"rotation":0,"y":-1380,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":129,"height":954},"className":"ToggleE"},{"params":{"x":13720,"sndId":0,"rotation":0,"y":-2580,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":129,"height":954},"className":"ToggleE"},{"params":{"x":5880,"sndId":-1,"rotation":0,"y":-550,"fnl":false,"safeId":-1,"id_off":11,"off":false,"id":0,"width":64,"height":1694},"className":"ToggleE"},{"params":{"x":8170,"sndId":-1,"rotation":0,"y":-1610,"fnl":false,"safeId":2,"id_off":12,"off":false,"id":0,"width":64,"height":3097},"className":"ToggleE"},{"params":{"x":6260,"sndId":-1,"rotation":0,"y":-650,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":42,"width":64,"height":1419},"className":"ToggleE"},{"params":{"x":8330,"sndId":-1,"rotation":0,"y":-1450,"fnl":false,"safeId":-1,"id_off":42,"off":false,"id":43,"width":64,"height":2929},"className":"ToggleE"},{"params":{"x":12450,"sndId":-1,"rotation":0,"y":-1420,"fnl":false,"safeId":-1,"id_off":43,"off":false,"id":44,"width":64,"height":971},"className":"ToggleE"}]],"settings":{"prizes":"34,41,49","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map10.json b/motox3mspooky/assets/levels/map10.json deleted file mode 100644 index 74e6fa59..00000000 --- a/motox3mspooky/assets/levels/map10.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"stretchTexture":false,"x":5031,"rotation":-90,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-333,"density":"1","height":208,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":195,"length":195}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":5061,"rotation":-90,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-583,"density":"1","height":173,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":160,"length":160}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4155,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-219,"density":"1","height":168,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":155,"length":155}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4309,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-219,"density":"1","height":168,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":155,"length":155}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":5071,"rotation":-90,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-463,"density":"1","height":158,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":145,"length":145}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4481,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-219,"density":"1","height":168,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":155,"length":155}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4981,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-273,"density":"1","height":208,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":195,"length":195}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4651,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-219,"density":"1","height":168,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":155,"length":155}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4821,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-219,"density":"1","height":168,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":155,"length":155}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2810,"rotation":-11.000000000000004,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":238,"density":"1","height":17,"action":0,"isStatic":true,"wireframe":false,"width":643,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":75,"y":0,"length":75},{"x":175,"y":0,"length":175},{"x":280,"y":0,"length":280},{"x":380,"y":0,"length":380},{"x":480,"y":0,"length":480},{"x":580,"y":0,"length":580},{"x":630,"y":0,"length":630}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3620,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-520,"density":"1","height":165,"action":0,"isStatic":true,"wireframe":false,"width":307,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":67,"y":-35,"length":75.59100475585703},{"x":136,"y":-68,"length":152.0526224699857},{"x":205,"y":-103,"length":229.42101037176172},{"x":252,"y":-127,"length":282.1931962326519},{"x":294,"y":-150,"length":330.0545409474016}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2210,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-65,"density":"1","height":63.1,"action":0,"isStatic":true,"wireframe":false,"width":114,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":35,"y":19,"length":39.824615503479755},{"x":84,"y":65,"length":106.21205204683694},{"x":136,"y":34,"length":140.18559127100045}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1340,"rotation":0,"y":-480,"originOffsetRatio":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"height":228,"wireframe":false,"width":78,"vertices":[{"x":0,"y":0,"length":0},{"x":-65,"y":215,"length":224.61077445216202}],"textureMode":true,"smoothing":true,"straightSides":true,"type":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"stretchTexture":false,"x":1810,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-160,"density":"1","height":85,"action":0,"isStatic":true,"wireframe":false,"width":213.4,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-185,"y":-70,"length":197.80040444852483},{"x":-160,"y":-35,"length":163.783393541592},{"x":-135,"y":0,"length":135},{"x":-85,"y":0,"length":85},{"x":-40,"y":0,"length":40},{"x":15,"y":0,"length":15}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1750,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-90,"density":"1","height":160,"action":0,"isStatic":true,"wireframe":false,"width":353.4,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-240,"y":-145,"length":280.40149785619906},{"x":-215,"y":-110,"length":241.50569351466643},{"x":-185,"y":-70,"length":197.80040444852483},{"x":-160,"y":-35,"length":163.783393541592},{"x":-135,"y":0,"length":135},{"x":-85,"y":0,"length":85},{"x":-15,"y":0,"length":15},{"x":45,"y":0,"length":45},{"x":100,"y":0,"length":100}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2200,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-5,"density":"1","height":88.05,"action":0,"isStatic":true,"wireframe":false,"width":175,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":3,"y":-6,"length":6.708203932499369},{"x":42,"y":29,"length":51.03920062069938},{"x":84,"y":65,"length":106.21205204683694},{"x":125,"y":39,"length":130.9427355755179},{"x":165,"y":12,"length":165.43578814754684}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3770,"rotation":0,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1150,"density":"1","height":622,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":135,"y":-202,"length":242.9588442514493},{"x":135,"y":407,"length":428.8053171312128}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3580,"rotation":0,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1150,"density":"1","height":622,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":155,"y":-202,"length":254.61539623518448},{"x":155,"y":407,"length":435.5157861662422}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":-60,"physic":true,"lineId":0,"y":390,"height":574.1,"isRoad":true,"direction":90,"width":6333,"textureMode":true,"cameraOffsetY":80,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":-475,"y":0,"length":475},{"x":3630,"y":20,"length":3630.0550960006103},{"x":4070,"y":-490,"length":4099.390198553926},{"x":5845,"y":-485,"length":5865.087382128249}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":720,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":400,"density":"1","height":460,"action":0,"isStatic":true,"wireframe":false,"width":2966,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-11,"y":11,"length":15.556349186104045},{"x":38,"y":-37,"length":53.03772242470448},{"x":90,"y":-87,"length":125.1758762701504},{"x":158,"y":-156,"length":222.03603311174518},{"x":231,"y":-229,"length":325.27219370859234},{"x":298,"y":-297,"length":420.7291290129553},{"x":361,"y":-362,"length":511.238691806479},{"x":434,"y":-434,"length":613.7686860699232},{"x":498,"y":-434,"length":660.5755066606694},{"x":571,"y":-434,"length":717.2147516608954},{"x":609,"y":-392,"length":724.2547894215129},{"x":648,"y":-348,"length":735.5324601946538},{"x":693,"y":-297,"length":753.9615374805269},{"x":741,"y":-245,"length":780.4524328874886},{"x":768,"y":-222,"length":799.442305610605},{"x":799,"y":-201,"length":823.8944107104987},{"x":838,"y":-181,"length":857.3243260283707},{"x":874,"y":-170,"length":890.3796942877797},{"x":911,"y":-166,"length":926.000539956646},{"x":948,"y":-166,"length":962.4240229753203},{"x":986,"y":-169,"length":1000.3784283959745},{"x":1029,"y":-181,"length":1044.797588052346},{"x":1083,"y":-208,"length":1102.793271651582},{"x":1136,"y":-234,"length":1159.84999030047},{"x":1185,"y":-258,"length":1212.7608997654897},{"x":1229,"y":-280,"length":1260.4923641180853},{"x":1267,"y":-249,"length":1291.2358421295469},{"x":1304,"y":-218,"length":1322.0968194500733},{"x":1341,"y":-188,"length":1354.1141015438839},{"x":1370,"y":-165,"length":1379.9003587215998},{"x":1401,"y":-140,"length":1407.9776276631671},{"x":1432,"y":-121,"length":1437.1029886546057},{"x":1463,"y":-106,"length":1466.8350282155113},{"x":1502,"y":-94,"length":1504.9385369509282},{"x":1540,"y":-88,"length":1542.5122365803131},{"x":1581,"y":-87,"length":1583.391928740323},{"x":1619,"y":-92,"length":1621.6118524480512},{"x":1649,"y":-101,"length":1652.0901912425968},{"x":1678,"y":-113,"length":1681.8005232488185},{"x":1721,"y":-137,"length":1726.4443228786731},{"x":1761,"y":-159,"length":1768.163453982691},{"x":1811,"y":-132,"length":1815.8042295357725},{"x":1865,"y":-104,"length":1867.8974811268417},{"x":1914,"y":-77,"length":1915.5482243994797},{"x":1972,"y":-47,"length":1972.560011761366},{"x":2009,"y":-29,"length":2009.2092972112189},{"x":2045,"y":-19,"length":2045.0882621539834},{"x":2086,"y":-14,"length":2086.046979336755},{"x":2137,"y":-14,"length":2137.0458581883545},{"x":2194,"y":-23,"length":2194.120552750008},{"x":2264,"y":-37,"length":2264.302320804358},{"x":2348,"y":-54,"length":2348.6208719161123},{"x":2434,"y":-72,"length":2435.0646808657875},{"x":2519,"y":-90,"length":2520.6072681002884},{"x":2601,"y":-107,"length":2603.1999539028884},{"x":2687,"y":-125,"length":2689.9059463111344},{"x":2781,"y":-144,"length":2784.7256597374185},{"x":2827,"y":-154,"length":2831.1914453106133},{"x":2859,"y":-129,"length":2861.908803578479},{"x":2894,"y":-103,"length":2895.8323501197374},{"x":2942,"y":-66,"length":2942.7402195912573}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1280,"rotation":-96,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":420,"y":0,"length":420},{"x":420,"y":35,"length":421.4558102577303},{"x":0,"y":35,"length":35}],"y":-53},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":950,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-280,"density":"1","height":582,"action":0,"isStatic":true,"wireframe":false,"width":1057.05,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":546,"y":38,"length":547.3207469117172},{"x":590,"y":45,"length":591.7136131609615},{"x":635,"y":49,"length":636.887745211038},{"x":678,"y":49,"length":679.7683428933713},{"x":722,"y":40,"length":723.1071843094909},{"x":751,"y":29,"length":751.5597115332886},{"x":783,"y":13,"length":783.1079108271094},{"x":822,"y":-13,"length":822.1027916264486},{"x":851,"y":-40,"length":851.9395518462563},{"x":875,"y":-74,"length":878.1235676144901},{"x":893,"y":-109,"length":899.627700774048},{"x":909,"y":-155,"length":922.1203825965458},{"x":915,"y":-203,"length":937.2480994912713},{"x":912,"y":-256,"length":947.2486473994038},{"x":902,"y":-293,"length":948.3949599191257},{"x":883,"y":-333,"length":943.704402872001},{"x":858,"y":-371,"length":934.7753740872723},{"x":828,"y":-402,"length":920.4281612380187},{"x":802,"y":-422,"length":906.2494137929139},{"x":773,"y":-440,"length":889.4543271017349},{"x":743,"y":-453,"length":870.2057228035219},{"x":717,"y":-460,"length":851.8738169470876},{"x":688,"y":-463,"length":829.2846314746222},{"x":658,"y":-465,"length":805.7226569980517},{"x":622,"y":-463,"length":775.4050554387687},{"x":591,"y":-456,"length":746.4696912802287},{"x":561,"y":-447,"length":717.3074654567594},{"x":534,"y":-434,"length":688.1220821918157},{"x":513,"y":-421,"length":663.6339352383964},{"x":493,"y":-405,"length":638.0235105386008},{"x":470,"y":-381,"length":605.0297513345935},{"x":452,"y":-358,"length":576.6003815468735},{"x":436,"y":-333,"length":548.620998504432},{"x":425,"y":-312,"length":527.2276548133643},{"x":412,"y":-278,"length":497.01911432056613},{"x":404,"y":-239,"length":469.40068172085137},{"x":399,"y":-203,"length":447.6717547489455},{"x":379,"y":-203,"length":429.94185653411324},{"x":384,"y":-238,"length":451.7742799230607},{"x":385,"y":-272,"length":471.3904962979207},{"x":382,"y":-303,"length":487.57871159434353},{"x":376,"y":-330,"length":500.27592386602015},{"x":366,"y":-360,"length":513.3770544151735},{"x":350,"y":-390,"length":524.0229002629561},{"x":330,"y":-418,"length":532.5636112240489},{"x":308,"y":-442,"length":538.7281318067584},{"x":284,"y":-464,"length":544.0147056835872},{"x":258,"y":-482,"length":546.7065026136053},{"x":228,"y":-496,"length":545.8937625582472},{"x":196,"y":-507,"length":543.566923202654},{"x":163,"y":-514,"length":539.2262975782987},{"x":132,"y":-516,"length":532.6161845081315},{"x":100,"y":-514,"length":523.6372790396039},{"x":70,"y":-509,"length":513.7908134640011},{"x":39,"y":-500,"length":501.51869356984093},{"x":9,"y":-486,"length":486.08332619006796},{"x":-22,"y":-467,"length":467.5179140952783},{"x":-48,"y":-445,"length":447.5812775351534},{"x":-73,"y":-416,"length":422.35648450094857},{"x":-95,"y":-382,"length":393.6356183070836},{"x":-106,"y":-357,"length":372.40435013570936},{"x":-116,"y":-327,"length":346.96541614403014},{"x":-124,"y":-286,"length":311.7242371070944},{"x":-125,"y":-249,"length":278.61442891566116},{"x":-121,"y":-216,"length":247.58230954573472},{"x":-115,"y":-189,"length":221.23742902140225},{"x":-107,"y":-166,"length":197.4968354176846},{"x":-96,"y":-140,"length":169.75276139138356},{"x":-81,"y":-116,"length":141.4814475470194},{"x":-55,"y":-85,"length":101.24228365658294},{"x":-25,"y":-58,"length":63.15853069855251},{"x":0,"y":-38,"length":38},{"x":27,"y":-24,"length":36.124783736376884},{"x":61,"y":-15,"length":62.81719509815764},{"x":102,"y":-7,"length":102.23991392797629}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1940,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":30,"density":"1","height":501.75,"action":0,"isStatic":true,"wireframe":false,"width":527,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":245,"y":-30,"length":246.82990094394967},{"x":276,"y":-49,"length":280.31589323475754},{"x":302,"y":-72,"length":310.46416862497995},{"x":321,"y":-91,"length":333.64951670877633},{"x":339,"y":-114,"length":357.6548615634911},{"x":354,"y":-136,"length":379.2255265669757},{"x":367,"y":-164,"length":401.9763674645563},{"x":379,"y":-203,"length":429.94185653411324},{"x":384,"y":-238,"length":451.7742799230607},{"x":385,"y":-272,"length":471.3904962979207},{"x":382,"y":-303,"length":487.57871159434353},{"x":376,"y":-330,"length":500.27592386602015},{"x":366,"y":-360,"length":513.3770544151735},{"x":350,"y":-390,"length":524.0229002629561},{"x":330,"y":-418,"length":532.5636112240489},{"x":308,"y":-442,"length":538.7281318067584},{"x":284,"y":-464,"length":544.0147056835872},{"x":258,"y":-482,"length":546.7065026136053},{"x":228,"y":-496,"length":545.8937625582472},{"x":196,"y":-507,"length":543.566923202654},{"x":163,"y":-514,"length":539.2262975782987},{"x":132,"y":-516,"length":532.6161845081315},{"x":100,"y":-514,"length":523.6372790396039},{"x":70,"y":-509,"length":513.7908134640011},{"x":39,"y":-500,"length":501.51869356984093},{"x":9,"y":-486,"length":486.08332619006796},{"x":-22,"y":-467,"length":467.5179140952783},{"x":-48,"y":-445,"length":447.5812775351534},{"x":-73,"y":-416,"length":422.35648450094857},{"x":-95,"y":-382,"length":393.6356183070836},{"x":-106,"y":-357,"length":372.40435013570936},{"x":-116,"y":-327,"length":346.96541614403014},{"x":-124,"y":-286,"length":311.7242371070944},{"x":-125,"y":-249,"length":278.61442891566116},{"x":-121,"y":-216,"length":247.58230954573472},{"x":-115,"y":-189,"length":221.23742902140225},{"x":-107,"y":-166,"length":197.4968354176846},{"x":-96,"y":-140,"length":169.75276139138356},{"x":-81,"y":-116,"length":141.4814475470194}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2452,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":127,"density":"1","height":385.55,"action":0,"isStatic":true,"wireframe":false,"width":149,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":9,"y":-488,"length":488.082984747471},{"x":-22,"y":-467,"length":467.5179140952783},{"x":-48,"y":-445,"length":447.5812775351534},{"x":-73,"y":-416,"length":422.35648450094857},{"x":-95,"y":-382,"length":393.6356183070836},{"x":-106,"y":-357,"length":372.40435013570936},{"x":-116,"y":-327,"length":346.96541614403014},{"x":-124,"y":-286,"length":311.7242371070944},{"x":-125,"y":-249,"length":278.61442891566116},{"x":-121,"y":-216,"length":247.58230954573472},{"x":-115,"y":-189,"length":221.23742902140225},{"x":-107,"y":-166,"length":197.4968354176846},{"x":-96,"y":-140,"length":169.75276139138356},{"x":-81,"y":-116,"length":141.4814475470194}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2450,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":130,"density":"1","height":422.25,"action":0,"isStatic":true,"wireframe":false,"width":145,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":255,"y":-33,"length":257.12642804659345},{"x":276,"y":-49,"length":280.31589323475754},{"x":302,"y":-72,"length":310.46416862497995},{"x":321,"y":-91,"length":333.64951670877633},{"x":339,"y":-114,"length":357.6548615634911},{"x":354,"y":-136,"length":379.2255265669757},{"x":367,"y":-164,"length":401.9763674645563},{"x":379,"y":-203,"length":429.94185653411324},{"x":384,"y":-238,"length":451.7742799230607},{"x":385,"y":-272,"length":471.3904962979207},{"x":382,"y":-303,"length":487.57871159434353},{"x":376,"y":-330,"length":500.27592386602015},{"x":366,"y":-360,"length":513.3770544151735},{"x":350,"y":-390,"length":524.0229002629561},{"x":330,"y":-418,"length":532.5636112240489},{"x":308,"y":-442,"length":538.7281318067584}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2552,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":271,"density":"1","height":705.8,"action":0,"isStatic":true,"wireframe":false,"width":626,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":255,"y":-33,"length":257.12642804659345},{"x":287,"y":-52,"length":291.6727618410742},{"x":313,"y":-72,"length":321.1744074486633},{"x":341,"y":-96,"length":354.25555747228583},{"x":376,"y":-127,"length":396.86899601757756},{"x":413,"y":-159,"length":442.5494322671762},{"x":444,"y":-191,"length":483.3394252489652},{"x":468,"y":-223,"length":518.4139272820513},{"x":489,"y":-257,"length":552.4219401870276},{"x":503,"y":-286,"length":578.6233662755074},{"x":515,"y":-326,"length":609.5088186400587},{"x":522,"y":-368,"length":638.6767570532061},{"x":522,"y":-411,"length":664.3831725743812},{"x":520,"y":-453,"length":689.6441111181912},{"x":511,"y":-493,"length":710.0492940634474},{"x":500,"y":-522,"length":722.8305472238981},{"x":482,"y":-559,"length":738.1090705309074},{"x":461,"y":-590,"length":748.7462854665791},{"x":435,"y":-621,"length":758.1991822733654},{"x":413,"y":-641,"length":762.5286879849177},{"x":390,"y":-661,"length":767.4770354870561},{"x":364,"y":-679,"length":770.4135253226024},{"x":337,"y":-693,"length":770.5958733343957},{"x":307,"y":-706,"length":769.8603769515613},{"x":272,"y":-715,"length":764.9895424121822},{"x":238,"y":-721,"length":759.26609301351},{"x":192,"y":-723,"length":748.0594896129585},{"x":162,"y":-721,"length":738.9756423590699},{"x":124,"y":-715,"length":725.6727912771706},{"x":92,"y":-706,"length":711.9691004531026},{"x":61,"y":-696,"length":698.6680184465295},{"x":22,"y":-680,"length":680.355789274994},{"x":-19,"y":-662,"length":662.2726024832976},{"x":-54,"y":-647,"length":649.2495668077107},{"x":-89,"y":-632,"length":638.2358498235585}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3482,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":261,"density":"1","height":603.95,"action":0,"isStatic":true,"wireframe":false,"width":407,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-15,"y":-732,"length":732.1536723939859},{"x":-55,"y":-728,"length":730.0746537170018},{"x":-92,"y":-718,"length":723.8701541022396},{"x":-129,"y":-706,"length":717.6886511573107},{"x":-163,"y":-691,"length":709.964787859229},{"x":-194,"y":-672,"length":699.4426352460937},{"x":-228,"y":-647,"length":685.9978134075939},{"x":-260,"y":-618,"length":670.465509925753},{"x":-291,"y":-579,"length":648.0138887400485},{"x":-307,"y":-549,"length":629.0071541723512},{"x":-323,"y":-511,"length":604.5246066125018},{"x":-333,"y":-469,"length":575.1956188984752},{"x":-334,"y":-428,"length":542.8996223981004},{"x":-330,"y":-370,"length":495.7822102496216},{"x":-320,"y":-333,"length":461.8322206169682},{"x":-306,"y":-296,"length":425.7370080225584},{"x":-288,"y":-263,"length":390.0166663105565},{"x":-267,"y":-238,"length":357.67722879713773},{"x":-243,"y":-214,"length":323.79777639755343},{"x":-213,"y":-192,"length":286.76296832052776},{"x":-176,"y":-169,"length":244.00204917172314},{"x":-143,"y":-155,"length":210.8885961829136},{"x":-109,"y":-148,"length":183.8069639594757},{"x":-72,"y":-145,"length":161.8919392681427},{"x":-27,"y":-148,"length":150.44268011438774},{"x":15,"y":-156,"length":156.71949463930773},{"x":58,"y":-175,"length":184.36105879496353}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":2750,"rotation":0,"y":-590,"width":1121,"height":245},"className":"FinishZone"},{"params":{"stretchTexture":false,"x":3482,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":167,"density":"1","height":324.15,"action":0,"isStatic":true,"wireframe":false,"width":233.05,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":46,"y":-480,"length":482.19912899133277},{"x":16,"y":-490,"length":490.2611548960411},{"x":-11,"y":-493,"length":493.1227027829889},{"x":-46,"y":-488,"length":490.16323811563024},{"x":-79,"y":-477,"length":483.49767321053366},{"x":-107,"y":-462,"length":474.2288477096264},{"x":-131,"y":-439,"length":458.1288028491551},{"x":-147,"y":-416,"length":441.2085674598806},{"x":-159,"y":-394,"length":424.8729221779143},{"x":-168,"y":-367,"length":403.62482579742294},{"x":-172,"y":-337,"length":378.3556527924487},{"x":-170,"y":-310,"length":353.5533905932738},{"x":-164,"y":-282,"length":326.2207841324645},{"x":-154,"y":-256,"length":298.75073221667594},{"x":-139,"y":-233,"length":271.31162894354526},{"x":-120,"y":-212,"length":243.6062396573618},{"x":-98,"y":-199,"length":221.82200071228283},{"x":-72,"y":-190,"length":203.18464508914053},{"x":-41,"y":-186,"length":190.46521992216847},{"x":-9,"y":-191,"length":191.21192431435858},{"x":23,"y":-209,"length":210.261741645978},{"x":45,"y":-229,"length":233.37951923851415}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4400,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-220,"density":"1","height":484,"action":0,"isStatic":true,"wireframe":false,"width":955,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-265,"y":0,"length":265},{"x":-200,"y":0,"length":200},{"x":-130,"y":0,"length":130},{"x":-70,"y":0,"length":70},{"x":-5,"y":0,"length":5},{"x":60,"y":0,"length":60},{"x":115,"y":0,"length":115},{"x":185,"y":0,"length":185},{"x":245,"y":0,"length":245},{"x":305,"y":0,"length":305},{"x":365,"y":0,"length":365},{"x":434,"y":0,"length":434},{"x":472,"y":-9,"length":472.0857972868915},{"x":509,"y":-19,"length":509.3544934522518},{"x":539,"y":-34,"length":540.0712915902863},{"x":572,"y":-55,"length":574.6381470107949},{"x":599,"y":-78,"length":604.0571165047226},{"x":622,"y":-105,"length":630.8002853518695},{"x":642,"y":-133,"length":655.6317563998864},{"x":655,"y":-162,"length":674.7362447653156},{"x":667,"y":-194,"length":694.640194633164},{"x":674,"y":-231,"length":712.4864911000068},{"x":675,"y":-266,"length":725.521191971675},{"x":673,"y":-297,"length":735.6208262413456},{"x":666,"y":-329,"length":742.8303978702003},{"x":657,"y":-360,"length":749.1655357796433},{"x":642,"y":-386,"length":749.1061340023855},{"x":622,"y":-417,"length":748.8477815951651},{"x":600,"y":-441,"length":744.6348098229091},{"x":574,"y":-469,"length":741.2401770006804}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3540,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":290,"density":"1","height":81,"action":0,"isStatic":true,"wireframe":false,"width":2829,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":-2795,"y":102,"length":2796.8605614152452},{"x":21,"y":119,"length":120.83873551142449}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4061,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-480,"density":"1","height":300,"action":0,"isStatic":true,"wireframe":false,"width":402,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-132,"y":-280,"length":309.5545186231337},{"x":-142,"y":-245,"length":283.17662332897464},{"x":-145,"y":-202,"length":248.65437860612872},{"x":-143,"y":-166,"length":219.10043359153812},{"x":-135,"y":-132,"length":188.80942773071476},{"x":-120,"y":-98,"length":154.9322432549145},{"x":-102,"y":-74,"length":126.01587201618692},{"x":-84,"y":-51,"length":98.2700361249552},{"x":-52,"y":-27,"length":58.59180830116101},{"x":-25,"y":-11,"length":27.313000567495326},{"x":10,"y":-1,"length":10.04987562112089},{"x":51,"y":0,"length":51},{"x":83,"y":-3,"length":83.05419917138447},{"x":114,"y":-11,"length":114.5294721894762},{"x":142,"y":-25,"length":144.183910336764},{"x":169,"y":-43,"length":174.38463235044537},{"x":193,"y":-66,"length":203.9730374338726},{"x":212,"y":-92,"length":231.10170921046864},{"x":227,"y":-120,"length":256.76643082770767},{"x":237,"y":-153,"length":282.0957284327432},{"x":240,"y":-183,"length":301.8095425926755},{"x":239,"y":-213,"length":320.14059411452337},{"x":231,"y":-250,"length":340.3836071258427},{"x":218,"y":-285,"length":358.8161088914487}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3460,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-490,"density":"1","height":287,"action":0,"isStatic":true,"wireframe":false,"width":399.05,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-128,"y":-270,"length":298.80428377116687},{"x":-136,"y":-239,"length":274.98545416076104},{"x":-142,"y":-204,"length":248.55582873873627},{"x":-140,"y":-160,"length":212.60291625469299},{"x":-135,"y":-132,"length":188.80942773071476},{"x":-120,"y":-98,"length":154.9322432549145},{"x":-102,"y":-74,"length":126.01587201618692},{"x":-84,"y":-51,"length":98.2700361249552},{"x":-52,"y":-27,"length":58.59180830116101},{"x":-25,"y":-11,"length":27.313000567495326},{"x":10,"y":-1,"length":10.04987562112089},{"x":51,"y":0,"length":51},{"x":83,"y":-3,"length":83.05419917138447},{"x":114,"y":-11,"length":114.5294721894762},{"x":142,"y":-25,"length":144.183910336764},{"x":169,"y":-43,"length":174.38463235044537},{"x":193,"y":-66,"length":203.9730374338726},{"x":212,"y":-92,"length":231.10170921046864},{"x":227,"y":-120,"length":256.76643082770767},{"x":237,"y":-153,"length":282.0957284327432},{"x":240,"y":-183,"length":301.8095425926755},{"x":239,"y":-213,"length":320.14059411452337},{"x":230,"y":-244,"length":335.3147774852758},{"x":220,"y":-272,"length":349.83424646537964}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3560,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":420,"density":"1","height":560.1,"action":0,"isStatic":true,"wireframe":false,"width":500.2,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":452,"y":-518,"length":687.4794542384521}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2720,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-460,"density":"1","height":752,"action":0,"isStatic":true,"wireframe":false,"width":2508.05,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-1895,"y":-110,"length":1898.1899272728217},{"x":-1895,"y":-200,"length":1905.5248620786872},{"x":-1895,"y":-281,"length":1915.7207520930601},{"x":-1895,"y":-370,"length":1930.7835197142117},{"x":-1895,"y":-455,"length":1948.8586403328488},{"x":-1895,"y":-538,"length":1969.8906060997397},{"x":-1895,"y":-630,"length":1996.9789683419303},{"x":-1895,"y":-695,"length":2018.4276058357902},{"x":-1895,"y":-740,"length":2034.3610790614334},{"x":-1850,"y":-740,"length":1992.5109786397666},{"x":-1765,"y":-740,"length":1913.850830132798},{"x":-1685,"y":-740,"length":1840.3328503289833},{"x":-1595,"y":-740,"length":1758.3017374728377},{"x":-1515,"y":-740,"length":1686.0679108505683},{"x":-1425,"y":-740,"length":1605.6852119889502},{"x":-1340,"y":-740,"length":1530.7514494521963},{"x":-1255,"y":-740,"length":1456.9231276906823},{"x":-1165,"y":-740,"length":1380.1539769170686},{"x":-1080,"y":-740,"length":1309.1982279242513},{"x":-1000,"y":-740,"length":1244.0257232067188},{"x":-910,"y":-740,"length":1172.9023829799307},{"x":-820,"y":-740,"length":1104.536101718726},{"x":-740,"y":-740,"length":1046.5180361560904},{"x":-650,"y":-740,"length":984.9365461794988},{"x":-572,"y":-740,"length":935.2988827107621},{"x":-530,"y":-740,"length":910.2197536858888},{"x":-530,"y":-685,"length":866.0975695613052},{"x":-530,"y":-625,"length":819.4662897276495},{"x":-530,"y":-560,"length":771.0382610480494},{"x":-530,"y":-485,"length":718.4184017687743},{"x":-530,"y":-395,"length":661.0030257116831},{"x":-530,"y":-315,"length":616.5427803486145},{"x":-530,"y":-255,"length":588.1538914263851},{"x":-530,"y":-165,"length":555.0900827793629},{"x":-530,"y":-100,"length":539.351462406472},{"x":-530,"y":-30,"length":530.8483775994799},{"x":-510,"y":-5,"length":510.02450921499843},{"x":-435,"y":-5,"length":435.0287346831241},{"x":-345,"y":-5,"length":345.03622998172233},{"x":-260,"y":-5,"length":260.0480724789169},{"x":-175,"y":-5,"length":175.07141400011596},{"x":-90,"y":-5,"length":90.13878188659973},{"x":-10,"y":-5,"length":11.180339887498949},{"x":80,"y":-5,"length":80.15609770940699},{"x":170,"y":-5,"length":170.07351351694948},{"x":255,"y":-5,"length":255.04901489713697},{"x":340,"y":-5,"length":340.03676271838606},{"x":430,"y":-5,"length":430.0290687848904},{"x":510,"y":-5,"length":510.02450921499843},{"x":575,"y":-5,"length":575.0217387195027},{"x":596,"y":-25,"length":596.5240984235255},{"x":595,"y":-90,"length":601.7682278086805},{"x":595,"y":-158,"length":615.6208248589386},{"x":596,"y":-249,"length":645.9233700679981}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4020,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-80,"density":"1","height":67,"action":0,"isStatic":true,"wireframe":false,"width":1784,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":-8,"y":-13,"length":15.264337522473747},{"x":1763,"y":-16,"length":1763.0726020218226}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":930,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1200,"density":"1","height":420,"action":0,"isStatic":true,"wireframe":false,"width":151.2,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":136,"y":407,"length":429.12119500206467}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1180,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1200,"density":"1","height":417,"action":0,"isStatic":true,"wireframe":false,"width":155.1,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":55,"y":0,"length":55},{"x":-85,"y":404,"length":412.84500723637194}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1720,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1150,"density":"1","height":465,"action":0,"isStatic":true,"wireframe":false,"width":253.1,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":157,"y":-48,"length":164.17368851311102},{"x":-82,"y":404,"length":412.23779545306127}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1470,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1150,"density":"1","height":473,"action":0,"isStatic":true,"wireframe":false,"width":164.2,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":-17,"y":-53,"length":55.65968020030299},{"x":132,"y":407,"length":427.87030745308795}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":-570,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":445,"y":825,"length":937.3633233703994},{"x":-5,"y":820,"length":820.0152437607486}],"y":-430},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":3730,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-1360,"density":"1","height":1290,"action":0,"isStatic":true,"wireframe":false,"width":1505,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":60,"y":0,"length":60},{"x":140,"y":0,"length":140},{"x":245,"y":0,"length":245},{"x":345,"y":0,"length":345},{"x":430,"y":0,"length":430},{"x":520,"y":0,"length":520},{"x":650,"y":0,"length":650},{"x":760,"y":0,"length":760},{"x":880,"y":0,"length":880},{"x":990,"y":0,"length":990},{"x":1100,"y":0,"length":1100},{"x":1205,"y":0,"length":1205},{"x":1305,"y":0,"length":1305},{"x":1410,"y":0,"length":1410},{"x":1490,"y":0,"length":1490},{"x":1490,"y":100,"length":1493.3519344079614},{"x":1490,"y":185,"length":1501.4409745308005},{"x":1490,"y":260,"length":1512.5144627407699},{"x":1490,"y":340,"length":1528.2997088267732},{"x":1490,"y":430,"length":1550.8062419270823},{"x":1490,"y":505,"length":1573.252999361514},{"x":1490,"y":595,"length":1604.4079905061556},{"x":1490,"y":700,"length":1646.2381358722073},{"x":1490,"y":815,"length":1698.3300621492867},{"x":1490,"y":910,"length":1745.909505100422},{"x":1490,"y":1000,"length":1794.4637081869334},{"x":1490,"y":1100,"length":1852.0529150107996},{"x":1490,"y":1195,"length":1910.0065444914057},{"x":1490,"y":1275,"length":1961.0520135886247}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3697,"rotation":54.00000000000006,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-669,"density":"1","height":165,"action":0,"isStatic":true,"wireframe":false,"width":307,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":67,"y":-35,"length":75.59100475585703},{"x":136,"y":-68,"length":152.0526224699857},{"x":205,"y":-103,"length":229.42101037176172},{"x":252,"y":-127,"length":282.1931962326519},{"x":294,"y":-150,"length":330.0545409474016}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3687,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-750,"density":"1","height":17,"action":0,"isStatic":true,"wireframe":false,"width":248,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":86,"y":0,"length":86},{"x":165,"y":0,"length":165},{"x":235,"y":0,"length":235}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":1633,"y":163,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":0.5013634592910011,"x":2850,"y":350,"width":9.3,"height":64.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4230,"y":-290,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":1080,"ag":true,"active":true,"y":-541,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":1610,"ag":true,"active":true,"y":-490,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2069,"ag":true,"active":true,"y":-240,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2579,"ag":true,"active":true,"y":-130,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"}],[{"params":{"x":3580,"rotation":-17.999999999999993,"y":235,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3637,"rotation":-26.999999999999993,"y":211,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3670,"rotation":-147,"y":-410,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3491,"rotation":-177,"y":-468,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3614,"rotation":-156,"y":-440,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3828,"rotation":-96,"y":-151,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3735,"rotation":-47.999999999999986,"y":134,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3719,"rotation":-138,"y":-372,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3817,"rotation":-104,"y":-214,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3803,"rotation":-65.99999999999999,"y":29,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3690,"rotation":-38.99999999999999,"y":177,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3554,"rotation":-168,"y":-460,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3761,"rotation":-126,"y":-325,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3774,"rotation":-56.999999999999986,"y":83,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3830,"rotation":-86.99999999999999,"y":-89,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3794,"rotation":-118,"y":-271,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3822,"rotation":-77.99999999999999,"y":-29,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3564,"rotation":-36.99999999999999,"y":69,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3609,"rotation":-49.99999999999999,"y":27,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3553,"rotation":-147,"y":-294,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3640,"rotation":-70,"y":-25,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3654,"rotation":-85.00000000000001,"y":-85,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3634,"rotation":-116,"y":-204,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3652,"rotation":-99,"y":-147,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":3600,"rotation":-132,"y":-254,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2730,"rotation":-143,"y":-335,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2676,"rotation":-159.00000000000003,"y":-364,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2614,"rotation":-171,"y":-380,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2551,"rotation":176,"y":-383,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2491,"rotation":161.00000000000006,"y":-370,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2527,"rotation":21,"y":253,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2588,"rotation":8,"y":269,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2651,"rotation":0,"y":274,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2714,"rotation":-10,"y":269,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2776,"rotation":-22,"y":251,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2547,"rotation":-35.00000000000001,"y":201,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":2655,"rotation":-34,"y":128,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":2012,"rotation":-28,"y":92,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":2128,"rotation":-28,"y":32,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"}],null,[{"params":{"x":200,"rotation":0,"y":310,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":1630,"rotation":0,"y":90,"id":1,"width":128,"height":516},"className":"SafePointE"},{"params":{"x":2850,"rotation":0,"y":320,"id":2,"width":128,"height":117},"className":"SafePointE"},{"params":{"x":4230,"rotation":0,"y":-360,"id":3,"width":128,"height":299},"className":"SafePointE"}],[{"params":{"x":1276,"rotation":0,"graphic":0,"id":1,"y":-265,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":33,"useWeld":false},"className":"MotorJointE"},{"params":{"x":980,"sndId":-1,"rotation":0,"y":50,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":446,"height":64},"className":"ToggleE"},{"params":{"x":1610,"sndId":0,"rotation":0,"y":-650,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":150,"height":306},"className":"ToggleE"},{"params":{"x":2980,"sndId":0,"rotation":0,"y":-270,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":150,"height":306},"className":"ToggleE"},{"params":{"x":3400,"sndId":0,"rotation":0,"y":-160,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":150,"height":56},"className":"ToggleE"},{"params":{"x":3900,"sndId":0,"rotation":0,"y":-1010,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":47,"height":268},"className":"ToggleE"},{"params":{"x":1080,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-541,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1610,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-490,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2069,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-240,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2579,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-130,"width":17,"height":17},"className":"PivotJointE"}]],"settings":{"prizes":"33,40,47","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map11.json b/motox3mspooky/assets/levels/map11.json deleted file mode 100644 index 7b1ca68d..00000000 --- a/motox3mspooky/assets/levels/map11.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":9740,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":90,"y":1230,"length":1233.288287465668},{"x":-10,"y":1230,"length":1230.0406497347963}],"y":-1741},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9939,"rotation":18,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-675,"length":675},{"x":50,"y":-675,"length":676.8493185340442},{"x":100,"y":-675,"length":682.367203197809},{"x":100,"y":-595,"length":603.3448433524562},{"x":100,"y":-510,"length":519.7114584074513},{"x":100,"y":-430,"length":441.47480109288233},{"x":100,"y":-355,"length":368.81567211820055},{"x":100,"y":-275,"length":292.61749776799064},{"x":100,"y":-195,"length":219.14607000811125},{"x":100,"y":-100,"length":141.4213562373095},{"x":100,"y":-10,"length":100.4987562112089},{"x":100,"y":80,"length":128.06248474865697},{"x":100,"y":170,"length":197.2308292331602},{"x":100,"y":255,"length":273.9069184960467},{"x":100,"y":325,"length":340.03676271838606},{"x":100,"y":405,"length":417.163037672323},{"x":100,"y":475,"length":485.41219597368996},{"x":100,"y":565,"length":573.7813172280883},{"x":100,"y":645,"length":652.7059062089143},{"x":0,"y":645,"length":645},{"x":0,"y":570,"length":570},{"x":0,"y":485,"length":485},{"x":0,"y":400,"length":400},{"x":0,"y":320,"length":320},{"x":0,"y":230,"length":230},{"x":0,"y":140,"length":140},{"x":0,"y":55,"length":55},{"x":0,"y":-35,"length":35},{"x":0,"y":-125,"length":125},{"x":0,"y":-215,"length":215},{"x":0,"y":-305,"length":305},{"x":0,"y":-410,"length":410},{"x":0,"y":-485,"length":485},{"x":0,"y":-560,"length":560},{"x":0,"y":-615,"length":615}],"y":-2348},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":0,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":460,"y":0,"length":460},{"x":460,"y":1015,"length":1114.3720204671329},{"x":0,"y":1015,"length":1015}],"y":-690},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":10920,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":100,"y":535,"length":544.2655601817921},{"x":0,"y":535,"length":535}],"y":-1951},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11770,"rotation":0,"y":-2270,"vertices":[{"x":10,"y":-1645,"length":1645.0303948559736},{"x":510,"y":-1645,"length":1722.2441754873205},{"x":505,"y":390,"length":638.0634764660958},{"x":5,"y":390,"length":390.03204996512784}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":11750,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":50,"y":25,"length":55.90169943749474},{"x":110,"y":25,"length":112.80514172678478},{"x":170,"y":25,"length":171.82840277439584},{"x":235,"y":25,"length":236.32604596192948},{"x":310,"y":25,"length":311.0064308016797},{"x":390,"y":25,"length":390.80046059338264},{"x":460,"y":25,"length":460.6788469204984},{"x":515,"y":25,"length":515.6064390598706},{"x":555,"y":-5,"length":555.0225220655465},{"x":555,"y":55,"length":557.718567021038},{"x":555,"y":135,"length":571.1829829397931},{"x":555,"y":210,"length":593.4012133455744},{"x":550,"y":615,"length":825.0606038346516},{"x":-5,"y":615,"length":615.0203248673981},{"x":0,"y":240,"length":240},{"x":0,"y":140,"length":140},{"x":0,"y":65,"length":65}],"y":-1950},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9082,"bg":true,"rotation":0,"y":-1920,"vertices":[{"x":0,"y":0,"length":0},{"x":4635,"y":0,"length":4635},{"x":4635,"y":1405,"length":4843.268524457425},{"x":0,"y":1405,"length":1405}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":8555,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":100,"y":0,"length":100},{"x":98,"y":17,"length":99.46356116689167},{"x":93,"y":34,"length":99.02019995940222},{"x":86,"y":49,"length":98.97979591815695},{"x":76,"y":64,"length":99.35793878699377},{"x":64,"y":76,"length":99.35793878699377},{"x":50,"y":86,"length":99.4786409235671},{"x":34,"y":93,"length":99.02019995940222},{"x":17,"y":98,"length":99.46356116689167},{"x":0,"y":100,"length":100},{"x":-17,"y":98,"length":99.46356116689167},{"x":-34,"y":93,"length":99.02019995940222},{"x":-49,"y":86,"length":98.97979591815695},{"x":-64,"y":76,"length":99.35793878699377},{"x":-76,"y":64,"length":99.35793878699377},{"x":-86,"y":49,"length":98.97979591815695},{"x":-93,"y":34,"length":99.02019995940222},{"x":-98,"y":17,"length":99.46356116689167},{"x":-100,"y":0,"length":100},{"x":-98,"y":-17,"length":99.46356116689167},{"x":-93,"y":-34,"length":99.02019995940222},{"x":-86,"y":-50,"length":99.4786409235671},{"x":-76,"y":-64,"length":99.35793878699377},{"x":-64,"y":-76,"length":99.35793878699377},{"x":-50,"y":-86,"length":99.4786409235671},{"x":-34,"y":-93,"length":99.02019995940222},{"x":-17,"y":-98,"length":99.46356116689167},{"x":0,"y":-100,"length":100},{"x":17,"y":-98,"length":99.46356116689167},{"x":34,"y":-93,"length":99.02019995940222},{"x":50,"y":-86,"length":99.4786409235671},{"x":64,"y":-76,"length":99.35793878699377},{"x":76,"y":-64,"length":99.35793878699377},{"x":86,"y":-50,"length":99.4786409235671},{"x":93,"y":-34,"length":99.02019995940222},{"x":98,"y":-17,"length":99.46356116689167}],"y":-618},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7965,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":100,"y":0,"length":100},{"x":98,"y":17,"length":99.46356116689167},{"x":93,"y":34,"length":99.02019995940222},{"x":86,"y":49,"length":98.97979591815695},{"x":76,"y":64,"length":99.35793878699377},{"x":64,"y":76,"length":99.35793878699377},{"x":50,"y":86,"length":99.4786409235671},{"x":34,"y":93,"length":99.02019995940222},{"x":17,"y":98,"length":99.46356116689167},{"x":0,"y":100,"length":100},{"x":-17,"y":98,"length":99.46356116689167},{"x":-34,"y":93,"length":99.02019995940222},{"x":-49,"y":86,"length":98.97979591815695},{"x":-64,"y":76,"length":99.35793878699377},{"x":-76,"y":64,"length":99.35793878699377},{"x":-86,"y":49,"length":98.97979591815695},{"x":-93,"y":34,"length":99.02019995940222},{"x":-98,"y":17,"length":99.46356116689167},{"x":-100,"y":0,"length":100},{"x":-98,"y":-17,"length":99.46356116689167},{"x":-93,"y":-34,"length":99.02019995940222},{"x":-86,"y":-50,"length":99.4786409235671},{"x":-76,"y":-64,"length":99.35793878699377},{"x":-64,"y":-76,"length":99.35793878699377},{"x":-50,"y":-86,"length":99.4786409235671},{"x":-34,"y":-93,"length":99.02019995940222},{"x":-17,"y":-98,"length":99.46356116689167},{"x":0,"y":-100,"length":100},{"x":17,"y":-98,"length":99.46356116689167},{"x":34,"y":-93,"length":99.02019995940222},{"x":50,"y":-86,"length":99.4786409235671},{"x":64,"y":-76,"length":99.35793878699377},{"x":76,"y":-64,"length":99.35793878699377},{"x":86,"y":-50,"length":99.4786409235671},{"x":93,"y":-34,"length":99.02019995940222},{"x":98,"y":-17,"length":99.46356116689167}],"y":-618},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4510,"bg":true,"rotation":0,"y":130,"vertices":[{"x":0,"y":0,"length":0},{"x":1680,"y":0,"length":1680},{"x":1680,"y":175,"length":1689.0899916819114},{"x":0,"y":175,"length":175}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":3365,"rotation":0,"y":-694,"width":126.1,"height":126.1},"className":"OvalTemplate"},{"params":{"x":-10,"physic":true,"lineId":0,"y":290,"height":876,"isRoad":true,"direction":90,"width":9633,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":6200,"y":0,"length":6200},{"x":7807,"y":-812,"length":7849.114153839272},{"x":9620,"y":-810,"length":9654.040604845206}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":3365,"rotation":0,"y":97,"width":126.1,"height":126.1},"className":"OvalTemplate"},{"params":{"x":3365,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":200,"y":0,"length":200},{"x":196,"y":34,"length":198.92712233378333},{"x":187,"y":68,"length":198.97989848223364},{"x":173,"y":99,"length":199.32385707686876},{"x":153,"y":128,"length":199.4818287463798},{"x":128,"y":153,"length":199.4818287463798},{"x":100,"y":173,"length":199.82242116439286},{"x":68,"y":187,"length":198.97989848223364},{"x":25,"y":197,"length":198.57995870681412},{"x":25,"y":338,"length":338.92329515688357},{"x":42,"y":349,"length":351.51813608973293},{"x":54,"y":363,"length":366.9945503682582},{"x":60,"y":378,"length":382.7322824116095},{"x":62,"y":396,"length":400.8241509689754},{"x":60,"y":417,"length":421.2944338583172},{"x":49,"y":436,"length":438.74480053899214},{"x":33,"y":449,"length":450.2110616144388},{"x":15,"y":457,"length":457.2461044120551},{"x":-2,"y":459,"length":459.0043572777932},{"x":-22,"y":456,"length":456.5303932927139},{"x":-39,"y":445,"length":446.7057196857905},{"x":-50,"y":433,"length":435.8772763060722},{"x":-59,"y":418,"length":422.14334058468813},{"x":-63,"y":399,"length":403.9430652950982},{"x":-61,"y":381,"length":385.85230334935153},{"x":-53,"y":363,"length":366.84874267196284},{"x":-40,"y":347,"length":349.2978671563856},{"x":-25,"y":336,"length":336.92877585626314},{"x":-25,"y":198,"length":199.5720421301541},{"x":-68,"y":187,"length":198.97989848223364},{"x":-99,"y":173,"length":199.32385707686876},{"x":-128,"y":153,"length":199.4818287463798},{"x":-153,"y":128,"length":199.4818287463798},{"x":-173,"y":99,"length":199.32385707686876},{"x":-187,"y":68,"length":198.97989848223364},{"x":-196,"y":34,"length":198.92712233378333},{"x":-200,"y":0,"length":200},{"x":-196,"y":-34,"length":198.92712233378333},{"x":-187,"y":-68,"length":198.97989848223364},{"x":-173,"y":-100,"length":199.82242116439286},{"x":-153,"y":-128,"length":199.4818287463798},{"x":-128,"y":-153,"length":199.4818287463798},{"x":-100,"y":-173,"length":199.82242116439286},{"x":-68,"y":-187,"length":198.97989848223364},{"x":-25,"y":-195,"length":196.596032513375},{"x":-25,"y":-337,"length":337.9260274083664},{"x":-42,"y":-349,"length":351.51813608973293},{"x":-55,"y":-365,"length":369.120576505835},{"x":-62,"y":-385,"length":389.96025438498214},{"x":-62,"y":-407,"length":411.6952756590729},{"x":-55,"y":-426,"length":429.5357959472062},{"x":-43,"y":-442,"length":444.0867032461116},{"x":-24,"y":-454,"length":454.63391866423694},{"x":0,"y":-460,"length":460},{"x":22,"y":-455,"length":455.531557633497},{"x":40,"y":-444,"length":445.79816060634437},{"x":54,"y":-427,"length":430.40097583532497},{"x":62,"y":-406,"length":410.7067080046295},{"x":62,"y":-385,"length":389.96025438498214},{"x":58,"y":-369,"length":373.5304539123952},{"x":45,"y":-351,"length":353.872858524075},{"x":25,"y":-338,"length":338.92329515688357},{"x":25,"y":-195,"length":196.596032513375},{"x":68,"y":-187,"length":198.97989848223364},{"x":100,"y":-173,"length":199.82242116439286},{"x":128,"y":-153,"length":199.4818287463798},{"x":153,"y":-128,"length":199.4818287463798},{"x":173,"y":-100,"length":199.82242116439286},{"x":187,"y":-68,"length":198.97989848223364},{"x":196,"y":-34,"length":198.92712233378333}],"y":-299},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2830,"bg":true,"rotation":0,"y":-50,"vertices":[{"x":0,"y":0,"length":0},{"x":1070,"y":0,"length":1070},{"x":1050,"y":40,"length":1050.7616285342742},{"x":1026,"y":76,"length":1028.8109641717472},{"x":997,"y":116,"length":1003.7255601009671},{"x":957,"y":159,"length":970.1185494567146},{"x":908,"y":203,"length":930.4154985811447},{"x":863,"y":236,"length":894.687096140321},{"x":827,"y":259,"length":866.6083313700601},{"x":792,"y":278,"length":839.3735759481591},{"x":746,"y":298,"length":803.3181188047485},{"x":701,"y":313,"length":767.7043701842526},{"x":651,"y":323,"length":726.7255327838702},{"x":596,"y":333,"length":682.7188293873254},{"x":540,"y":335,"length":635.4722653271344},{"x":486,"y":333,"length":589.1392025659131},{"x":432,"y":326,"length":541.2023651093923},{"x":377,"y":316,"length":491.91970889566926},{"x":325,"y":298,"length":440.9410391424232},{"x":278,"y":279,"length":393.8591118661596},{"x":234,"y":254,"length":345.35778549208936},{"x":189,"y":226,"length":294.61330587738223},{"x":150,"y":193,"length":244.43608571567333},{"x":114,"y":162,"length":198.09088823063013},{"x":77,"y":120,"length":142.57980221616245},{"x":50,"y":86,"length":99.4786409235671},{"x":26,"y":51,"length":57.245087125446844}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":2270,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":300,"density":"1","height":401.95,"action":0,"isStatic":true,"wireframe":false,"width":2255,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":55,"y":-6,"length":55.326304774492215},{"x":105,"y":-12,"length":105.68348972285122},{"x":154,"y":-20,"length":155.2932709424333},{"x":207,"y":-35,"length":209.9380861111199},{"x":250,"y":-52,"length":255.3507391804457},{"x":295,"y":-73,"length":303.8980092070364},{"x":331,"y":-94,"length":344.0886513676381},{"x":363,"y":-117,"length":381.3895646186455},{"x":389,"y":-138,"length":412.7529527453438},{"x":419,"y":-164,"length":449.95221968560173},{"x":445,"y":-189,"length":483.47285342612565},{"x":471,"y":-219,"length":519.4246817393259},{"x":499,"y":-253,"length":559.4729662816604},{"x":526,"y":-293,"length":602.100489951636},{"x":554,"y":-345,"length":652.641555526462},{"x":571,"y":-315,"length":652.1242212952989},{"x":590,"y":-283,"length":654.3615208735918},{"x":612,"y":-250,"length":661.0930343000144},{"x":634,"y":-222,"length":671.7439988567073},{"x":661,"y":-193,"length":688.6000290444374},{"x":692,"y":-162,"length":710.7095046501066},{"x":722,"y":-135,"length":734.5127636739882},{"x":755,"y":-111,"length":763.1159807001817},{"x":789,"y":-89,"length":794.0037783285417},{"x":821,"y":-70,"length":823.9787618622217},{"x":856,"y":-53,"length":857.6392015294077},{"x":892,"y":-39,"length":892.852171414731},{"x":925,"y":-28,"length":925.4236867511011},{"x":963,"y":-18,"length":963.1682096082699},{"x":999,"y":-12,"length":999.072069472468},{"x":1039,"y":-7,"length":1039.0235800981611},{"x":1087,"y":-5,"length":1087.0114994791913},{"x":1129,"y":-6,"length":1129.0159432000949},{"x":1174,"y":-10,"length":1174.0425886653345},{"x":1217,"y":-16,"length":1217.1051721194845},{"x":1260,"y":-27,"length":1260.2892525130887},{"x":1300,"y":-40,"length":1300.6152390311288},{"x":1335,"y":-53,"length":1336.0516457083536},{"x":1370,"y":-72,"length":1371.8906661975655},{"x":1407,"y":-92,"length":1410.0046099215422},{"x":1440,"y":-115,"length":1444.5847154113185},{"x":1470,"y":-137,"length":1476.3702110243216},{"x":1501,"y":-165,"length":1510.0417212779255},{"x":1530,"y":-195,"length":1542.3764132013948},{"x":1555,"y":-224,"length":1571.050922153703},{"x":1579,"y":-254,"length":1599.2989088972706},{"x":1600,"y":-284,"length":1625.009538433544},{"x":1618,"y":-313,"length":1647.9966626179798},{"x":1636,"y":-347,"length":1672.3949892295182},{"x":1650,"y":-385,"length":1694.3213980824298},{"x":1715,"y":-385,"length":1757.6831341285608},{"x":1785,"y":-385,"length":1826.0476445043814},{"x":1860,"y":-385,"length":1899.4275453409641},{"x":1935,"y":-385,"length":1972.9292942221725},{"x":2005,"y":-385,"length":2041.6292513578462},{"x":2070,"y":-385,"length":2105.4987532648884},{"x":2145,"y":-385,"length":2179.2774031774843},{"x":2240,"y":-385,"length":2272.845133307591},{"x":2240,"y":-345,"length":2266.412363185482},{"x":2240,"y":-280,"length":2257.432169523594},{"x":2240,"y":-220,"length":2250.7776433935005},{"x":2240,"y":-155,"length":2245.3563191618387},{"x":2240,"y":-95,"length":2242.0136038837945},{"x":2240,"y":-10,"length":2240.0223213173567}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":6020,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":35,"y":-5,"length":35.35533905932738},{"x":110,"y":-5,"length":110.11357772772621},{"x":110,"y":65,"length":127.76932339180638},{"x":-15,"y":65,"length":66.70832032063167},{"x":-15,"y":20,"length":25}],"y":152},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6166,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0},{"x":0,"y":0,"length":0}],"y":-93},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":6178,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":300,"density":"1","height":913,"action":0,"isStatic":true,"wireframe":false,"width":64,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-900,"length":900}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":6193,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":665,"y":-630,"length":916.0376629811681},{"x":1600,"y":-630,"length":1719.5638982020994},{"x":1600,"y":85,"length":1602.2562217073773},{"x":-5,"y":905,"length":905.0138120492968}],"y":-605},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7793,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-5,"y":-1315,"length":1315.0095056690654},{"x":900,"y":-1315,"length":1593.4945873770641},{"x":900,"y":100,"length":905.5385138137417},{"x":0,"y":100,"length":100}],"y":-624},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":7792,"rotation":0,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-515,"density":"1","height":75,"action":0,"isStatic":true,"wireframe":false,"width":1841,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":292,"y":-10,"length":292.1711826994579},{"x":1828,"y":1,"length":1828.0002735229555}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":7790,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":345,"y":0,"length":345},{"x":345,"y":40,"length":347.3110997362451},{"x":0,"y":40,"length":40}],"y":-520},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-10,"physic":false,"lineId":0,"y":290,"height":2150.5,"isRoad":false,"direction":90,"width":14073,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":6200,"y":0,"length":6200},{"x":7807,"y":-812,"length":7849.114153839272},{"x":8255,"y":-930,"length":8307.221256232435},{"x":9105,"y":-1805,"length":9282.18993557016},{"x":9420,"y":-1915,"length":9612.68042743542},{"x":9830,"y":-1990,"length":10029.406762117089},{"x":14060,"y":-2110,"length":14217.443511405276}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":9082,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-525,"density":"1","height":1408,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":5,"y":-5,"length":7.0710678118654755},{"x":5,"y":-100,"length":100.12492197250393},{"x":5,"y":-200,"length":200.06249023742558},{"x":5,"y":-330,"length":330.037876614185},{"x":5,"y":-435,"length":435.0287346831241},{"x":5,"y":-545,"length":545.0229352972221},{"x":5,"y":-650,"length":650.0192304847603},{"x":5,"y":-730,"length":730.0171230868492},{"x":5,"y":-835,"length":835.0149699256895},{"x":5,"y":-930,"length":930.0134407630892},{"x":5,"y":-1040,"length":1040.012019161317},{"x":5,"y":-1115,"length":1115.011210705973},{"x":5,"y":-1200,"length":1200.0104166214558},{"x":5,"y":-1295,"length":1295.0096524736794},{"x":5,"y":-1400,"length":1400.0089285429576}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":7390,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-210,"y":-1115,"length":1134.6034549568408},{"x":-85,"y":-1115,"length":1118.2352167589786},{"x":-90,"y":0,"length":90},{"x":100,"y":0,"length":100},{"x":100,"y":100,"length":141.4213562373095},{"x":-215,"y":100,"length":237.11811402758752}],"y":-2100},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"x":4546,"active":true,"y":-70,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4616,"active":true,"y":-58,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4684,"active":true,"y":-48,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4754,"active":true,"y":-37,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4822,"active":true,"y":-26,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5099,"active":true,"y":18,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4961,"active":true,"y":-4,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5169,"active":true,"y":29,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5030,"active":true,"y":7,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4892,"active":true,"y":-15,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5445,"active":true,"y":73,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5307,"active":true,"y":51,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5514,"active":true,"y":84,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5375,"active":true,"y":61,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5237,"active":true,"y":40,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5998,"active":true,"y":160,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5721,"active":true,"y":117,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5860,"active":true,"y":138,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5652,"active":true,"y":105,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5790,"active":true,"y":127,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5583,"active":true,"y":94,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5928,"active":true,"y":150,"safeId":-1,"id":-1,"rotation":9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9284,"active":true,"y":-2059,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9170,"active":true,"y":-1977,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9341,"active":true,"y":-2102,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9227,"active":true,"y":-2018,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9567,"active":true,"y":-2266,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9113,"active":true,"y":-1937,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9623,"active":true,"y":-2307,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9454,"active":true,"y":-2183,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9509,"active":true,"y":-2225,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9396,"active":true,"y":-2143,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":10020,"active":true,"y":-2595,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9906,"active":true,"y":-2512,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9794,"active":true,"y":-2429,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9737,"active":true,"y":-2389,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9679,"active":true,"y":-2347,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9963,"active":true,"y":-2553,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":9849,"active":true,"y":-2470,"safeId":-1,"id":-1,"rotation":-36,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":11880,"ag":true,"active":true,"y":-2720,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":260.3,"height":260.3,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":12160,"ag":true,"active":true,"y":-2720,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":260.3,"height":260.3,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4200,"y":-150,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":6990,"y":-1299,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":1090,"rotation":0,"y":250,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":1750,"rotation":0,"y":250,"width":92.7,"height":85.5},"className":"Dec27"},{"params":{"x":1820,"rotation":0,"y":260,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4170,"y":-130,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"scaleX":-1,"rotation":0,"scaleY":1,"x":7022,"y":-1280,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":3365,"ag":true,"active":true,"y":-694,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":260.3,"height":260.3,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":3365,"ag":true,"active":true,"y":97,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":260.3,"height":260.3,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":6122,"ag":true,"active":true,"y":210,"sgos":true,"btg":false,"id":-1,"ad":-1,"width":128,"height":128,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall52E"}],[{"params":{"x":7766,"stones":false,"physic":true,"impulse":14000,"id":11,"radius":64,"y":-1260,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":200},"className":"Tnt1"},{"params":{"x":7820,"stones":false,"physic":false,"impulse":1,"id":12,"radius":1,"y":-500,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":7910,"stones":false,"physic":false,"impulse":1,"id":12,"radius":1,"y":-500,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8010,"stones":false,"physic":false,"impulse":1,"id":12,"radius":1,"y":-500,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8110,"stones":false,"physic":false,"impulse":1,"id":12,"radius":1,"y":-500,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":7220,"active":false,"y":-1270,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7235,"active":false,"y":-1310,"safeId":-1,"id":31,"rotation":90.00000000000006,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7252,"active":false,"y":-1270,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7235,"active":false,"y":-1390,"safeId":-1,"id":31,"rotation":90.00000000000006,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7220,"active":false,"y":-1350,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7252,"active":false,"y":-1350,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7235,"active":false,"y":-1550,"safeId":-1,"id":31,"rotation":90.00000000000006,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7235,"active":false,"y":-1470,"safeId":-1,"id":31,"rotation":90.00000000000006,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7252,"active":false,"y":-1510,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7220,"active":false,"y":-1510,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7220,"active":false,"y":-1430,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7252,"active":false,"y":-1430,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7235,"active":false,"y":-1630,"safeId":-1,"id":31,"rotation":90.00000000000006,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7220,"active":false,"y":-1590,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"x":7252,"active":false,"y":-1590,"safeId":-1,"id":31,"rotation":0,"width":12.3,"type":0,"height":72},"className":"Removed0"},{"params":{"speed":1000,"x":7780,"rotation":0,"y":-2050,"safeId":-1,"id":-1,"rate":1,"width":590,"height":128},"className":"GeyserE"},{"params":{"x":10083,"stones":false,"physic":false,"impulse":1,"id":16,"radius":1,"y":-2600,"height":53.2,"width":53.2,"safeId":-1,"rotation":12,"count":1},"className":"Tnt1"}],null,[{"params":{"x":1220,"rotation":0,"y":200,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":4200,"rotation":0,"y":-230,"id":0,"width":128,"height":4080},"className":"SafePointE"},{"params":{"x":6990,"rotation":0,"y":-1380,"id":0,"width":128,"height":1905},"className":"SafePointE"}],[{"params":{"x":3365,"rotation":0,"graphic":1,"id":1,"y":-299,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":80,"useWeld":false},"className":"MotorJointE"},{"params":{"x":1820,"sndId":-1,"rotation":0,"y":-180,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":985},"className":"ToggleE"},{"params":{"x":3420,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":130,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3290,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":90,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3320,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":-740,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3420,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":-750,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3365,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-694,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3365,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":97,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4509,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":-76,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4581,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":-64,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4649,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":-54,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4719,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":-42,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4788,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":-31,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4857,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":-21,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4926,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":-9,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4995,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":2,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5064,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":12,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5134,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5272,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":45,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5341,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":57,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5548,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":90,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5410,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":67,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5200,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":34,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5480,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":78,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5685,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":111,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5618,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":100,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6033,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":166,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5895,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":144,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5825,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":133,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5756,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5963,"rotation":9,"graphic":0,"safeId":-1,"id":-1,"y":154,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6122,"rotation":0,"graphic":0,"id":5,"y":209,"height":17,"width":17,"time":1.5,"safeId":-1,"snd":false,"rate":-180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":6070,"active":0,"y":182,"cycle":0,"body":false,"id":5,"position":0,"width":13,"height":813,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-800,"length":800}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":400},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":4870,"sndId":-1,"rotation":0,"y":-440,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":5,"width":64,"height":2010},"className":"ToggleE"},{"params":{"x":7965,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-618,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8555,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-618,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7270,"sndId":-1,"rotation":0,"y":-1550,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":64,"height":1097},"className":"ToggleE"},{"params":{"x":8060,"rotation":0,"graphic":0,"safeId":-1,"id":11,"y":-970,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7960,"active":0,"y":-500,"cycle":0,"body":false,"id":12,"position":0,"width":509,"height":285,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-272,"length":272},{"x":-496,"y":0,"length":496}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1080},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":7950,"sndId":-1,"rotation":0,"y":-540,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":12,"width":588,"height":64},"className":"ToggleE"},{"params":{"x":9142,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-1957,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9199,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-1997,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9312,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2080,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9084,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-1916,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9483,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2203,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9652,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2327,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9425,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2162,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9255,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2039,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9366,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2119,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9596,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2286,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9709,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2369,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9936,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2534,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9763,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2408,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9538,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2245,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9821,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2452,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9990,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2574,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":10048,"rotation":-36,"graphic":0,"safeId":-1,"id":16,"y":-2615,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9878,"rotation":-36,"graphic":0,"safeId":-1,"id":-1,"y":-2492,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9827,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-1722,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":10190,"rotation":0,"graphic":0,"safeId":-1,"id":16,"y":-2920,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":10160,"sndId":-1,"rotation":0,"y":-2960,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":16,"width":1078,"height":64},"className":"ToggleE"},{"params":{"x":11880,"rotation":0,"graphic":0,"safeId":-1,"id":17,"y":-2730,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":12160,"rotation":0,"graphic":0,"safeId":-1,"id":17,"y":-2720,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":11090,"sndId":-1,"rotation":0,"y":-2380,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":17,"width":64,"height":1072},"className":"ToggleE"},{"params":{"x":6990,"sndId":0,"rotation":0,"y":-1570,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":31,"width":64,"height":1386},"className":"ToggleE"}]],"settings":{"prizes":"26,34,43","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map12.json b/motox3mspooky/assets/levels/map12.json deleted file mode 100644 index 40b4edb9..00000000 --- a/motox3mspooky/assets/levels/map12.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":1540,"bg":true,"rotation":0,"y":-70,"vertices":[{"x":0,"y":0,"length":0},{"x":1300,"y":0,"length":1300},{"x":1260,"y":30,"length":1260.3570922560002},{"x":1225,"y":60,"length":1226.4685075451387},{"x":1205,"y":115,"length":1210.4751133336033},{"x":1210,"y":195,"length":1225.6120919769028},{"x":85,"y":195,"length":212.72047386182646},{"x":100,"y":135,"length":168.00297616411441},{"x":85,"y":80,"length":116.72617529928752},{"x":55,"y":40,"length":68.00735254367721}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":8030,"rotation":0,"y":-470,"vertices":[{"x":0,"y":0,"length":0},{"x":445,"y":0,"length":445},{"x":445,"y":210,"length":492.0619879649311},{"x":0,"y":210,"length":210}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":20,"physic":true,"lineId":0,"y":123,"height":64,"isRoad":true,"direction":90,"width":6613,"textureMode":true,"cameraOffsetY":170,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":6600,"y":0,"length":6600}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":120,"physic":false,"lineId":0,"y":130,"height":1143.5,"isRoad":false,"direction":90,"width":9578,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":4975,"y":-50,"length":4975.251249937032},{"x":5305,"y":-125,"length":5306.472462945605},{"x":6520,"y":-1105,"length":6612.973990573379},{"x":7445,"y":-550,"length":7465.288005160953},{"x":7580,"y":-530,"length":7598.506432187842},{"x":9565,"y":-605,"length":9584.114460919172}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":1340,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-580,"density":"1","height":631,"action":0,"isStatic":true,"wireframe":false,"width":597,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-180,"y":0,"length":180},{"x":-110,"y":0,"length":110},{"x":-40,"y":0,"length":40},{"x":30,"y":0,"length":30},{"x":88,"y":-1,"length":88.0056816347672},{"x":140,"y":0,"length":140},{"x":192,"y":-3,"length":192.02343606966312},{"x":236,"y":-15,"length":236.47621444872632},{"x":271,"y":-33,"length":273.00183149568795},{"x":306,"y":-57,"length":311.26355392175293},{"x":330,"y":-80,"length":339.5585369269929},{"x":352,"y":-105,"length":367.3268299484806},{"x":371,"y":-134,"length":394.45785579704204},{"x":387,"y":-169,"length":422.2913686070318},{"x":398,"y":-209,"length":449.53865239821147},{"x":402,"y":-247,"length":471.8188211591394},{"x":401,"y":-288,"length":493.7053777304841},{"x":395,"y":-322,"length":509.6165224951012},{"x":384,"y":-359,"length":525.6776578855145},{"x":369,"y":-388,"length":535.4484102133463},{"x":350,"y":-417,"length":544.4162010814888},{"x":326,"y":-444,"length":550.8284669477423},{"x":299,"y":-468,"length":555.3602434456395},{"x":274,"y":-487,"length":558.7888688941468},{"x":239,"y":-505,"length":558.7002774296787},{"x":210,"y":-514,"length":555.2440904683273},{"x":190,"y":-520,"length":553.6244214266563},{"x":190,"y":-614,"length":642.7254468278038},{"x":226,"y":-614,"length":654.272114643441},{"x":226,"y":-520,"length":566.98853603931}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":8030,"bg":true,"rotation":0,"y":-450,"vertices":[{"x":0,"y":0,"length":0},{"x":440,"y":0,"length":440},{"x":440,"y":185,"length":477.31017169132275},{"x":0,"y":185,"length":185}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":790,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1085,"density":"1","height":1335,"action":0,"isStatic":true,"wireframe":false,"width":1082.05,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":108,"y":-17,"length":109.32977636490436},{"x":108,"y":-110,"length":154.1557653803451},{"x":139,"y":-110,"length":177.2596964907703},{"x":139,"y":-13,"length":139.60659010233005},{"x":111,"y":-5,"length":111.11255554616679},{"x":69,"y":10,"length":69.72087205421343},{"x":27,"y":35,"length":44.204072210600685},{"x":-6,"y":64,"length":64.28063471995279},{"x":-36,"y":99,"length":105.34229919647663},{"x":-58,"y":135,"length":146.93195704134618},{"x":-79,"y":196,"length":211.322029140362},{"x":-101,"y":256,"length":275.2035610234722},{"x":-131,"y":337,"length":361.56603822815},{"x":-157,"y":407,"length":436.23158986941786},{"x":-183,"y":477,"length":510.89920728065334},{"x":-198,"y":525,"length":561.0962484280215},{"x":-211,"y":578,"length":615.3088655301498},{"x":-215,"y":631,"length":666.6228318922177},{"x":-216,"y":694,"length":726.8369830986863},{"x":-211,"y":742,"length":771.4175263759568},{"x":-203,"y":791,"length":816.6333326530334},{"x":-190,"y":835,"length":856.3439729454514},{"x":-172,"y":876,"length":892.7261618211936},{"x":-152,"y":913,"length":925.5663131294267},{"x":-121,"y":962,"length":969.5798058953167},{"x":-83,"y":1009,"length":1012.4080205134686},{"x":-40,"y":1049,"length":1049.7623540592413},{"x":8,"y":1085,"length":1085.0294926867195},{"x":53,"y":1115,"length":1116.2589305353843},{"x":107,"y":1140,"length":1145.0104803013814},{"x":160,"y":1155,"length":1166.0295879607859},{"x":223,"y":1167,"length":1188.1153142687792},{"x":276,"y":1171,"length":1203.0864474342648},{"x":333,"y":1169,"length":1215.5040106885704},{"x":394,"y":1161,"length":1226.033033812711},{"x":450,"y":1146,"length":1231.1847952277512},{"x":502,"y":1125,"length":1231.9208578476134},{"x":553,"y":1097,"length":1228.5023402501113},{"x":602,"y":1062,"length":1220.7571421048497},{"x":632,"y":1039,"length":1216.1188264310358},{"x":659,"y":1025,"length":1218.5671914178554},{"x":694,"y":1015,"length":1229.5775697368588},{"x":726,"y":1015,"length":1247.9186672215462},{"x":752,"y":1021,"length":1268.0477120361047},{"x":776,"y":1031,"length":1290.401875386114},{"x":802,"y":1050,"length":1321.250922421627},{"x":825,"y":1076,"length":1355.8764692994712},{"x":841,"y":1107,"length":1390.2266002346523},{"x":849,"y":1142,"length":1423.0126492761756},{"x":847,"y":1177,"length":1450.0820666431262},{"x":838,"y":1210,"length":1471.8505358901086}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4070,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-620,"density":"1","height":798.5,"action":0,"isStatic":true,"wireframe":false,"width":763.1,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":399,"y":-784,"length":879.6914231706479},{"x":424,"y":-784,"length":891.3091495098656},{"x":749,"y":-208,"length":777.3448398233567}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3020,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":60,"density":"1","height":210.05,"action":0,"isStatic":true,"wireframe":false,"width":1056.05,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-264,"y":66,"length":272.1249712907656},{"x":-273,"y":35,"length":275.234445518725},{"x":-275,"y":-1,"length":275.0018181758077},{"x":-269,"y":-35,"length":271.26739575555337},{"x":-256,"y":-63,"length":263.6380093992518},{"x":-235,"y":-88,"length":250.9362468835461},{"x":-210,"y":-108,"length":236.1440238498531},{"x":-186,"y":-120,"length":221.3504009483606},{"x":-156,"y":-127,"length":201.1591409804685},{"x":-124,"y":-128,"length":178.2133552795637},{"x":-91,"y":-120,"length":150.60212481900777},{"x":-60,"y":-104,"length":120.06664815842908},{"x":-32,"y":-81,"length":87.09190547921202},{"x":-3,"y":-57,"length":57.07889277132134},{"x":28,"y":-40,"length":48.82622246293481},{"x":62,"y":-24,"length":66.48308055437865},{"x":103,"y":-11,"length":103.58571330062848},{"x":146,"y":-3,"length":146.03081866510234},{"x":187,"y":0,"length":187},{"x":260,"y":0,"length":260},{"x":330,"y":0,"length":330},{"x":400,"y":0,"length":400},{"x":490,"y":0,"length":490},{"x":570,"y":0,"length":570},{"x":645,"y":0,"length":645},{"x":710,"y":0,"length":710},{"x":764,"y":-1,"length":764.0006544499814},{"x":764,"y":67,"length":766.932200393229}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":5640,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":300,"y":0,"length":300},{"x":289,"y":77,"length":299.0819285747636},{"x":259,"y":149,"length":298.8009370801906},{"x":212,"y":212,"length":299.8132752230961},{"x":150,"y":259,"length":299.3008519867593},{"x":77,"y":289,"length":299.0819285747636},{"x":0,"y":300,"length":300},{"x":-77,"y":289,"length":299.0819285747636},{"x":-149,"y":259,"length":298.8009370801906},{"x":-212,"y":212,"length":299.8132752230961},{"x":-259,"y":149,"length":298.8009370801906},{"x":-289,"y":77,"length":299.0819285747636},{"x":-300,"y":0,"length":300},{"x":-289,"y":-77,"length":299.0819285747636},{"x":-259,"y":-150,"length":299.3008519867593},{"x":-212,"y":-212,"length":299.8132752230961},{"x":-150,"y":-259,"length":299.3008519867593},{"x":-77,"y":-289,"length":299.0819285747636},{"x":0,"y":-300,"length":300},{"x":77,"y":-289,"length":299.0819285747636},{"x":150,"y":-259,"length":299.3008519867593},{"x":212,"y":-212,"length":299.8132752230961},{"x":259,"y":-150,"length":299.3008519867593},{"x":289,"y":-77,"length":299.0819285747636}],"y":-236},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":3885,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1397,"density":"1","height":1908.05,"action":0,"isStatic":true,"wireframe":false,"width":1082,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":216,"y":-592,"length":630.1745789858553},{"x":17,"y":-59,"length":61.40032573203501},{"x":-12,"y":21,"length":24.186773244895647},{"x":-34,"y":80,"length":86.92525524840292},{"x":-61,"y":151,"length":162.85576440519384},{"x":-90,"y":233,"length":249.77790134437433},{"x":-128,"y":330,"length":353.9547993741574},{"x":-155,"y":401,"length":429.913944877344},{"x":-183,"y":477,"length":510.89920728065334},{"x":-198,"y":525,"length":561.0962484280215},{"x":-211,"y":578,"length":615.3088655301498},{"x":-215,"y":631,"length":666.6228318922177},{"x":-216,"y":694,"length":726.8369830986863},{"x":-211,"y":742,"length":771.4175263759568},{"x":-203,"y":791,"length":816.6333326530334},{"x":-190,"y":835,"length":856.3439729454514},{"x":-172,"y":876,"length":892.7261618211936},{"x":-152,"y":913,"length":925.5663131294267},{"x":-121,"y":962,"length":969.5798058953167},{"x":-83,"y":1009,"length":1012.4080205134686},{"x":-40,"y":1049,"length":1049.7623540592413},{"x":8,"y":1085,"length":1085.0294926867195},{"x":53,"y":1115,"length":1116.2589305353843},{"x":107,"y":1140,"length":1145.0104803013814},{"x":160,"y":1155,"length":1166.0295879607859},{"x":223,"y":1167,"length":1188.1153142687792},{"x":276,"y":1171,"length":1203.0864474342648},{"x":333,"y":1169,"length":1215.5040106885704},{"x":394,"y":1161,"length":1226.033033812711},{"x":450,"y":1146,"length":1231.1847952277512},{"x":502,"y":1125,"length":1231.9208578476134},{"x":553,"y":1097,"length":1228.5023402501113},{"x":602,"y":1062,"length":1220.7571421048497},{"x":632,"y":1039,"length":1216.1188264310358},{"x":659,"y":1025,"length":1218.5671914178554},{"x":694,"y":1015,"length":1229.5775697368588},{"x":726,"y":1015,"length":1247.9186672215462},{"x":752,"y":1021,"length":1268.0477120361047},{"x":776,"y":1031,"length":1290.401875386114},{"x":802,"y":1050,"length":1321.250922421627},{"x":825,"y":1076,"length":1355.8764692994712},{"x":841,"y":1107,"length":1390.2266002346523},{"x":848,"y":1136,"length":1417.603611733548},{"x":849,"y":1173,"length":1448.0089778727202},{"x":842,"y":1207,"length":1471.6701396712513},{"x":827,"y":1238,"length":1488.8159725096987},{"x":804,"y":1266,"length":1499.7239746033267},{"x":780,"y":1281,"length":1499.7869848748521},{"x":751,"y":1294,"length":1496.1407019394933},{"x":719,"y":1301,"length":1486.4595520901335},{"x":685,"y":1299,"length":1468.5455389602325},{"x":654,"y":1291,"length":1447.2031647284357},{"x":630,"y":1279,"length":1425.7422628231234},{"x":607,"y":1259,"length":1397.6873756316181},{"x":588,"y":1236,"length":1368.7366437704516},{"x":575,"y":1211,"length":1340.5767415556634},{"x":568,"y":1180,"length":1309.5892485814015},{"x":566,"y":1147,"length":1279.0484744527864},{"x":571,"y":1119,"length":1256.2650994117444},{"x":584,"y":1090,"length":1236.5904738433012}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":5323,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-10,"y":2,"length":10.198039027185569},{"x":-13,"y":-11,"length":17.029386365926403},{"x":19,"y":-50,"length":53.48831648126533},{"x":62,"y":-89,"length":108.4665847162157},{"x":108,"y":-118,"length":159.9624956044385},{"x":158,"y":-141,"length":211.7663807123312},{"x":212,"y":-160,"length":265.60120481654445},{"x":250,"y":-168,"length":301.20424963801554},{"x":426,"y":-168,"length":457.93012567421243},{"x":1095,"y":-415,"length":1171.0038428630369},{"x":1140,"y":-440,"length":1221.9656296312103},{"x":1170,"y":-475,"length":1262.7450257276803},{"x":1215,"y":-610,"length":1359.5311691903205},{"x":1235,"y":-645,"length":1393.2874793092774},{"x":1260,"y":-664,"length":1424.2527865516008},{"x":1298,"y":-672,"length":1461.6388062719188},{"x":1339,"y":-660,"length":1492.823164343319},{"x":2169,"y":-69,"length":2170.0972328446483},{"x":2201,"y":-46,"length":2201.480638116084},{"x":2235,"y":-26,"length":2235.1512253089277},{"x":2269,"y":-11,"length":2269.02666357185},{"x":2308,"y":0,"length":2308},{"x":2353,"y":7,"length":2353.0104122166567},{"x":2399,"y":8,"length":2399.0133388541217},{"x":2445,"y":3,"length":2445.0018404901048},{"x":2491,"y":-6,"length":2491.0072260031684},{"x":2539,"y":-25,"length":2539.123076969685},{"x":2579,"y":-48,"length":2579.4466460851636},{"x":2625,"y":-83,"length":2626.3118626697783},{"x":2664,"y":-130,"length":2667.170035824488},{"x":2689,"y":-152,"length":2693.292594576386},{"x":2716,"y":-154,"length":2720.362475847658},{"x":2708,"y":-117,"length":2710.5263326520185},{"x":2705,"y":-78,"length":2706.1243504318127},{"x":2708,"y":-41,"length":2708.310358876914},{"x":2720,"y":0,"length":2720},{"x":2737,"y":41,"length":2737.307070827093},{"x":2765,"y":74,"length":2765.990057827396},{"x":2800,"y":101,"length":2801.8210149829342},{"x":2844,"y":123,"length":2846.658567513849},{"x":2883,"y":135,"length":2886.1590392769417},{"x":2940,"y":140,"length":2943.3314458280092},{"x":2985,"y":133,"length":2987.961512469664},{"x":3441,"y":300,"length":3454.0528368859673},{"x":1355,"y":620,"length":1490.109056411644},{"x":1031,"y":567,"length":1176.6265337820662},{"x":442,"y":567,"length":718.9248917654751},{"x":453,"y":484,"length":662.9215639877767},{"x":451,"y":435,"length":626.5987551854855},{"x":445,"y":377,"length":583.2272284453119},{"x":434,"y":330,"length":545.2118854170368},{"x":407,"y":268,"length":487.31201503759377},{"x":375,"y":213,"length":431.27021691742175},{"x":330,"y":156,"length":365.0150681821231},{"x":289,"y":115,"length":311.0401903291599},{"x":260,"y":90,"length":275.13632984395207},{"x":211,"y":60,"length":219.36499264923745},{"x":158,"y":37,"length":162.27445886522005},{"x":112,"y":22,"length":114.1402645870422},{"x":69,"y":10,"length":69.72087205421343},{"x":29,"y":3,"length":29.154759474226502}],"y":-429},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":4580,"rotation":-6,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-680,"density":"1","height":170.9,"action":0,"isStatic":true,"wireframe":false,"width":846,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-549,"y":-3,"length":549.0081966601227},{"x":-482,"y":6,"length":482.0373429517676},{"x":-418,"y":12,"length":418.1722133284324},{"x":-333,"y":15,"length":333.33766663850037},{"x":-237,"y":12,"length":237.30360300678117},{"x":-134,"y":3,"length":134.03357788255897},{"x":-36,"y":-13,"length":38.27531841800928},{"x":65,"y":-41,"length":76.8505042273634},{"x":151,"y":-72,"length":167.28717822953436},{"x":224,"y":-106,"length":247.81444671366518},{"x":284,"y":-140,"length":316.6322788346128}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":5240,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":162,"y":-1288,"length":1298.1479114492308},{"x":1515,"y":-2140,"length":2621.9887490223905},{"x":3863,"y":-2156,"length":4423.924163002797},{"x":7130,"y":-356,"length":7138.881985297137},{"x":3504,"y":649,"length":3563.5960769986264},{"x":3075,"y":485,"length":3113.013009931054},{"x":3120,"y":463,"length":3154.166926464102},{"x":3165,"y":425,"length":3193.4072712386687},{"x":3195,"y":394,"length":3219.201919731038},{"x":3212,"y":358,"length":3231.8892307750893},{"x":3230,"y":305,"length":3244.368197353685},{"x":3232,"y":263,"length":3242.682994065254},{"x":3224,"y":207,"length":3230.6384817865337},{"x":3205,"y":169,"length":3209.4526013013497},{"x":3181,"y":129,"length":3183.6146123549565},{"x":3141,"y":90,"length":3142.2891337367414},{"x":3095,"y":65,"length":3095.68247725764},{"x":3059,"y":54,"length":3059.4765892224113},{"x":3037,"y":43,"length":3037.3043969941505},{"x":3045,"y":18,"length":3045.0532015056815},{"x":3075,"y":-7,"length":3075.007967469353},{"x":3112,"y":-37,"length":3112.219947240233},{"x":3149,"y":-76,"length":3149.9169830330447},{"x":3179,"y":-113,"length":3181.0077019711853},{"x":3200,"y":-155,"length":3203.7517069835485},{"x":3219,"y":-213,"length":3226.0393673977383},{"x":3227,"y":-273,"length":3238.5271343621625},{"x":3225,"y":-337,"length":3242.559791276022},{"x":3212,"y":-395,"length":3236.1966874712666},{"x":3189,"y":-451,"length":3220.733146350377},{"x":3157,"y":-500,"length":3196.3493238380565},{"x":3117,"y":-547,"length":3164.632364114353},{"x":3070,"y":-580,"length":3124.307923364789},{"x":3025,"y":-607,"length":3085.2996612971},{"x":2969,"y":-627,"length":3034.483481582986},{"x":2911,"y":-637,"length":2979.880870102025},{"x":2845,"y":-635,"length":2915.0042881615113},{"x":2784,"y":-625,"length":2853.2930098396837},{"x":2731,"y":-607,"length":2797.643651360909},{"x":2677,"y":-575,"length":2738.056610079492},{"x":2633,"y":-537,"length":2687.2026347114206},{"x":2605,"y":-507,"length":2653.879047733713},{"x":2574,"y":-461,"length":2614.9564049903393},{"x":2554,"y":-418,"length":2587.979907186298},{"x":2539,"y":-372,"length":2566.1069736080763},{"x":2531,"y":-315,"length":2550.526612290097},{"x":2532,"y":-257,"length":2545.009430237931},{"x":2540,"y":-205,"length":2548.2592097351476},{"x":2559,"y":-151,"length":2563.4511893149047},{"x":2583,"y":-106,"length":2585.1740753767435},{"x":2609,"y":-69,"length":2609.9122590615953},{"x":2634,"y":-35,"length":2634.232525803294},{"x":2605,"y":-16,"length":2605.049135812989},{"x":2562,"y":-15,"length":2562.0439106307294},{"x":2517,"y":-24,"length":2517.114419330198},{"x":2452,"y":-63,"length":2452.8092057883346},{"x":2408,"y":-107,"length":2410.3761117302834},{"x":1742,"y":-1138,"length":2080.7710109476247},{"x":1605,"y":-1275,"length":2049.792672442752},{"x":1515,"y":-1162,"length":1909.311132319717},{"x":1447,"y":-1305,"length":1948.5466378816802},{"x":1310,"y":-1132,"length":1731.335900395992},{"x":1190,"y":-1205,"length":1693.5539554439947},{"x":827,"y":-252,"length":864.5420753208024},{"x":780,"y":-205,"length":806.4893055707558},{"x":730,"y":-180,"length":751.8643494673756},{"x":670,"y":-165,"length":690.0181157042183},{"x":605,"y":-165,"length":627.0964838045259},{"x":525,"y":-170,"length":551.837838499681},{"x":480,"y":-170,"length":509.2150822589606},{"x":425,"y":-160,"length":454.1200281863816},{"x":368,"y":-146,"length":395.9040287746514},{"x":303,"y":-119,"length":325.53033652794943},{"x":243,"y":-84,"length":257.1089263327899},{"x":196,"y":-48,"length":201.79197209007103},{"x":147,"y":-8,"length":147.2175261305528},{"x":92,"y":15,"length":93.2148056909416},{"x":45,"y":14,"length":47.12748667179272},{"x":-2,"y":-4,"length":4.47213595499958},{"x":-35,"y":-50,"length":61.032778078668514},{"x":-40,"y":-110,"length":117.04699910719626},{"x":-49,"y":-175,"length":181.7305698004604},{"x":-66,"y":-235,"length":244.09219569662608},{"x":-93,"y":-295,"length":309.3121400785944},{"x":-125,"y":-350,"length":371.6517186829626},{"x":-169,"y":-411,"length":444.3894688221133},{"x":-220,"y":-464,"length":513.5133883356889},{"x":-291,"y":-520,"length":595.8867342037411},{"x":-360,"y":-558,"length":664.0512028450818},{"x":-447,"y":-594,"length":743.4009685223715},{"x":-527,"y":-612,"length":807.6341993749398},{"x":-650,"y":-618,"length":896.896872555591},{"x":-778,"y":-615,"length":991.7202226434631},{"x":-777,"y":-710,"length":1052.5345600026633},{"x":-876,"y":-690,"length":1115.1125503732796},{"x":-855,"y":-758,"length":1142.6237350939284},{"x":-895,"y":-811,"length":1207.7855769961818},{"x":-830,"y":-971,"length":1277.3961797343845}],"y":-780},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":5650,"y":-660,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3298,"y":-11,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4160,"y":-300,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":986,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1056,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1126,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1196,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1266,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1336,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1406,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1476,"active":true,"y":-1192,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1040,"ag":true,"active":true,"y":-580,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":1080,"ag":true,"active":true,"y":-1330,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":1370,"ag":true,"active":true,"y":-1330,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":4760,"rotation":-33,"y":-930,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"x":4140,"rotation":-15,"y":-760,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":42,"scaleY":1,"x":3840,"y":-450,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":3890,"rotation":-171,"y":-510,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":-126,"scaleY":1,"x":5100,"y":-1020,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":5040,"rotation":6,"y":-980,"width":68.8,"height":69.8},"className":"Sign1"}],[{"params":{"x":3858,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":3988,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4118,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4248,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4378,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4508,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4638,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4768,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4898,"rotation":0,"y":61,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":4994,"rotation":-6,"y":58,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5056,"rotation":-16,"y":46,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5115,"rotation":-26.000000000000007,"y":23,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5169,"rotation":-36.00000000000001,"y":-9,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5217,"rotation":-45.00000000000001,"y":-50,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5258,"rotation":-53.99999999999998,"y":-98,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5291,"rotation":-62.99999999999999,"y":-152,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5314,"rotation":-74,"y":-210,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5327,"rotation":-83.00000000000003,"y":-272,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5329,"rotation":-93.00000000000004,"y":-336,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5320,"rotation":-103.00000000000006,"y":-399,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":5120,"rotation":0,"y":-740,"time":1,"safeId":-1,"force":2400,"width":64.1,"height":64.1},"className":"BoostE"}],null,[{"params":{"x":1290,"rotation":0,"y":-650,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":5650,"rotation":0,"y":-730,"id":0,"width":128,"height":447},"className":"SafePointE"},{"params":{"x":3300,"rotation":0,"y":-80,"id":0,"width":128,"height":1088},"className":"SafePointE"},{"params":{"x":4160,"rotation":0,"y":-380,"id":0,"width":128,"height":318},"className":"SafePointE"}],[{"params":{"x":1091,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1161,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1021,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":951,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1371,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1231,"rotation":0,"graphic":0,"safeId":1,"id":1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1301,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1511,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1441,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":-1192,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1110,"sndId":-1,"rotation":0,"y":-1104,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":667},"className":"ToggleE"},{"params":{"x":1040,"rotation":0,"graphic":0,"id":2,"y":-580,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":1340,"sndId":-1,"rotation":0,"y":-637,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":405,"height":111},"className":"ToggleE"}]],"settings":{"prizes":"29,36,44","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map13.json b/motox3mspooky/assets/levels/map13.json deleted file mode 100644 index 90f60e2a..00000000 --- a/motox3mspooky/assets/levels/map13.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":-190,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":285,"y":0,"length":285},{"x":285,"y":900,"length":944.0471386535738},{"x":0,"y":900,"length":900}],"y":-520},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9801,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":-1,"vertices":[{"x":108,"y":19,"length":109.65856099730654},{"x":95,"y":54,"length":109.27488274987991},{"x":70,"y":84,"length":109.34349546269316},{"x":37,"y":103,"length":109.4440496326776},{"x":0,"y":110,"length":110},{"x":-37,"y":103,"length":109.4440496326776},{"x":-70,"y":84,"length":109.34349546269316},{"x":-95,"y":54,"length":109.27488274987991},{"x":-108,"y":19,"length":109.65856099730654},{"x":-108,"y":-19,"length":109.65856099730654},{"x":-95,"y":-55,"length":109.77249200050075},{"x":-70,"y":-84,"length":109.34349546269316},{"x":-37,"y":-103,"length":109.4440496326776},{"x":0,"y":-110,"length":110},{"x":37,"y":-103,"length":109.4440496326776},{"x":70,"y":-84,"length":109.34349546269316},{"x":95,"y":-55,"length":109.77249200050075},{"x":108,"y":-19,"length":109.65856099730654}],"y":441},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":10700,"bg":true,"rotation":0,"y":320,"vertices":[{"x":0,"y":0,"length":0},{"x":445,"y":0,"length":445},{"x":445,"y":160,"length":472.8900506460249},{"x":0,"y":160,"length":160}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":10700,"rotation":0,"y":40,"vertices":[{"x":0,"y":0,"length":0},{"x":280,"y":280,"length":395.9797974644666},{"x":425,"y":280,"length":508.9449872039217},{"x":425,"y":425,"length":601.0407640085654},{"x":0,"y":415,"length":415}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":9491,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":310,"y":0,"length":310},{"x":354,"y":-5,"length":354.0353089735542},{"x":395,"y":-15,"length":395.28470752104744},{"x":434,"y":-32,"length":435.1781244502072},{"x":471,"y":-58,"length":474.55768880084537},{"x":498,"y":-84,"length":505.0346522764552},{"x":529,"y":-124,"length":543.3387525292118},{"x":548,"y":-160,"length":570.8800224215242},{"x":561,"y":-206,"length":597.6261373132872},{"x":567,"y":-246,"length":618.0655305062725},{"x":564,"y":-300,"length":638.8239194018959},{"x":553,"y":-347,"length":652.8537355334654},{"x":542,"y":-375,"length":659.0819372430108},{"x":527,"y":-400,"length":661.6109128483296},{"x":512,"y":-420,"length":662.2265473385977},{"x":1562,"y":-1296,"length":2029.645289206959},{"x":2280,"y":-1297,"length":2623.0914966885925},{"x":1546,"y":-641,"length":1673.617937284373},{"x":1222,"y":-642,"length":1380.3796579202403},{"x":1218,"y":-267,"length":1246.921408910762},{"x":1607,"y":-260,"length":1627.897109770762},{"x":1607,"y":-405,"length":1657.248925176903},{"x":3431,"y":-1928,"length":3935.5997001727706},{"x":3424,"y":-3846,"length":5149.319566700051},{"x":4531,"y":-3811,"length":5920.6150018389135},{"x":4676,"y":804,"length":4744.617160530447},{"x":0,"y":740,"length":740}],"y":700},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6904,"rotation":12,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":57,"y":6,"length":57.3149195236284},{"x":162,"y":2,"length":162.01234520862909},{"x":185,"y":-13,"length":185.4561942885705},{"x":195,"y":-39,"length":198.8617610301186},{"x":194,"y":-78,"length":209.093280618962},{"x":198,"y":-129,"length":236.31546711969574},{"x":207,"y":-175,"length":271.0608787708031},{"x":220,"y":-220,"length":311.1269837220809},{"x":239,"y":-262,"length":354.63361374804845},{"x":261,"y":-304,"length":400.67068772247364},{"x":283,"y":-340,"length":442.36749428501184},{"x":308,"y":-374,"length":484.4997420019953},{"x":335,"y":-403,"length":524.0553405891404},{"x":365,"y":-430,"length":564.0257086339238},{"x":399,"y":-456,"length":605.918311325875},{"x":436,"y":-480,"length":648.4566292359112},{"x":478,"y":-501,"length":692.4485540457139},{"x":521,"y":-518,"length":734.6870081878405},{"x":567,"y":-533,"length":778.1889230771664},{"x":598,"y":-539,"length":805.0621094052309},{"x":615,"y":-526,"length":809.2595380964008},{"x":609,"y":-509,"length":793.701455208443},{"x":576,"y":-494,"length":758.8227724574427},{"x":530,"y":-468,"length":707.0530390288977},{"x":493,"y":-442,"length":662.1276312011152},{"x":456,"y":-406,"length":610.5505712060223},{"x":424,"y":-373,"length":564.7167431553628},{"x":399,"y":-340,"length":524.2146506918707},{"x":374,"y":-299,"length":478.8287794191155},{"x":356,"y":-262,"length":442.01809917694544},{"x":338,"y":-217,"length":401.66279389557604},{"x":325,"y":-177,"length":370.0729657783719},{"x":317,"y":-139,"length":346.13581149600805},{"x":312,"y":-93,"length":325.56566157996457},{"x":310,"y":-49,"length":313.84868965793055},{"x":314,"y":-1,"length":314.00159235265033},{"x":333,"y":-1,"length":333.0015014981164},{"x":337,"y":-56,"length":341.62113517755307},{"x":343,"y":-93,"length":355.38429903415823},{"x":354,"y":-131,"length":377.4612562899668},{"x":367,"y":-170,"length":404.46137021970344},{"x":389,"y":-213,"length":443.4974633523849},{"x":414,"y":-255,"length":486.231426380484},{"x":445,"y":-299,"length":536.1212549414545},{"x":481,"y":-337,"length":587.3074152434992},{"x":532,"y":-380,"length":653.7767202952397},{"x":580,"y":-409,"length":709.7048682374949},{"x":627,"y":-430,"length":760.2821844552192},{"x":675,"y":-449,"length":810.6947637674737},{"x":712,"y":-459,"length":847.1274992585237},{"x":736,"y":-448,"length":861.6263691415206},{"x":729,"y":-426,"length":844.344124157917},{"x":695,"y":-408,"length":805.9088037737272},{"x":661,"y":-388,"length":766.4626540151842},{"x":621,"y":-356,"length":715.8051410824038},{"x":585,"y":-324,"length":668.7308875773572},{"x":552,"y":-284,"length":620.7737107835673},{"x":526,"y":-245,"length":580.2594247403483},{"x":499,"y":-195,"length":535.7480751248669},{"x":479,"y":-151,"length":502.236995849569},{"x":462,"y":-101,"length":472.91119673782305},{"x":452,"y":-54,"length":455.2142352782918},{"x":446,"y":-4,"length":446.0179368590461},{"x":474,"y":-4,"length":474.01687733666193},{"x":488,"y":-56,"length":491.20260585628006},{"x":505,"y":-101,"length":515.0009708728712},{"x":527,"y":-139,"length":545.0229352972221},{"x":550,"y":-176,"length":577.4738089298943},{"x":577,"y":-210,"length":614.0268723761201},{"x":603,"y":-238,"length":648.269234192091},{"x":632,"y":-266,"length":685.6967259656415},{"x":662,"y":-289,"length":722.3330256882901},{"x":694,"y":-309,"length":759.6821703844312},{"x":731,"y":-330,"length":802.0355353723425},{"x":774,"y":-350,"length":849.4562966980703},{"x":823,"y":-366,"length":900.7136059813907},{"x":854,"y":-358,"length":926.002159824695},{"x":851,"y":-333,"length":913.8325886069067},{"x":809,"y":-309,"length":866.0034641963044},{"x":773,"y":-285,"length":823.8652802491437},{"x":732,"y":-253,"length":774.4888637030232},{"x":705,"y":-224,"length":739.7303562785564},{"x":676,"y":-189,"length":701.9237850365238},{"x":657,"y":-161,"length":676.4392064332168},{"x":636,"y":-127,"length":648.5560885536423},{"x":619,"y":-89,"length":625.3654931318165},{"x":602,"y":-44,"length":603.6058316484359},{"x":589,"y":-6,"length":589.030559478878},{"x":641,"y":-6,"length":641.0280805081786},{"x":667,"y":-48,"length":668.7249060712484},{"x":701,"y":-93,"length":707.1421356417676},{"x":736,"y":-134,"length":748.0989239398757},{"x":770,"y":-163,"length":787.0635298373315},{"x":812,"y":-194,"length":834.8532805229911},{"x":860,"y":-220,"length":887.6936408468858},{"x":910,"y":-241,"length":941.3718712602368},{"x":963,"y":-258,"length":996.9618849284059},{"x":987,"y":-244,"length":1016.7128404815196},{"x":971,"y":-218,"length":995.1708396049394},{"x":929,"y":-193,"length":948.8361291603519},{"x":882,"y":-159,"length":896.2170496034987},{"x":843,"y":-124,"length":852.0710064308021},{"x":813,"y":-87,"length":817.6417308332544},{"x":783,"y":-44,"length":784.23529632375},{"x":763,"y":-8,"length":763.0419385590808},{"x":806,"y":-8,"length":806.0397012554655},{"x":844,"y":-44,"length":845.1461412087261},{"x":897,"y":-74,"length":900.0472209834327},{"x":944,"y":-96,"length":948.8688002036952},{"x":993,"y":-114,"length":999.522385942406},{"x":1037,"y":-110,"length":1042.81781726244},{"x":1023,"y":-79,"length":1026.0458079442653},{"x":986,"y":-58,"length":987.7044092237313},{"x":950,"y":-34,"length":950.6082263477421},{"x":915,"y":-8,"length":915.034972009267},{"x":1090,"y":-10,"length":1090.0458705944443},{"x":1100,"y":16,"length":1100.1163574822438},{"x":1092,"y":50,"length":1093.1440893130236},{"x":1057,"y":66,"length":1059.058544179688},{"x":117,"y":88,"length":146.40013661195812},{"x":66,"y":83,"length":106.04244433244644},{"x":43,"y":61,"length":74.63243262818116},{"x":39,"y":33,"length":51.088159097779204}],"y":834},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6982,"rotation":-3,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":100,"y":0,"length":100},{"x":93,"y":34,"length":99.02019995940222},{"x":76,"y":64,"length":99.35793878699377},{"x":50,"y":86,"length":99.4786409235671},{"x":17,"y":98,"length":99.46356116689167},{"x":-17,"y":98,"length":99.46356116689167},{"x":-49,"y":86,"length":98.97979591815695},{"x":-76,"y":64,"length":99.35793878699377},{"x":-93,"y":34,"length":99.02019995940222},{"x":-100,"y":0,"length":100},{"x":-93,"y":-34,"length":99.02019995940222},{"x":-76,"y":-64,"length":99.35793878699377},{"x":-50,"y":-86,"length":99.4786409235671},{"x":-17,"y":-98,"length":99.46356116689167},{"x":17,"y":-98,"length":99.46356116689167},{"x":50,"y":-86,"length":99.4786409235671},{"x":76,"y":-64,"length":99.35793878699377},{"x":93,"y":-34,"length":99.02019995940222}],"y":884},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7934,"rotation":-3,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":100,"y":0,"length":100},{"x":93,"y":34,"length":99.02019995940222},{"x":76,"y":64,"length":99.35793878699377},{"x":50,"y":86,"length":99.4786409235671},{"x":17,"y":98,"length":99.46356116689167},{"x":-17,"y":98,"length":99.46356116689167},{"x":-49,"y":86,"length":98.97979591815695},{"x":-76,"y":64,"length":99.35793878699377},{"x":-93,"y":34,"length":99.02019995940222},{"x":-100,"y":0,"length":100},{"x":-93,"y":-34,"length":99.02019995940222},{"x":-76,"y":-64,"length":99.35793878699377},{"x":-50,"y":-86,"length":99.4786409235671},{"x":-17,"y":-98,"length":99.46356116689167},{"x":17,"y":-98,"length":99.46356116689167},{"x":50,"y":-86,"length":99.4786409235671},{"x":76,"y":-64,"length":99.35793878699377},{"x":93,"y":-34,"length":99.02019995940222}],"y":1076},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2630,"bg":true,"rotation":0,"y":300,"vertices":[{"x":0,"y":0,"length":0},{"x":1085,"y":0,"length":1085},{"x":1085,"y":645,"length":1262.2400722525015},{"x":0,"y":645,"length":645}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":-60,"physic":true,"lineId":0,"y":300,"height":1219.85,"isRoad":true,"direction":90,"width":9567,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2695,"y":0,"length":2695},{"x":2695,"y":635,"length":2768.799378792187},{"x":3765,"y":625,"length":3816.5232869720576},{"x":3765,"y":-190,"length":3769.7911082711203},{"x":4400,"y":-190,"length":4404.100362162516},{"x":5490,"y":395,"length":5504.191584601685},{"x":5565,"y":430,"length":5581.588035675869},{"x":5630,"y":454,"length":5648.275489032028},{"x":5711,"y":475,"length":5730.7195010748865},{"x":5792,"y":484,"length":5812.187195884179},{"x":5868,"y":489,"length":5888.339749029433},{"x":5933,"y":488,"length":5953.035612189801},{"x":6003,"y":479,"length":6022.080205377541},{"x":6075,"y":466,"length":6092.846707410256},{"x":6148,"y":446,"length":6164.156065512942},{"x":6217,"y":421,"length":6231.23823970806},{"x":6265,"y":397,"length":6277.56592956219},{"x":6315,"y":367,"length":6325.655222978881},{"x":6362,"y":333,"length":6370.708987232112},{"x":6472,"y":224,"length":6475.875230422525},{"x":6561,"y":219,"length":6564.653989358464},{"x":6561,"y":588,"length":6587.295727383127},{"x":8462,"y":959,"length":8516.168445962068},{"x":8462,"y":399,"length":8471.401595958016},{"x":9554,"y":400,"length":9562.369789963155}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":6671,"bg":true,"rotation":0,"y":960,"vertices":[{"x":0,"y":0,"length":0},{"x":1995,"y":0,"length":1995},{"x":2005,"y":645,"length":2106.1932484935946},{"x":0,"y":350,"length":350}],"viscosity":1.5,"id":-1,"sf":true,"density":0.1},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":1480,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":310,"density":"1","height":262.85,"action":0,"isStatic":true,"wireframe":false,"width":566.85,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":60,"y":-12,"length":61.18823416311342},{"x":107,"y":-28,"length":110.60289327137876},{"x":142,"y":-48,"length":149.89329538041386},{"x":169,"y":-69,"length":182.54314558481784},{"x":196,"y":-96,"length":218.24756585125985},{"x":222,"y":-131,"length":257.76927667974707},{"x":240,"y":-166,"length":291.81500989496755},{"x":253,"y":-210,"length":328.7993308995625},{"x":268,"y":-234,"length":355.7808314116993},{"x":287,"y":-245,"length":377.3512952144195},{"x":311,"y":-246,"length":396.531209364408},{"x":355,"y":-241,"length":429.0757508878823},{"x":381,"y":-234,"length":447.1207890492233},{"x":412,"y":-220,"length":467.0588827974477},{"x":444,"y":-200,"length":486.9661179178691},{"x":466,"y":-182,"length":500.2799216438733},{"x":488,"y":-159,"length":513.2494520211395},{"x":505,"y":-138,"length":523.515997845338},{"x":519,"y":-116,"length":531.8054155421887},{"x":533,"y":-89,"length":540.3794962801605},{"x":545,"y":-48,"length":547.1096782181796},{"x":552,"y":-9,"length":552.0733646898752}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2120,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":392,"action":0,"isStatic":true,"wireframe":false,"width":685,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-123,"y":14,"length":123.79418403139947},{"x":-65,"y":9,"length":65.62011886609167},{"x":-9,"y":1,"length":9.055385138137417},{"x":60,"y":-12,"length":61.18823416311342},{"x":107,"y":-28,"length":110.60289327137876},{"x":142,"y":-48,"length":149.89329538041386},{"x":169,"y":-69,"length":182.54314558481784},{"x":196,"y":-96,"length":218.24756585125985},{"x":222,"y":-131,"length":257.76927667974707},{"x":240,"y":-166,"length":291.81500989496755},{"x":256,"y":-204,"length":327.34080100103625},{"x":272,"y":-233,"length":358.1522022827725},{"x":289,"y":-246,"length":379.52206786957726},{"x":311,"y":-246,"length":396.531209364408},{"x":355,"y":-241,"length":429.0757508878823},{"x":381,"y":-234,"length":447.1207890492233},{"x":412,"y":-220,"length":467.0588827974477},{"x":444,"y":-200,"length":486.9661179178691},{"x":466,"y":-182,"length":500.2799216438733},{"x":488,"y":-159,"length":513.2494520211395},{"x":505,"y":-138,"length":523.515997845338},{"x":519,"y":-116,"length":531.8054155421887},{"x":533,"y":-89,"length":540.3794962801605},{"x":545,"y":-48,"length":547.1096782181796},{"x":547,"y":-4,"length":547.0146250330058},{"x":540,"y":53,"length":542.5946921966708},{"x":517,"y":131,"length":533.3385416412356}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":-60,"physic":false,"lineId":0,"y":300,"height":1760,"isRoad":false,"direction":90,"width":12892,"textureMode":true,"cameraOffsetY":80,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":false,"wireframe":false,"vertices":[{"x":-1,"y":96,"length":96.00520819205592},{"x":2686,"y":96,"length":2687.7150146546414},{"x":3764,"y":-107,"length":3765.520548343881},{"x":4399,"y":-107,"length":4400.301126059443},{"x":5491,"y":452,"length":5509.5721249476355},{"x":5566,"y":487,"length":5587.264536425674},{"x":5631,"y":511,"length":5654.138484331632},{"x":5712,"y":532,"length":5736.721014656369},{"x":5793,"y":541,"length":5818.206768412412},{"x":5869,"y":546,"length":5894.342796275086},{"x":6644,"y":734,"length":6684.421590534218},{"x":7652,"y":848,"length":7698.84458863796},{"x":7910,"y":845,"length":7955.00628535264},{"x":8110,"y":805,"length":8149.854293176044},{"x":8294,"y":761,"length":8328.83887465714},{"x":8466,"y":736,"length":8497.932219075414},{"x":8609,"y":482,"length":8622.48253115076},{"x":9807,"y":432,"length":9816.510225125832},{"x":9973,"y":363,"length":9979.604100363902},{"x":10155,"y":251,"length":10158.101495850491},{"x":10638,"y":-234,"length":10640.57329282591},{"x":11113,"y":-891,"length":11148.661354620113},{"x":12251,"y":-899,"length":12283.940817180779},{"x":12878,"y":-814,"length":12903.700244503512}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":9492,"rotation":0,"physic":false,"line":false,"plr":false,"id":11,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":515,"y":-325,"length":608.9745479082028},{"x":555,"y":-275,"length":619.3948659780771},{"x":600,"y":-160,"length":620.966987850401},{"x":565,"y":-10,"length":565.0884886458049},{"x":475,"y":105,"length":486.46685395821163},{"x":270,"y":155,"length":311.3278015211619},{"x":15,"y":180,"length":180.62391868188442},{"x":0,"y":100,"length":100}],"y":601},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":9160,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-460,"density":"1","height":817,"action":0,"isStatic":true,"wireframe":false,"width":425,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":43,"y":-44,"length":61.5223536610881},{"x":12,"y":11,"length":16.278820596099706},{"x":-22,"y":72,"length":75.28612089887484},{"x":-61,"y":138,"length":150.88074761214565},{"x":-103,"y":207,"length":231.2098613813866},{"x":-141,"y":269,"length":303.71368095625854},{"x":-177,"y":325,"length":370.0729657783719},{"x":-205,"y":370,"length":422.9952718411874},{"x":-219,"y":400,"length":456.0274114568114},{"x":-233,"y":436,"length":494.35311266340784},{"x":-238,"y":478,"length":533.9737821279243},{"x":-238,"y":525,"length":576.427792529125},{"x":-232,"y":563,"length":608.9277461242837},{"x":-220,"y":600,"length":639.0618123468183},{"x":-205,"y":630,"length":662.514150792268},{"x":-181,"y":662,"length":686.298040212851},{"x":-154,"y":691,"length":707.9526820346117},{"x":-118,"y":719,"length":728.6185558987638},{"x":-82,"y":738,"length":742.5415813272682},{"x":-40,"y":752,"length":753.0630783672773},{"x":7,"y":758,"length":758.032321210646},{"x":52,"y":757,"length":758.7838954537715},{"x":96,"y":748,"length":754.1352663813037},{"x":139,"y":729,"length":742.1334111869644},{"x":172,"y":709,"length":729.5649388505453}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":9070,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":300,"density":"1","height":1808.05,"action":0,"isStatic":true,"wireframe":false,"width":700,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-585,"y":-1790,"length":1883.1688718752762},{"x":-585,"y":-1705,"length":1802.5676131562998},{"x":-585,"y":-1625,"length":1727.092933226235},{"x":-585,"y":-1525,"length":1633.3554420272399},{"x":-585,"y":-1415,"length":1531.1596912144728},{"x":-585,"y":-1310,"length":1434.6863768782362},{"x":-585,"y":-1205,"length":1339.4961739400378},{"x":-585,"y":-1115,"length":1259.1465363491257},{"x":-585,"y":-1010,"length":1167.1867888217378},{"x":-585,"y":-920,"length":1090.2407990898157},{"x":-585,"y":-815,"length":1003.2198163912035},{"x":-585,"y":-725,"length":931.584671406738},{"x":-585,"y":-640,"length":867.0784278253035},{"x":-582,"y":-583,"length":823.7797035615772},{"x":-572,"y":-524,"length":775.7319124542963},{"x":-551,"y":-456,"length":715.2181485393111},{"x":-526,"y":-393,"length":656.6010965571105},{"x":-493,"y":-331,"length":593.8097338373631},{"x":-456,"y":-275,"length":532.5044600752185},{"x":-419,"y":-225,"length":475.5901596963503},{"x":-379,"y":-185,"length":421.7416270656716},{"x":-334,"y":-146,"length":364.51611761347397},{"x":-282,"y":-108,"length":301.97350877187887},{"x":-225,"y":-75,"length":237.17082451262846},{"x":-155,"y":-41,"length":160.3309078125612},{"x":-111,"y":-23,"length":113.35784048754634},{"x":-57,"y":-11,"length":58.05170109479997},{"x":9,"y":-1,"length":9.055385138137417},{"x":64,"y":3,"length":64.07027391856539},{"x":100,"y":0,"length":100}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":9210,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":180,"density":"1","height":1688.45,"action":0,"isStatic":true,"wireframe":false,"width":310,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-585,"y":-1790,"length":1883.1688718752762},{"x":-585,"y":-1705,"length":1802.5676131562998},{"x":-585,"y":-1625,"length":1727.092933226235},{"x":-585,"y":-1525,"length":1633.3554420272399},{"x":-585,"y":-1415,"length":1531.1596912144728},{"x":-585,"y":-1310,"length":1434.6863768782362},{"x":-585,"y":-1205,"length":1339.4961739400378},{"x":-585,"y":-1115,"length":1259.1465363491257},{"x":-585,"y":-1010,"length":1167.1867888217378},{"x":-585,"y":-920,"length":1090.2407990898157},{"x":-585,"y":-815,"length":1003.2198163912035},{"x":-585,"y":-725,"length":931.584671406738},{"x":-585,"y":-640,"length":867.0784278253035},{"x":-582,"y":-583,"length":823.7797035615772},{"x":-572,"y":-524,"length":775.7319124542963},{"x":-551,"y":-456,"length":715.2181485393111},{"x":-526,"y":-393,"length":656.6010965571105},{"x":-493,"y":-331,"length":593.8097338373631},{"x":-456,"y":-275,"length":532.5044600752185},{"x":-419,"y":-225,"length":475.5901596963503},{"x":-379,"y":-185,"length":421.7416270656716},{"x":-334,"y":-146,"length":364.51611761347397},{"x":-290,"y":-115,"length":311.96954979612997}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":9370,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":70,"density":"1","height":1598,"action":0,"isStatic":true,"wireframe":false,"width":210,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-585,"y":-1790,"length":1883.1688718752762},{"x":-585,"y":-1705,"length":1802.5676131562998},{"x":-585,"y":-1625,"length":1727.092933226235},{"x":-585,"y":-1525,"length":1633.3554420272399},{"x":-585,"y":-1415,"length":1531.1596912144728},{"x":-585,"y":-1310,"length":1434.6863768782362},{"x":-585,"y":-1205,"length":1339.4961739400378},{"x":-585,"y":-1115,"length":1259.1465363491257},{"x":-585,"y":-1010,"length":1167.1867888217378},{"x":-585,"y":-920,"length":1090.2407990898157},{"x":-585,"y":-815,"length":1003.2198163912035},{"x":-585,"y":-725,"length":931.584671406738},{"x":-585,"y":-640,"length":867.0784278253035},{"x":-582,"y":-583,"length":823.7797035615772},{"x":-572,"y":-524,"length":775.7319124542963},{"x":-551,"y":-456,"length":715.2181485393111},{"x":-526,"y":-393,"length":656.6010965571105},{"x":-493,"y":-331,"length":593.8097338373631},{"x":-456,"y":-275,"length":532.5044600752185},{"x":-390,"y":-205,"length":440.5961870012041}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":9530,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-70,"density":"1","height":1553,"action":0,"isStatic":true,"wireframe":false,"width":165.4,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-585,"y":-1790,"length":1883.1688718752762},{"x":-585,"y":-1705,"length":1802.5676131562998},{"x":-585,"y":-1625,"length":1727.092933226235},{"x":-585,"y":-1525,"length":1633.3554420272399},{"x":-585,"y":-1415,"length":1531.1596912144728},{"x":-585,"y":-1310,"length":1434.6863768782362},{"x":-585,"y":-1205,"length":1339.4961739400378},{"x":-585,"y":-1115,"length":1259.1465363491257},{"x":-585,"y":-1010,"length":1167.1867888217378},{"x":-585,"y":-920,"length":1090.2407990898157},{"x":-585,"y":-815,"length":1003.2198163912035},{"x":-585,"y":-725,"length":931.584671406738},{"x":-585,"y":-640,"length":867.0784278253035},{"x":-582,"y":-583,"length":823.7797035615772},{"x":-572,"y":-524,"length":775.7319124542963},{"x":-551,"y":-456,"length":715.2181485393111},{"x":-526,"y":-393,"length":656.6010965571105},{"x":-493,"y":-331,"length":593.8097338373631},{"x":-435,"y":-250,"length":501.72203459684727}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":9690,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-180,"density":"1","height":1472,"action":0,"isStatic":true,"wireframe":false,"width":108,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-585,"y":-1790,"length":1883.1688718752762},{"x":-585,"y":-1705,"length":1802.5676131562998},{"x":-585,"y":-1625,"length":1727.092933226235},{"x":-585,"y":-1525,"length":1633.3554420272399},{"x":-585,"y":-1415,"length":1531.1596912144728},{"x":-585,"y":-1310,"length":1434.6863768782362},{"x":-585,"y":-1205,"length":1339.4961739400378},{"x":-585,"y":-1115,"length":1259.1465363491257},{"x":-585,"y":-1010,"length":1167.1867888217378},{"x":-585,"y":-920,"length":1090.2407990898157},{"x":-585,"y":-815,"length":1003.2198163912035},{"x":-585,"y":-725,"length":931.584671406738},{"x":-585,"y":-640,"length":867.0784278253035},{"x":-582,"y":-583,"length":823.7797035615772},{"x":-572,"y":-524,"length":775.7319124542963},{"x":-551,"y":-456,"length":715.2181485393111},{"x":-526,"y":-393,"length":656.6010965571105},{"x":-493,"y":-331,"length":593.8097338373631}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":12794,"rotation":93,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":2,"y":-1,"length":2.23606797749979},{"x":194,"y":187,"length":269.45314991664134},{"x":279,"y":188,"length":336.42978465052704},{"x":357,"y":262,"length":442.82389276099366},{"x":350,"y":300,"length":460.9772228646444},{"x":305,"y":310,"length":434.8850422812907},{"x":295,"y":360,"length":465.4299087940095},{"x":255,"y":375,"length":453.48649373492924},{"x":250,"y":425,"length":493.0770730829005},{"x":205,"y":440,"length":485.41219597368996},{"x":125,"y":380,"length":400.03124877939223},{"x":106,"y":296,"length":314.40737904826597},{"x":-121,"y":146,"length":189.62331080328704},{"x":-75,"y":125,"length":145.7737973711325},{"x":-55,"y":75,"length":93.00537618869137},{"x":-15,"y":45,"length":47.43416490252569}],"y":-1237},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":10670,"rotation":0,"physic":true,"line":false,"plr":false,"id":13,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":1080,"y":-615,"length":1242.8294331886416},{"x":2290,"y":-640,"length":2377.7510382712485},{"x":1615,"y":400,"length":1663.7983651873203},{"x":10,"y":540,"length":540.0925846556311}],"y":20},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"x":2698,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2769,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2839,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2908,"active":true,"y":119,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2979,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3049,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3118,"active":true,"y":121,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3188,"active":true,"y":121,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3258,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3329,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3399,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3468,"active":true,"y":121,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3538,"active":true,"y":121,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3608,"active":true,"y":121,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3678,"active":true,"y":120,"safeId":-1,"id":21,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4030,"y":50,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":8570,"y":639,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":11200,"y":-657,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":270,"rotation":0,"y":260,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":620,"rotation":0,"y":260,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":690,"rotation":6,"y":260,"width":92.7,"height":85.5},"className":"Dec27"},{"params":{"x":1220,"rotation":-18,"y":260,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":2020,"rotation":0,"y":270,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":2090,"rotation":0,"y":270,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3998,"y":68,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":5800,"rotation":0,"y":750,"width":95,"height":72.35},"className":"Dec26"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":8534,"y":649,"width":80.2,"height":95.5},"className":"Dec24"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":11168,"y":-633,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":1890,"ag":true,"active":true,"y":90,"sgos":true,"btg":false,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":2530,"ag":true,"active":true,"y":-50,"sgos":true,"btg":false,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":6510,"rotation":0,"y":400,"time":2,"safeId":-1,"force":2000,"width":64.1,"height":64.1},"className":"BoostE"},{"params":{"x":9510,"stones":false,"physic":false,"impulse":1,"id":11,"radius":1,"y":676,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":9610,"stones":false,"physic":false,"impulse":1,"id":11,"radius":1,"y":596,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":9710,"stones":false,"physic":false,"impulse":1,"id":11,"radius":1,"y":516,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":9918,"stones":false,"physic":false,"impulse":1,"id":11,"radius":1,"y":349,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":10018,"stones":false,"physic":false,"impulse":1,"id":11,"radius":1,"y":269,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"}],null,[{"params":{"x":400,"rotation":0,"y":220,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":4030,"rotation":0,"y":-30,"id":0,"width":128,"height":5673},"className":"SafePointE"},{"params":{"x":8570,"rotation":0,"y":561,"id":0,"width":128,"height":1385},"className":"SafePointE"},{"params":{"x":11200,"rotation":0,"y":-740,"id":0,"width":128,"height":1980},"className":"SafePointE"}],[{"params":{"x":9801,"active":0,"y":441,"cycle":0,"body":true,"id":4,"position":0,"width":1261,"height":1053,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1248,"y":-1040,"length":1624.5319325885841}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":620},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":9801,"rotation":0,"graphic":1,"id":3,"y":441,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":7935,"rotation":-9,"graphic":0,"id":2,"y":1076,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-100,"useWeld":false},"className":"MotorJointE"},{"params":{"x":6982,"rotation":-9,"graphic":0,"id":2,"y":884,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-100,"useWeld":false},"className":"MotorJointE"},{"params":{"x":7130,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":860,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1890,"rotation":0,"graphic":1,"id":1,"y":90,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":1170,"sndId":-1,"rotation":0,"y":160,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":546},"className":"ToggleE"},{"params":{"x":2530,"rotation":0,"graphic":1,"id":1,"y":-50,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2734,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2803,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":119,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2874,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2944,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3013,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3084,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3153,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3224,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3294,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3363,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3434,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3503,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3573,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3643,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3713,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2665,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":119,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5780,"sndId":-1,"rotation":0,"y":430,"fnl":false,"safeId":-1,"id_off":21,"off":false,"id":2,"width":64,"height":874},"className":"ToggleE"},{"params":{"x":8770,"sndId":-1,"rotation":0,"y":320,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":3,"width":64,"height":946},"className":"ToggleE"},{"params":{"x":10140,"sndId":-1,"rotation":0,"y":-10,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":4,"width":64,"height":554},"className":"ToggleE"},{"params":{"x":9280,"sndId":-1,"rotation":0,"y":330,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":64,"height":946},"className":"ToggleE"},{"params":{"x":12600,"active":0,"y":-1160,"cycle":0,"body":false,"id":12,"position":0,"width":589,"height":557,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-576,"y":544,"length":792.2827778009566}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":2000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":12042,"sndId":-1,"rotation":-36,"y":-770,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":12,"width":888,"height":64},"className":"ToggleE"},{"params":{"x":11200,"sndId":-1,"rotation":0,"y":-1060,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":13,"width":64,"height":1481},"className":"ToggleE"},{"params":{"x":1190,"sndId":-1,"rotation":0,"y":150,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":21,"width":64,"height":952},"className":"ToggleE"},{"params":{"x":5800,"sndId":-1,"rotation":0,"y":200,"fnl":false,"safeId":-1,"id_off":1,"off":false,"id":0,"width":64,"height":1855},"className":"ToggleE"}]],"settings":{"prizes":"27,35,44","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map14.json b/motox3mspooky/assets/levels/map14.json deleted file mode 100644 index db5a928e..00000000 --- a/motox3mspooky/assets/levels/map14.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":13370,"rotation":0,"y":2090,"vertices":[{"x":0,"y":0,"length":0},{"x":4865,"y":0,"length":4865},{"x":4870,"y":470,"length":4892.627106166992},{"x":5,"y":470,"length":470.02659499224086}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":13380,"bg":true,"rotation":0,"y":2120,"vertices":[{"x":0,"y":0,"length":0},{"x":4800,"y":5,"length":4800.00260416596},{"x":4795,"y":315,"length":4805.335576211093},{"x":-5,"y":310,"length":310.0403199585499}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":11480,"bg":true,"rotation":0,"y":1080,"vertices":[{"x":-805,"y":0,"length":805},{"x":100,"y":0,"length":100},{"x":105,"y":285,"length":303.7268509697488},{"x":-800,"y":285,"length":849.2496688253697}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":7583,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":150,"y":0,"length":150},{"x":144,"y":38,"length":148.92951352905172},{"x":129,"y":74,"length":148.71785366928881},{"x":106,"y":106,"length":149.90663761154806},{"x":75,"y":129,"length":149.21796138535066},{"x":38,"y":144,"length":148.92951352905172},{"x":0,"y":150,"length":150},{"x":-38,"y":144,"length":148.92951352905172},{"x":-74,"y":129,"length":148.71785366928881},{"x":-106,"y":106,"length":149.90663761154806},{"x":-129,"y":74,"length":148.71785366928881},{"x":-144,"y":38,"length":148.92951352905172},{"x":-150,"y":0,"length":150},{"x":-144,"y":-38,"length":148.92951352905172},{"x":-129,"y":-75,"length":149.21796138535066},{"x":-106,"y":-106,"length":149.90663761154806},{"x":-75,"y":-129,"length":149.21796138535066},{"x":-38,"y":-144,"length":148.92951352905172},{"x":0,"y":-150,"length":150},{"x":38,"y":-144,"length":148.92951352905172},{"x":75,"y":-129,"length":149.21796138535066},{"x":106,"y":-106,"length":149.90663761154806},{"x":129,"y":-75,"length":149.21796138535066},{"x":144,"y":-38,"length":148.92951352905172}],"y":1182},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6750,"bg":true,"rotation":0,"y":1190,"vertices":[{"x":0,"y":0,"length":0},{"x":2175,"y":0,"length":2175},{"x":2180,"y":480,"length":2232.2186272854187},{"x":5,"y":480,"length":480.02604096027954}],"viscosity":1.5,"id":-1,"sf":true,"density":2.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":5140,"rotation":0,"y":1790,"originOffsetRatio":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"height":343,"wireframe":false,"width":783,"vertices":[{"x":0,"y":0,"length":0},{"x":115,"y":-330,"length":349.4638751001311},{"x":770,"y":-320,"length":833.8465086573187}],"textureMode":true,"smoothing":true,"straightSides":true,"type":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"x":4960,"bg":true,"rotation":0,"y":1572,"vertices":[{"x":0,"y":0,"length":0},{"x":560,"y":0,"length":560},{"x":560,"y":200,"length":594.6427498927402},{"x":0,"y":200,"length":200}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":4880,"rotation":0,"y":1580,"originOffsetRatio":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"height":343,"wireframe":false,"width":783,"vertices":[{"x":0,"y":0,"length":0},{"x":115,"y":-330,"length":349.4638751001311},{"x":770,"y":-320,"length":833.8465086573187}],"textureMode":true,"smoothing":true,"straightSides":true,"type":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"x":110,"physic":true,"lineId":0,"y":580,"height":1998.35,"isRoad":true,"direction":90,"width":5843,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":937,"y":-1,"length":937.0005336177776},{"x":992,"y":-1,"length":992.00050403213},{"x":1047,"y":-11,"length":1047.0577825507053},{"x":1103,"y":-34,"length":1103.5239009645418},{"x":1154,"y":-79,"length":1156.7009120771022},{"x":1204,"y":-149,"length":1213.1846520624963},{"x":1291,"y":-356,"length":1339.1852000376946},{"x":1317,"y":-393,"length":1374.3864085474652},{"x":1340,"y":-414,"length":1402.4963458062912},{"x":1366,"y":-432,"length":1432.6827981098957},{"x":1395,"y":-447,"length":1464.8665468226106},{"x":1427,"y":-459,"length":1499.0030019983283},{"x":1460,"y":-464,"length":1531.9582239734868},{"x":1497,"y":-463,"length":1566.9645816035536},{"x":1535,"y":-456,"length":1601.2997845500386},{"x":1572,"y":-443,"length":1633.2277857053498},{"x":1603,"y":-424,"length":1658.1269553324316},{"x":1635,"y":-396,"length":1682.2725700670508},{"x":1661,"y":-372,"length":1702.1471734253769},{"x":1686,"y":-349,"length":1721.7424313758431},{"x":1719,"y":-330,"length":1750.388813949632},{"x":1758,"y":-319,"length":1786.7078664403982},{"x":1793,"y":-316,"length":1820.633131633059},{"x":1827,"y":-318,"length":1854.4683874361406},{"x":1861,"y":-325,"length":1889.1654242019147},{"x":1895,"y":-340,"length":1925.259722738727},{"x":1924,"y":-358,"length":1957.0232497341467},{"x":1952,"y":-382,"length":1989.02689775679},{"x":1978,"y":-415,"length":2021.066302722402},{"x":1993,"y":-444,"length":2041.8582223063383},{"x":2096,"y":-661,"length":2197.7572659418056},{"x":2119,"y":-709,"length":2234.466826784412},{"x":2143,"y":-739,"length":2266.841414832542},{"x":2187,"y":-768,"length":2317.928601143702},{"x":2233,"y":-781,"length":2365.6394484367224},{"x":2278,"y":-785,"length":2409.46238816878},{"x":2321,"y":-782,"length":2449.196807118611},{"x":2367,"y":-768,"length":2488.4760396676515},{"x":2407,"y":-741,"length":2518.477714811072},{"x":2443,"y":-708,"length":2543.5237368658463},{"x":4070,"y":1019,"length":4195.624029867309},{"x":4116,"y":1058,"length":4249.802348345156},{"x":4170,"y":1092,"length":4310.6106295976215},{"x":4223,"y":1118,"length":4368.484062005949},{"x":4287,"y":1138,"length":4435.472128195599},{"x":4358,"y":1148,"length":4506.6692800781375},{"x":4434,"y":1147,"length":4579.952510670826},{"x":4505,"y":1135,"length":4645.777652880086},{"x":4574,"y":1112,"length":4707.2306083301255},{"x":4639,"y":1072,"length":4761.250360987122},{"x":4694,"y":1026,"length":4804.82174487254},{"x":4735,"y":1000,"length":4839.444699549733},{"x":4786,"y":988,"length":4886.915182402903},{"x":4844,"y":988,"length":4943.731384288592},{"x":4884,"y":1002,"length":4985.725624219608},{"x":4922,"y":1036,"length":5029.8489042912615},{"x":4955,"y":1070,"length":5069.2134498361775},{"x":4997,"y":1102,"length":5117.070744087871},{"x":5038,"y":1128,"length":5162.7345467300565},{"x":5079,"y":1139,"length":5205.147644399724},{"x":5134,"y":1149,"length":5261.003421401662},{"x":5198,"y":1143,"length":5322.184983632193},{"x":5254,"y":1129,"length":5373.933103416901},{"x":5305,"y":1098,"length":5417.437493871064},{"x":5344,"y":1067,"length":5449.479332927138},{"x":5379,"y":1018,"length":5474.483080620489},{"x":5407,"y":964,"length":5492.26228434149},{"x":5419,"y":919,"length":5496.373531702517},{"x":5418,"y":828,"length":5480.9039400449265},{"x":5442,"y":775,"length":5496.907221338195},{"x":5480,"y":729,"length":5528.276494532451},{"x":5540,"y":673,"length":5580.728357481665},{"x":5614,"y":634,"length":5649.686008974304},{"x":5670,"y":615,"length":5703.2556491884525},{"x":5738,"y":605,"length":5769.806669204783},{"x":5830,"y":606,"length":5861.410751687686}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":3065,"rotation":33,"physic":true,"line":true,"plr":false,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":175,"y":0,"length":175},{"x":145,"y":15,"length":145.7737973711325},{"x":175,"y":30,"length":177.55280904564702},{"x":0,"y":30,"length":30},{"x":-40,"y":15,"length":42.720018726587654}],"y":413},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5858,"physic":true,"lineId":0,"y":1186,"height":3313.9,"isRoad":true,"direction":90,"width":12466.4,"textureMode":true,"cameraOffsetY":120,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":true,"wireframe":false,"vertices":[{"x":75,"y":0,"length":75},{"x":899,"y":5,"length":899.0139042306298},{"x":922,"y":48,"length":923.2486122383287},{"x":959,"y":98,"length":963.9942945889254},{"x":1005,"y":147,"length":1015.6938515123541},{"x":1046,"y":191,"length":1063.2953493738228},{"x":1092,"y":230,"length":1115.958780600789},{"x":1145,"y":262,"length":1174.5931210423464},{"x":1201,"y":286,"length":1234.5837355157405},{"x":1261,"y":303,"length":1296.892439641777},{"x":1327,"y":311,"length":1362.956345595852},{"x":1395,"y":309,"length":1428.8127938956873},{"x":1456,"y":298,"length":1486.1830304508258},{"x":1516,"y":283,"length":1542.1883801922513},{"x":1579,"y":268,"length":1601.5820303687226},{"x":1663,"y":253,"length":1682.1349529689942},{"x":1740,"y":242,"length":1756.7481322033616},{"x":1823,"y":235,"length":1838.084328859805},{"x":1920,"y":235,"length":1934.3280487032182},{"x":2012,"y":239,"length":2026.145355101652},{"x":2115,"y":248,"length":2129.4903146058214},{"x":2209,"y":255,"length":2223.6694898298174},{"x":2313,"y":259,"length":2327.4556923817045},{"x":2435,"y":260,"length":2448.8415628619177},{"x":2550,"y":258,"length":2563.0185329021715},{"x":2636,"y":229,"length":2645.928381494858},{"x":2689,"y":178,"length":2694.884969715776},{"x":2749,"y":104,"length":2750.96655741214},{"x":2791,"y":44,"length":2791.3468075464934},{"x":2839,"y":20,"length":2839.0704464665896},{"x":2921,"y":14,"length":2921.033549961383},{"x":3057,"y":0,"length":3057},{"x":3106,"y":-12,"length":3106.0231808536137},{"x":3110,"y":-38,"length":3110.2321456765894},{"x":3129,"y":-48,"length":3129.368147086565},{"x":4323,"y":-48,"length":4323.26647339717},{"x":4395,"y":-58,"length":4395.38269096105},{"x":4457,"y":-79,"length":4457.7000796374805},{"x":4517,"y":-105,"length":4518.220224823044},{"x":4569,"y":-138,"length":4571.0835695707865},{"x":4619,"y":-179,"length":4622.467090201941},{"x":4661,"y":-222,"length":4666.283853346258},{"x":4703,"y":-276,"length":4711.091699383488},{"x":4737,"y":-332,"length":4748.6201153598295},{"x":4757,"y":-381,"length":4772.23322984114},{"x":4772,"y":-427,"length":4791.065956548709},{"x":4780,"y":-477,"length":4803.741146231758},{"x":4815,"y":-506,"length":4841.514329215602},{"x":4861,"y":-496,"length":4886.239556141308},{"x":4875,"y":-453,"length":4896.001838234949},{"x":4897,"y":-71,"length":4897.514675833039},{"x":4941,"y":-9,"length":4941.008196714512},{"x":4995,"y":32,"length":4995.102501450796},{"x":5068,"y":48,"length":5068.227303505635},{"x":5481,"y":130,"length":5482.541472711356},{"x":5550,"y":121,"length":5551.318852308882},{"x":5597,"y":79,"length":5597.557503054346},{"x":5679,"y":-87,"length":5679.666363440726},{"x":5706,"y":-122,"length":5707.304092126159},{"x":5744,"y":-130,"length":5745.470911944468},{"x":5784,"y":-102,"length":5784.899307680299},{"x":5802,"y":-70,"length":5802.4222528182145},{"x":5806,"y":21,"length":5806.037977829632},{"x":5809,"y":128,"length":5810.410054376541},{"x":5817,"y":218,"length":5821.0834902103925},{"x":5830,"y":300,"length":5837.713593522724},{"x":5849,"y":376,"length":5861.073024626122},{"x":5874,"y":450,"length":5891.211759901354},{"x":5905,"y":522,"length":5928.027412217322},{"x":5945,"y":590,"length":5974.204968027127},{"x":5990,"y":656,"length":6025.814135865792},{"x":6040,"y":723,"length":6083.118361498484},{"x":6096,"y":785,"length":6146.335574958464},{"x":6157,"y":841,"length":6214.171706671775},{"x":6216,"y":889,"length":6279.24971632758},{"x":6282,"y":936,"length":6351.3478884406895},{"x":6353,"y":975,"length":6427.381581950772},{"x":6427,"y":1008,"length":6505.566308938831},{"x":6509,"y":1038,"length":6591.2460885632245},{"x":6590,"y":1058,"length":6674.388661143431},{"x":6676,"y":1073,"length":6761.679155357788},{"x":6777,"y":1079,"length":6862.358923868672},{"x":6868,"y":1077,"length":6951.931602080101},{"x":6956,"y":1068,"length":7037.510923614968},{"x":7029,"y":1055,"length":7107.7328312198115},{"x":7098,"y":1038,"length":7173.4962187206875},{"x":7180,"y":1004,"length":7249.856274437446},{"x":7266,"y":965,"length":7329.800884062268},{"x":7336,"y":925,"length":7394.08689426896},{"x":7391,"y":885,"length":7443.796477604691},{"x":7423,"y":876,"length":7474.510351855833},{"x":7454,"y":876,"length":7505.297595698654},{"x":7494,"y":889,"length":7546.546031132389},{"x":7532,"y":923,"length":7588.343231562473},{"x":7574,"y":972,"length":7636.115504626681},{"x":7664,"y":1047,"length":7735.186164534115},{"x":7759,"y":1092,"length":7835.467120727391},{"x":7964,"y":1132,"length":8044.04873182653},{"x":12223,"y":1191,"length":12280.887997209322},{"x":12503,"y":-2084,"length":12675.490720283771}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":3149,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":497,"density":"1","height":912,"action":0,"isStatic":true,"wireframe":false,"width":868.5,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":822,"y":868,"length":1195.4530521940208}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":5071.5,"rotation":39,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":480,"y":0,"length":480},{"x":520,"y":0,"length":520},{"x":520,"y":45,"length":521.9434835305448},{"x":480,"y":45,"length":482.1047603996459},{"x":45,"y":45,"length":63.63961030678928},{"x":0,"y":45,"length":45}],"y":1278.9},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4849.5,"rotation":-60,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":480,"y":0,"length":480},{"x":520,"y":0,"length":520},{"x":520,"y":45,"length":521.9434835305448},{"x":480,"y":45,"length":482.1047603996459},{"x":45,"y":45,"length":63.63961030678928},{"x":0,"y":45,"length":45}],"y":1462.95},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":10710,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":410,"density":"1","height":648.05,"action":0,"isStatic":true,"wireframe":false,"width":662.6,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":10,"y":-18,"length":20.591260281974},{"x":-19,"y":-107,"length":108.67382389517726},{"x":-36,"y":-148,"length":152.31546211727817},{"x":-58,"y":-188,"length":196.74348782107123},{"x":-88,"y":-224,"length":240.66574330386118},{"x":-119,"y":-253,"length":279.58898404622454},{"x":-161,"y":-284,"length":326.4613300224086},{"x":-205,"y":-305,"length":367.4914965002592},{"x":-255,"y":-320,"length":409.1760012512953},{"x":-313,"y":-326,"length":451.9347298006649},{"x":-368,"y":-323,"length":489.64579034236573},{"x":-423,"y":-309,"length":523.8415791057445},{"x":-475,"y":-287,"length":554.9720713693617},{"x":-521,"y":-256,"length":580.4972006823117},{"x":-560,"y":-217,"length":600.5738922064462},{"x":-589,"y":-177,"length":615.0203248673981},{"x":-610,"y":-138,"length":625.4150621787103},{"x":-624,"y":-100,"length":631.9620241755038},{"x":-633,"y":-61,"length":635.9323863430766},{"x":-636,"y":-23,"length":636.4157446198201},{"x":-635,"y":22,"length":635.380988069363},{"x":-628,"y":61,"length":630.955624430118},{"x":-617,"y":96,"length":624.423734334306},{"x":-601,"y":134,"length":615.7572573668946},{"x":-581,"y":167,"length":604.5246066125018},{"x":-555,"y":201,"length":590.2762065338565},{"x":-530,"y":226,"length":576.1735849550897},{"x":-499,"y":250,"length":558.1227463560323},{"x":-467,"y":270,"length":539.4339625941251},{"x":-422,"y":289,"length":511.47336196521513},{"x":-374,"y":301,"length":480.0802016330188},{"x":-328,"y":305,"length":447.89396066479844},{"x":-274,"y":301,"length":407.03439658092776},{"x":-243,"y":293,"length":380.6546991697331},{"x":-212,"y":280,"length":351.2036446280135}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":11870,"rotation":123.00000000000006,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":1150,"density":"1","height":643.05,"action":0,"isStatic":true,"wireframe":false,"width":652.95,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-4,"y":-37,"length":37.21558813185679},{"x":-8,"y":-69,"length":69.46221994724903},{"x":-19,"y":-107,"length":108.67382389517726},{"x":-36,"y":-148,"length":152.31546211727817},{"x":-58,"y":-188,"length":196.74348782107123},{"x":-88,"y":-224,"length":240.66574330386118},{"x":-119,"y":-253,"length":279.58898404622454},{"x":-161,"y":-284,"length":326.4613300224086},{"x":-205,"y":-305,"length":367.4914965002592},{"x":-255,"y":-320,"length":409.1760012512953},{"x":-313,"y":-326,"length":451.9347298006649},{"x":-368,"y":-323,"length":489.64579034236573},{"x":-423,"y":-309,"length":523.8415791057445},{"x":-475,"y":-287,"length":554.9720713693617},{"x":-521,"y":-256,"length":580.4972006823117},{"x":-560,"y":-217,"length":600.5738922064462},{"x":-589,"y":-177,"length":615.0203248673981},{"x":-610,"y":-138,"length":625.4150621787103},{"x":-624,"y":-100,"length":631.9620241755038},{"x":-633,"y":-61,"length":635.9323863430766},{"x":-636,"y":-23,"length":636.4157446198201},{"x":-635,"y":22,"length":635.380988069363},{"x":-628,"y":61,"length":630.955624430118},{"x":-617,"y":96,"length":624.423734334306},{"x":-601,"y":134,"length":615.7572573668946},{"x":-581,"y":167,"length":604.5246066125018},{"x":-555,"y":201,"length":590.2762065338565},{"x":-530,"y":226,"length":576.1735849550897},{"x":-502,"y":250,"length":560.8065620158167},{"x":-464,"y":276,"length":539.8814684724787},{"x":-422,"y":295,"length":514.8873663239369},{"x":-384,"y":300,"length":487.29457210192686},{"x":-351,"y":298,"length":460.440006949874},{"x":-306,"y":286,"length":418.84603376419835}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":10964,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":false,"safeId":-10,"vertices":[{"x":150,"y":0,"length":150},{"x":198,"y":24,"length":199.44924166313595},{"x":184,"y":76,"length":199.07787421006887},{"x":130,"y":74,"length":149.58609561052123},{"x":106,"y":106,"length":149.90663761154806},{"x":122,"y":157,"length":198.82907232092595},{"x":76,"y":184,"length":199.07787421006887},{"x":39,"y":144,"length":149.18780110987626},{"x":0,"y":150,"length":150},{"x":-24,"y":198,"length":199.44924166313595},{"x":-76,"y":184,"length":199.07787421006887},{"x":-74,"y":130,"length":149.58609561052123},{"x":-106,"y":106,"length":149.90663761154806},{"x":-157,"y":122,"length":198.82907232092595},{"x":-184,"y":76,"length":199.07787421006887},{"x":-144,"y":39,"length":149.18780110987626},{"x":-150,"y":0,"length":150},{"x":-198,"y":-24,"length":199.44924166313595},{"x":-184,"y":-76,"length":199.07787421006887},{"x":-130,"y":-74,"length":149.58609561052123},{"x":-106,"y":-106,"length":149.90663761154806},{"x":-122,"y":-157,"length":198.82907232092595},{"x":-76,"y":-184,"length":199.07787421006887},{"x":-39,"y":-144,"length":149.18780110987626},{"x":0,"y":-150,"length":150},{"x":24,"y":-198,"length":199.44924166313595},{"x":76,"y":-184,"length":199.07787421006887},{"x":74,"y":-130,"length":149.58609561052123},{"x":106,"y":-106,"length":149.90663761154806},{"x":157,"y":-122,"length":198.82907232092595},{"x":184,"y":-76,"length":199.07787421006887},{"x":144,"y":-39,"length":149.18780110987626}],"y":874},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11281,"rotation":-3,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":false,"safeId":-10,"vertices":[{"x":150,"y":0,"length":150},{"x":198,"y":24,"length":199.44924166313595},{"x":184,"y":76,"length":199.07787421006887},{"x":130,"y":74,"length":149.58609561052123},{"x":106,"y":106,"length":149.90663761154806},{"x":122,"y":157,"length":198.82907232092595},{"x":76,"y":184,"length":199.07787421006887},{"x":39,"y":144,"length":149.18780110987626},{"x":0,"y":150,"length":150},{"x":-24,"y":198,"length":199.44924166313595},{"x":-76,"y":184,"length":199.07787421006887},{"x":-74,"y":130,"length":149.58609561052123},{"x":-106,"y":106,"length":149.90663761154806},{"x":-157,"y":122,"length":198.82907232092595},{"x":-184,"y":76,"length":199.07787421006887},{"x":-144,"y":39,"length":149.18780110987626},{"x":-150,"y":0,"length":150},{"x":-198,"y":-24,"length":199.44924166313595},{"x":-184,"y":-76,"length":199.07787421006887},{"x":-130,"y":-74,"length":149.58609561052123},{"x":-106,"y":-106,"length":149.90663761154806},{"x":-122,"y":-157,"length":198.82907232092595},{"x":-76,"y":-184,"length":199.07787421006887},{"x":-39,"y":-144,"length":149.18780110987626},{"x":0,"y":-150,"length":150},{"x":24,"y":-198,"length":199.44924166313595},{"x":76,"y":-184,"length":199.07787421006887},{"x":74,"y":-130,"length":149.58609561052123},{"x":106,"y":-106,"length":149.90663761154806},{"x":157,"y":-122,"length":198.82907232092595},{"x":184,"y":-76,"length":199.07787421006887},{"x":144,"y":-39,"length":149.18780110987626}],"y":1018},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":110,"physic":false,"lineId":0,"y":580,"height":2533,"isRoad":false,"direction":90,"width":18328,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":937,"y":-1,"length":937.0005336177776},{"x":992,"y":-1,"length":992.00050403213},{"x":1047,"y":-11,"length":1047.0577825507053},{"x":1103,"y":-34,"length":1103.5239009645418},{"x":1154,"y":-79,"length":1156.7009120771022},{"x":1204,"y":-149,"length":1213.1846520624963},{"x":1291,"y":-356,"length":1339.1852000376946},{"x":1317,"y":-393,"length":1374.3864085474652},{"x":1340,"y":-414,"length":1402.4963458062912},{"x":1366,"y":-432,"length":1432.6827981098957},{"x":1395,"y":-447,"length":1464.8665468226106},{"x":1427,"y":-459,"length":1499.0030019983283},{"x":1460,"y":-464,"length":1531.9582239734868},{"x":1497,"y":-463,"length":1566.9645816035536},{"x":1535,"y":-456,"length":1601.2997845500386},{"x":1572,"y":-443,"length":1633.2277857053498},{"x":1603,"y":-424,"length":1658.1269553324316},{"x":1635,"y":-396,"length":1682.2725700670508},{"x":1661,"y":-372,"length":1702.1471734253769},{"x":1686,"y":-349,"length":1721.7424313758431},{"x":1719,"y":-330,"length":1750.388813949632},{"x":1758,"y":-319,"length":1786.7078664403982},{"x":1793,"y":-316,"length":1820.633131633059},{"x":1827,"y":-318,"length":1854.4683874361406},{"x":1861,"y":-325,"length":1889.1654242019147},{"x":1895,"y":-340,"length":1925.259722738727},{"x":1924,"y":-358,"length":1957.0232497341467},{"x":1952,"y":-382,"length":1989.02689775679},{"x":1978,"y":-415,"length":2021.066302722402},{"x":1993,"y":-444,"length":2041.8582223063383},{"x":2096,"y":-661,"length":2197.7572659418056},{"x":2119,"y":-709,"length":2234.466826784412},{"x":2143,"y":-739,"length":2266.841414832542},{"x":2187,"y":-768,"length":2317.928601143702},{"x":2233,"y":-781,"length":2365.6394484367224},{"x":2278,"y":-785,"length":2409.46238816878},{"x":2321,"y":-782,"length":2449.196807118611},{"x":2367,"y":-768,"length":2488.4760396676515},{"x":2407,"y":-741,"length":2518.477714811072},{"x":2443,"y":-708,"length":2543.5237368658463},{"x":4070,"y":1019,"length":4195.624029867309},{"x":4116,"y":1058,"length":4249.802348345156},{"x":4170,"y":1092,"length":4310.6106295976215},{"x":4223,"y":1118,"length":4368.484062005949},{"x":4287,"y":1138,"length":4435.472128195599},{"x":4358,"y":1148,"length":4506.6692800781375},{"x":4434,"y":1147,"length":4579.952510670826},{"x":4505,"y":1135,"length":4645.777652880086},{"x":5004,"y":1043,"length":5111.542330843011},{"x":5188,"y":1003,"length":5284.065953411256},{"x":5335,"y":921,"length":5413.914110881332},{"x":5581,"y":714,"length":5626.487092316128},{"x":5655,"y":675,"length":5695.142667220901},{"x":5711,"y":656,"length":5748.552600437783},{"x":5779,"y":646,"length":5814.994153049511},{"x":6614,"y":655,"length":6646.353962888224},{"x":7403,"y":730,"length":7438.905094165404},{"x":7498,"y":736,"length":7534.036102913232},{"x":7956,"y":740,"length":7990.340167977832},{"x":8598,"y":716,"length":8627.76100735295},{"x":8736,"y":683,"length":8762.658557766586},{"x":8879,"y":636,"length":8901.749097789714},{"x":9003,"y":610,"length":9023.64167063387},{"x":9135,"y":592,"length":9154.162386586771},{"x":10087,"y":567,"length":10102.92324033},{"x":10204,"y":539,"length":10218.225726612229},{"x":10306,"y":486,"length":10317.452786419717},{"x":10475,"y":367,"length":10481.427097490112},{"x":10548,"y":314,"length":10552.672647249132},{"x":10619,"y":303,"length":10623.321985141936},{"x":10694,"y":324,"length":10698.907046983819},{"x":11266,"y":524,"length":11278.179463016184},{"x":11355,"y":563,"length":11368.948676108974},{"x":11443,"y":635,"length":11460.605306876247},{"x":11622,"y":1072,"length":11671.335313493482},{"x":11674,"y":1181,"length":11733.585854290239},{"x":11729,"y":1275,"length":11798.09586331625},{"x":11811,"y":1373,"length":11890.536152756107},{"x":11903,"y":1460,"length":11992.20617734702},{"x":11998,"y":1532,"length":12095.41351091396},{"x":12125,"y":1605,"length":12230.766533623311},{"x":12237,"y":1647,"length":12347.338903585664},{"x":12378,"y":1685,"length":12492.161902569147},{"x":12502,"y":1697,"length":12616.64824745463},{"x":12680,"y":1692,"length":12792.390863321836},{"x":12818,"y":1667,"length":12925.94340850988},{"x":13011,"y":1623,"length":13111.836255841514},{"x":13245,"y":1561,"length":13336.669224360332},{"x":13357,"y":1550,"length":13446.633370476047},{"x":18315,"y":1735,"length":18396.99567864275}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":10330,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-325,"y":-795,"length":858.8655308021157},{"x":-120,"y":-1235,"length":1240.816263594252},{"x":1130,"y":-2010,"length":2305.8620947489467},{"x":3040,"y":-965,"length":3189.4866358083395},{"x":2205,"y":465,"length":2253.49728200413},{"x":2165,"y":580,"length":2241.3444625938246},{"x":2115,"y":655,"length":2214.1025269846923},{"x":2040,"y":700,"length":2156.7568244936656},{"x":1970,"y":715,"length":2095.7397262064774},{"x":1925,"y":660,"length":2035},{"x":1855,"y":615,"length":1954.290152459455},{"x":1815,"y":605,"length":1913.1779844018695},{"x":1770,"y":590,"length":1865.7438194993438},{"x":1710,"y":590,"length":1808.9223311131962},{"x":1660,"y":520,"length":1739.5401691251627},{"x":1640,"y":460,"length":1703.2909322837365},{"x":1645,"y":360,"length":1683.931411904891},{"x":1685,"y":305,"length":1712.3813827532697},{"x":1680,"y":195,"length":1691.279101745185},{"x":1645,"y":75,"length":1646.7088388661791},{"x":1570,"y":-5,"length":1570.0079617632516},{"x":1410,"y":-50,"length":1410.88624630053},{"x":1315,"y":-85,"length":1317.7442847533052},{"x":1220,"y":-105,"length":1224.5101061240778},{"x":1105,"y":-105,"length":1109.9774772489754},{"x":1015,"y":-105,"length":1020.4165815979276},{"x":935,"y":-115,"length":942.0456464524424},{"x":845,"y":-100,"length":850.8965859609498},{"x":775,"y":-75,"length":778.6205751198719},{"x":695,"y":-60,"length":697.5851202541522},{"x":590,"y":-60,"length":593.0430001273095},{"x":500,"y":-35,"length":501.22350304031033},{"x":420,"y":45,"length":422.4038352098617},{"x":345,"y":80,"length":354.1539213392956},{"x":225,"y":120,"length":255},{"x":150,"y":115,"length":189.01058171435798},{"x":115,"y":110,"length":159.13830462839547},{"x":70,"y":110,"length":130.38404810405297},{"x":15,"y":105,"length":106.06601717798213},{"x":-35,"y":125,"length":129.80754985747168},{"x":-85,"y":95,"length":127.47548783981962},{"x":-130,"y":45,"length":137.56816492197603},{"x":-185,"y":-30,"length":187.41664813991312}],"y":-20},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":110,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-105,"y":-380,"length":394.23977475642914},{"x":90,"y":-345,"length":356.5459297201414},{"x":75,"y":-245,"length":256.2225595063791},{"x":95,"y":-185,"length":207.9663434308542},{"x":125,"y":-140,"length":187.6832437912346},{"x":160,"y":-105,"length":191.3765920900464},{"x":185,"y":-20,"length":186.07794065928394},{"x":155,"y":70,"length":170.07351351694948},{"x":100,"y":100,"length":141.4213562373095},{"x":-265,"y":95,"length":281.51376520518494},{"x":-225,"y":-260,"length":343.8386249390839}],"y":495},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":6041,"y":1125,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":9430,"y":1074,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":12640,"y":2206,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":7371,"active":true,"y":1104,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7302,"active":true,"y":1115,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7441,"active":true,"y":1093,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6818,"active":true,"y":1190,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7026,"active":true,"y":1157,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7233,"active":true,"y":1126,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6888,"active":true,"y":1180,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6956,"active":true,"y":1169,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7165,"active":true,"y":1137,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7095,"active":true,"y":1148,"safeId":-1,"id":-1,"rotation":-9,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8290,"active":true,"y":1125,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8569,"active":true,"y":1138,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8220,"active":true,"y":1120,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8429,"active":true,"y":1131,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8360,"active":true,"y":1128,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7730,"active":true,"y":1094,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7941,"active":true,"y":1105,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8149,"active":true,"y":1117,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7801,"active":true,"y":1098,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7870,"active":true,"y":1102,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8081,"active":true,"y":1114,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8500,"active":true,"y":1136,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8010,"active":true,"y":1109,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8641,"active":true,"y":1142,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8851,"active":true,"y":1153,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8712,"active":true,"y":1148,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8781,"active":true,"y":1150,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8921,"active":true,"y":1159,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":1560,"ag":true,"active":true,"y":180,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":2390,"ag":true,"active":true,"y":-160,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":3058,"stones":false,"physic":false,"impulse":1,"id":2,"radius":1,"y":449,"height":53.2,"width":53.2,"safeId":-1,"rotation":51.00000000000006,"count":1},"className":"Tnt1"}],null,[{"params":{"x":640,"rotation":0,"y":540,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":6040,"rotation":0,"y":1050,"id":0,"width":128,"height":3683},"className":"SafePointE"},{"params":{"x":9430,"rotation":0,"y":1000,"id":0,"width":128,"height":1366},"className":"SafePointE"},{"params":{"x":12640,"rotation":0,"y":2130,"id":0,"width":128,"height":2726},"className":"SafePointE"}],[{"params":{"x":1560,"rotation":0,"graphic":0,"id":1,"y":180,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":940,"sndId":-1,"rotation":0,"y":310,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":1079},"className":"ToggleE"},{"params":{"x":2390,"rotation":0,"graphic":0,"id":1,"y":-160,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":3220,"sndId":-1,"rotation":-30,"y":360,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":1204,"height":64},"className":"ToggleE"},{"params":{"x":5259.8,"rotation":39,"graphic":0,"id":3,"y":1459.75,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":100,"useWeld":false},"className":"MotorJointE"},{"params":{"x":4200,"sndId":-1,"rotation":-39,"y":1210,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":3,"width":849,"height":64},"className":"ToggleE"},{"params":{"x":5000,"rotation":-60,"graphic":0,"id":3,"y":1249.8,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-100,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8955,"rotation":3,"graphic":0,"safeId":1,"id":-1,"y":1159,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7473,"rotation":-9,"graphic":0,"safeId":1,"id":-1,"y":1088,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6781,"rotation":-9,"graphic":0,"safeId":1,"id":-1,"y":1196,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":10964,"rotation":0,"graphic":0,"id":4,"y":874,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":11281,"rotation":-42,"graphic":0,"id":4,"y":1018,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":10020,"sndId":-1,"rotation":0,"y":790,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":4,"width":64,"height":1641},"className":"ToggleE"},{"params":{"x":7060,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1153,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7129,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1141,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7337,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1108,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7198,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1131,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6854,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1186,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6921,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1174,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6991,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1164,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7268,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7407,"rotation":-9,"graphic":0,"safeId":-1,"id":12,"y":1098,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8465,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1132,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8604,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1141,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7975,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1108,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8391,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1129,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8045,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1110,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8255,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8114,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1115,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7766,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1097,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7693,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1092,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8534,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1137,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7834,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1099,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7905,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1104,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8184,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1119,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8325,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1126,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8885,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1156,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8956,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1159,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8676,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1145,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8745,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1148,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8816,"rotation":3,"graphic":0,"safeId":-1,"id":12,"y":1153,"width":17,"height":17},"className":"PivotJointE"}]],"settings":{"prizes":"30,36,45","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map15.json b/motox3mspooky/assets/levels/map15.json deleted file mode 100644 index d3ff2f01..00000000 --- a/motox3mspooky/assets/levels/map15.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":3020,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":-10,"y":5,"length":11.180339887498949},{"x":1600,"y":470,"length":1667.6030702778164},{"x":1570,"y":525,"length":1655.4531101786001},{"x":1550,"y":575,"length":1653.216561736544},{"x":1530,"y":605,"length":1645.2735334891886},{"x":1510,"y":635,"length":1638.0857730900418},{"x":1500,"y":675,"length":1644.878414959598},{"x":1510,"y":710,"length":1668.5922210054798},{"x":1525,"y":750,"length":1699.448439935734},{"x":1520,"y":800,"length":1717.672844286711},{"x":-145,"y":385,"length":411.40004861448426},{"x":-110,"y":315,"length":333.65401241405743},{"x":-85,"y":290,"length":302.2002647252315},{"x":-55,"y":250,"length":255.9785147234041},{"x":-40,"y":215,"length":218.68927728629038},{"x":-45,"y":170,"length":175.85505395068975},{"x":-40,"y":135,"length":140.80127840328723},{"x":-25,"y":95,"length":98.2344135219425},{"x":-20,"y":40,"length":44.721359549995796}],"y":30},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":700,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-465,"y":-495,"length":679.1538853603063},{"x":100,"y":-495,"length":505},{"x":100,"y":445,"length":456.0975772792484},{"x":-465,"y":445,"length":643.622560201241}],"y":-130},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4550,"bg":true,"rotation":0,"y":890,"vertices":[{"x":0,"y":0,"length":0},{"x":1070,"y":0,"length":1070},{"x":1070,"y":885,"length":1388.5694076998816},{"x":0,"y":885,"length":885}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":2195,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":220,"y":0,"length":220},{"x":220,"y":25,"length":221.41589825484527},{"x":0,"y":25,"length":25}],"y":296},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-10,"physic":true,"lineId":0,"y":290,"height":3153.05,"isRoad":true,"direction":90,"width":9527,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2705,"y":5,"length":2705.0046210681417},{"x":4575,"y":495,"length":4601.700772540518},{"x":4575,"y":1410,"length":4787.350519859602},{"x":5605,"y":1410,"length":5779.630178480281},{"x":5605,"y":475,"length":5625.091110373235},{"x":5960,"y":295,"length":5967.296288940243},{"x":5960,"y":-480,"length":5979.297617613627},{"x":7240,"y":-475,"length":7255.565105489716},{"x":7296,"y":-479,"length":7311.706845873951},{"x":7341,"y":-489,"length":7357.268650796979},{"x":7391,"y":-509,"length":7408.506057229082},{"x":7426,"y":-528,"length":7444.747141441407},{"x":7457,"y":-549,"length":7477.181955790564},{"x":7486,"y":-575,"length":7508.050412723665},{"x":7513,"y":-605,"length":7537.320080771415},{"x":7536,"y":-637,"length":7562.874122977322},{"x":7557,"y":-673,"length":7586.908329484415},{"x":7575,"y":-718,"length":7608.951898914856},{"x":7586,"y":-763,"length":7624.274719604482},{"x":7591,"y":-800,"length":7633.038778887475},{"x":8119,"y":-800,"length":8158.3185154785415},{"x":8177,"y":-802,"length":8216.235938676542},{"x":8228,"y":-814,"length":8268.166664986864},{"x":8280,"y":-837,"length":8322.197366080667},{"x":8325,"y":-868,"length":8370.128374164879},{"x":8360,"y":-900,"length":8408.305417859177},{"x":8389,"y":-932,"length":8440.612833201154},{"x":8411,"y":-964,"length":8466.062662182463},{"x":8429,"y":-998,"length":8487.876353953325},{"x":8447,"y":-1043,"length":8511.149041110724},{"x":8457,"y":-1086,"length":8526.443865997126},{"x":8462,"y":-1130,"length":8537.115672169377},{"x":8462,"y":-1679,"length":8626.962675240922},{"x":9514,"y":-1677,"length":9660.668972695421}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":2970,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":25,"y":-1480,"length":1480.211133588719},{"x":1305,"y":-1465,"length":1961.9505600294824},{"x":1168,"y":-1292,"length":1741.6911322045594},{"x":1152,"y":70,"length":1154.1247766164627},{"x":1162,"y":132,"length":1169.4733857595904},{"x":1178,"y":172,"length":1190.49065515022},{"x":1208,"y":229,"length":1229.5141316796648},{"x":1240,"y":269,"length":1268.8423857989612},{"x":1282,"y":311,"length":1319.183459568835},{"x":1324,"y":339,"length":1366.710283856824},{"x":1372,"y":364,"length":1419.4646878312965},{"x":1655,"y":455,"length":1716.406129096491},{"x":1670,"y":560,"length":1761.3914953808537},{"x":1650,"y":570,"length":1745.6803831171387},{"x":25,"y":130,"length":132.38202294873727}],"y":-60},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4460,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":-140,"y":-60,"length":152.31546211727817},{"x":100,"y":0,"length":100},{"x":95,"y":25,"length":98.2344135219425},{"x":-145,"y":-35,"length":149.164338901763}],"y":790},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-10,"physic":false,"lineId":0,"y":290,"height":1553,"isRoad":false,"direction":90,"width":9148,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2705,"y":5,"length":2705.0046210681417},{"x":4575,"y":495,"length":4601.700772540518},{"x":5605,"y":475,"length":5625.091110373235},{"x":5805,"y":385,"length":5817.753002663485},{"x":5935,"y":275,"length":5941.367687662497},{"x":6185,"y":-325,"length":6193.532917487401},{"x":7340,"y":-475,"length":7355.35349252502},{"x":7455,"y":-530,"length":7473.815959735696},{"x":7650,"y":-735,"length":7685.227712956852},{"x":8255,"y":-805,"length":8294.157582298518},{"x":8655,"y":-1030,"length":8716.072796850654},{"x":9135,"y":-1045,"length":9194.577206157986}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":5950,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":350,"density":"1","height":899.65,"action":0,"isStatic":true,"wireframe":false,"width":497,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-201,"y":344,"length":398.41812207779907},{"x":-154,"y":314,"length":349.7313254485506},{"x":-114,"y":280,"length":302.3177136722227},{"x":-77,"y":243,"length":254.9078264785136},{"x":-49,"y":204,"length":209.80228788075692},{"x":-20,"y":150,"length":151.32745950421557},{"x":-3,"y":85,"length":85.05292469985967},{"x":0,"y":31,"length":31},{"x":0,"y":-19,"length":19},{"x":-8,"y":-69,"length":69.46221994724903},{"x":-26,"y":-126,"length":128.65457628860312},{"x":-55,"y":-177,"length":185.34832073693033},{"x":-87,"y":-218,"length":234.71898091121648},{"x":-123,"y":-253,"length":281.31477031965454},{"x":-162,"y":-281,"length":324.35320254315354},{"x":-240,"y":-320,"length":400},{"x":-310,"y":-355,"length":471.3013897709193},{"x":-397,"y":-398,"length":562.1503357643754},{"x":-480,"y":-440,"length":651.1528238439882},{"x":-480,"y":-490,"length":685.9300255857007},{"x":-480,"y":-540,"length":722.4956747275377},{"x":-400,"y":-540,"length":672.0119046564577},{"x":-320,"y":-540,"length":627.6941930590086},{"x":-240,"y":-540,"length":590.9314681077662},{"x":-160,"y":-540,"length":563.2051136131489},{"x":-70,"y":-540,"length":544.5181356024792},{"x":0,"y":-540,"length":540}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":4470.4,"rotation":3,"physic":true,"line":true,"plr":false,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":-140,"y":-60,"length":152.31546211727817},{"x":100,"y":0,"length":100},{"x":95,"y":25,"length":98.2344135219425},{"x":-145,"y":-35,"length":149.164338901763}],"y":370.8},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8460,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":50,"y":0,"length":50},{"x":50,"y":215,"length":220.73740054644117},{"x":0,"y":215,"length":215}],"y":-1180},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7061,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":340,"y":0,"length":340},{"x":335,"y":23,"length":335.78862398836566},{"x":325,"y":48,"length":328.5254936835192},{"x":309,"y":77,"length":318.4493680320311},{"x":289,"y":100,"length":305.81203377238114},{"x":258,"y":122,"length":285.3909599128886},{"x":227,"y":135,"length":264.1098256407739},{"x":196,"y":144,"length":243.21184181696418},{"x":165,"y":145,"length":219.65882636488797},{"x":133,"y":141,"length":193.82982226685345},{"x":104,"y":133,"length":168.8342382338369},{"x":77,"y":117,"length":140.06427096158393},{"x":53,"y":100,"length":113.17685275708986},{"x":33,"y":78,"length":84.69356528095862},{"x":17,"y":53,"length":55.65968020030299},{"x":6,"y":25,"length":25.709920264364882}],"y":-510},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":7070,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-500,"density":"1","height":1869.5,"action":0,"isStatic":true,"wireframe":false,"width":336,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-1855,"length":1855},{"x":320,"y":-1855,"length":1882.398735656184},{"x":320,"y":0,"length":320}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":7070,"rotation":0,"y":-595,"vertices":[{"x":0,"y":-1750,"length":1750},{"x":320,"y":-1750,"length":1779.016582272352},{"x":320,"y":100,"length":335.2610922848042},{"x":0,"y":100,"length":100}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":8460,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":-1,"vertices":[{"x":196,"y":34,"length":198.92712233378333},{"x":173,"y":99,"length":199.32385707686876},{"x":128,"y":153,"length":199.4818287463798},{"x":68,"y":187,"length":198.97989848223364},{"x":0,"y":200,"length":200},{"x":-68,"y":187,"length":198.97989848223364},{"x":-128,"y":153,"length":199.4818287463798},{"x":-173,"y":99,"length":199.32385707686876},{"x":-196,"y":34,"length":198.92712233378333},{"x":-196,"y":-34,"length":198.92712233378333},{"x":-173,"y":-100,"length":199.82242116439286},{"x":-128,"y":-153,"length":199.4818287463798},{"x":-68,"y":-187,"length":198.97989848223364},{"x":0,"y":-200,"length":200},{"x":68,"y":-187,"length":198.97989848223364},{"x":128,"y":-153,"length":199.4818287463798},{"x":173,"y":-100,"length":199.82242116439286},{"x":196,"y":-34,"length":198.92712233378333}],"y":-1390},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"x":7230,"ag":true,"active":true,"y":-609,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":6308,"y":-252,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":1010,"rotation":-12,"y":260,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":1070,"rotation":0,"y":260,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":2280,"rotation":0,"y":260,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":6277,"y":-229,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":7920,"rotation":0,"y":-540,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":7981,"rotation":15,"y":-533,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":3475,"rotation":18,"y":399,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":18,"scaleY":1,"x":3478,"y":389,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"scaleX":1,"rotation":18,"scaleY":1,"x":4148,"y":559,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":4145,"rotation":18,"y":569,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"x":3209,"ag":true,"active":true,"y":322,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":4728,"ag":true,"active":true,"y":380,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":3322,"stones":false,"physic":false,"impulse":7000,"id":1,"radius":64,"y":368,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"},{"params":{"x":2400,"stones":false,"physic":false,"impulse":1,"id":1,"radius":1,"y":320,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":4437,"stones":false,"physic":false,"impulse":1,"id":2,"radius":1,"y":777,"height":53.2,"width":53.2,"safeId":-1,"rotation":15,"count":1},"className":"Tnt1"},{"params":{"x":5720,"rotation":0,"y":100,"time":1,"safeId":-1,"force":6000,"width":64.1,"height":64.1},"className":"BoostE"},{"params":{"x":4447.9,"stones":false,"physic":false,"impulse":1,"id":3,"radius":1,"y":356.65,"height":53.2,"width":53.2,"safeId":-1,"rotation":21,"count":1},"className":"Tnt1"},{"params":{"x":8484,"stones":false,"physic":false,"impulse":1,"id":6,"radius":1,"y":-1088,"height":53.2,"width":53.2,"safeId":-1,"rotation":-87,"count":1},"className":"Tnt1"},{"params":{"x":7100,"stones":false,"physic":false,"impulse":10000,"id":11,"radius":64,"y":-580,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"}],null,[{"params":{"x":1220,"rotation":0,"y":200,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":6310,"rotation":0,"y":-330,"id":0,"width":128,"height":3027},"className":"SafePointE"}],[{"params":{"x":2206,"rotation":0,"graphic":0,"id":1,"y":308,"height":17,"width":17,"time":0.3,"safeId":-1,"snd":false,"rate":-100,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2290,"sndId":-1,"rotation":0,"y":110,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":806},"className":"ToggleE"},{"params":{"x":3262,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":378,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4440,"active":0,"y":770,"cycle":0,"body":false,"id":2,"position":0,"width":22,"height":45,"stopOnEnd":true,"accelDist":0,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":9,"y":-32,"length":33.24154027718932}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":550},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":4450,"sndId":-1,"rotation":12,"y":740,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":64,"height":557},"className":"ToggleE"},{"params":{"x":4451.5,"active":0,"y":349.85,"cycle":0,"body":false,"id":3,"position":0,"width":30,"height":78,"stopOnEnd":true,"accelDist":0,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":17,"y":-65,"length":67.1863081289633}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":3,"speed":1000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":4500,"sndId":-1,"rotation":18,"y":379,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":3,"width":144,"height":70},"className":"ToggleE"},{"params":{"x":7071,"rotation":0,"graphic":1,"safeId":-1,"id":-1,"y":-504,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7391,"rotation":0,"graphic":1,"safeId":-1,"id":-1,"y":-504,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8460,"rotation":0,"graphic":0,"id":5,"y":-1390,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8433,"sndId":-1,"rotation":-90,"y":-1100,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":6,"width":98,"height":259},"className":"ToggleE"},{"params":{"x":7220,"sndId":-1,"rotation":0,"y":-410,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":5,"width":64,"height":772},"className":"ToggleE"},{"params":{"x":8485,"active":0,"y":-1070,"cycle":0,"body":false,"id":6,"position":0,"width":93,"height":13,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-80,"y":0,"length":80}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":7160,"rotation":0,"graphic":0,"safeId":-1,"id":11,"y":-590,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7990,"sndId":-1,"rotation":0,"y":-920,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":104,"height":1132},"className":"ToggleE"},{"params":{"x":4728,"rotation":0,"graphic":1,"id":1,"y":380,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"}]],"settings":{"prizes":"20,27,36","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map16.json b/motox3mspooky/assets/levels/map16.json deleted file mode 100644 index 3c44ef9a..00000000 --- a/motox3mspooky/assets/levels/map16.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"stretchTexture":false,"x":1510,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1740,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1970,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2200,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2430,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2660,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2890,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3120,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3350,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3580,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3810,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4040,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":8720,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":250,"y":-55,"length":255.9785147234041},{"x":270,"y":30,"length":271.6615541441225},{"x":10,"y":55,"length":55.90169943749474}],"y":270},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8200,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":-110,"y":0,"length":110},{"x":195,"y":0,"length":195},{"x":195,"y":-20,"length":196.02295783912658},{"x":470,"y":-20,"length":470.425339453563},{"x":370,"y":-135,"length":393.8591118661596},{"x":140,"y":-135,"length":194.48650338776724},{"x":20,"y":-5,"length":20.615528128088304},{"x":-70,"y":-5,"length":70.178344238091},{"x":85,"y":-170,"length":190.06577808748213},{"x":390,"y":-170,"length":425.4409477236529},{"x":540,"y":0,"length":540},{"x":985,"y":0,"length":985},{"x":810,"y":100,"length":816.1494961096282},{"x":0,"y":100,"length":100}],"y":290},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6990,"bg":true,"rotation":0,"y":350,"vertices":[{"x":0,"y":0,"length":0},{"x":3340,"y":0,"length":3340},{"x":3340,"y":425,"length":3366.9310952260366},{"x":0,"y":425,"length":425}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":8025,"rotation":-15,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-10,"length":10},{"x":20,"y":-10,"length":22.360679774997898},{"x":20,"y":25,"length":32.01562118716424},{"x":95,"y":15,"length":96.17692030835673},{"x":95,"y":80,"length":124.19742348374221},{"x":20,"y":65,"length":68.00735254367721},{"x":25,"y":95,"length":98.2344135219425},{"x":0,"y":95,"length":95},{"x":-65,"y":80,"length":103.07764064044152},{"x":-20,"y":45,"length":49.24428900898052},{"x":-70,"y":20,"length":72.80109889280519}],"y":84},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":1280,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":170,"density":"1","height":568,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":85,"length":85},{"x":0,"y":170,"length":170},{"x":0,"y":261,"length":261},{"x":0,"y":345,"length":345},{"x":0,"y":430,"length":430},{"x":0,"y":500,"length":500},{"x":0,"y":555,"length":555}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1100,"bg":true,"rotation":0,"y":320,"vertices":[{"x":0,"y":0,"length":0},{"x":3515,"y":-15,"length":3515.0320055441885},{"x":3515,"y":485,"length":3548.302411012906},{"x":0,"y":500,"length":500}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":350,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":570,"y":0,"length":570},{"x":640,"y":-10,"length":640.0781202322104},{"x":720,"y":-35,"length":720.850192481073},{"x":780,"y":-60,"length":782.3042886243178},{"x":815,"y":-50,"length":816.532301871763},{"x":820,"y":-15,"length":820.137183646736},{"x":825,"y":35,"length":825.7420904858853},{"x":820,"y":80,"length":823.8931969618392},{"x":810,"y":135,"length":821.1729415902597},{"x":785,"y":190,"length":807.66639152561},{"x":770,"y":235,"length":805.0621094052309},{"x":760,"y":305,"length":818.91696770796},{"x":760,"y":405,"length":861.1765208132418},{"x":775,"y":515,"length":930.5106125133663},{"x":790,"y":650,"length":1023.0347012687301},{"x":570,"y":655,"length":868.2885465097418},{"x":0,"y":655,"length":655},{"x":-950,"y":295,"length":994.7487119871028},{"x":-355,"y":-740,"length":820.7466113241042},{"x":-60,"y":-1140,"length":1141.5778554264268},{"x":305,"y":-1125,"length":1165.6114275349225},{"x":-65,"y":-265,"length":272.8552729928451},{"x":-80,"y":-195,"length":210.77238908357992},{"x":-80,"y":-125,"length":148.4082207965583},{"x":-70,"y":-70,"length":98.99494936611666},{"x":-45,"y":-25,"length":51.478150704935004}],"y":120},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":300,"physic":false,"lineId":0,"y":320,"height":1023,"isRoad":false,"direction":90,"width":14228,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":4360,"y":-15,"length":4360.025802675943},{"x":6225,"y":-25,"length":6225.0502006007955},{"x":6875,"y":50,"length":6875.181815777674},{"x":8065,"y":195,"length":8067.357064119575},{"x":9920,"y":-15,"length":9920.011340719324},{"x":10380,"y":-465,"length":10390.410242141548},{"x":11455,"y":-485,"length":11465.262753203697},{"x":12020,"y":335,"length":12024.667355066418},{"x":12310,"y":475,"length":12319.160888631985},{"x":12535,"y":525,"length":12545.989399007158},{"x":14215,"y":465,"length":14222.60348881315}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":1411,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":600,"y":0,"length":600},{"x":590,"y":104,"length":599.0959856316849},{"x":563,"y":205,"length":599.1610801779435},{"x":519,"y":299,"length":598.9674448582326},{"x":459,"y":385,"length":599.0876396655167},{"x":385,"y":459,"length":599.0876396655167},{"x":300,"y":519,"length":599.4672634931786},{"x":205,"y":563,"length":599.1610801779435},{"x":104,"y":590,"length":599.0959856316849},{"x":0,"y":600,"length":600},{"x":-104,"y":590,"length":599.0959856316849},{"x":-205,"y":563,"length":599.1610801779435},{"x":-175,"y":490,"length":520.3124061561477},{"x":-88,"y":514,"length":521.4786668695086},{"x":5,"y":522,"length":522.0239458109178},{"x":92,"y":513,"length":521.1842284643694},{"x":182,"y":489,"length":521.7710225759955},{"x":263,"y":451,"length":522.0823689802213},{"x":319,"y":411,"length":520.2710831864481},{"x":378,"y":356,"length":519.2494583531118},{"x":428,"y":294,"length":519.2494583531118},{"x":473,"y":219,"length":521.238908754901},{"x":501,"y":139,"length":519.9249945905659},{"x":516,"y":63,"length":519.8317035349037},{"x":520,"y":-9,"length":520.0778787835529},{"x":513,"y":-85,"length":519.9942307372265},{"x":499,"y":-151,"length":521.3463340237466},{"x":474,"y":-217,"length":521.3108477674333},{"x":434,"y":-284,"length":518.6636675148935},{"x":406,"y":-324,"length":519.4343076848121},{"x":360,"y":-376,"length":520.5535515199181},{"x":294,"y":-427,"length":518.4255009159947},{"x":225,"y":-470,"length":521.0806079677117},{"x":145,"y":-501,"length":521.5611181827112},{"x":72,"y":-516,"length":520.9990403062178},{"x":13,"y":-520,"length":520.1624746173064},{"x":-47,"y":-518,"length":520.1278688937942},{"x":-118,"y":-508,"length":521.5246878144887},{"x":-178,"y":-491,"length":522.2690877316022},{"x":-240,"y":-463,"length":521.5064716760473},{"x":-297,"y":-428,"length":520.9539327042268},{"x":-349,"y":-389,"length":522.6107538120508},{"x":-394,"y":-343,"length":522.3839584060751},{"x":-434,"y":-289,"length":521.4182582150341},{"x":-472,"y":-223,"length":522.0277770387319},{"x":-500,"y":-154,"length":523.1787457456581},{"x":-516,"y":-81,"length":522.3188681255924},{"x":-521,"y":-15,"length":521.2158861738579},{"x":-593,"y":-16,"length":593.2158123313976},{"x":-590,"y":-104,"length":599.0959856316849},{"x":-563,"y":-205,"length":599.1610801779435},{"x":-519,"y":-300,"length":599.4672634931786},{"x":-459,"y":-385,"length":599.0876396655167},{"x":-385,"y":-459,"length":599.0876396655167},{"x":-300,"y":-519,"length":599.4672634931786},{"x":-205,"y":-563,"length":599.1610801779435},{"x":-104,"y":-590,"length":599.0959856316849},{"x":0,"y":-600,"length":600},{"x":104,"y":-590,"length":599.0959856316849},{"x":205,"y":-563,"length":599.1610801779435},{"x":300,"y":-519,"length":599.4672634931786},{"x":385,"y":-459,"length":599.0876396655167},{"x":459,"y":-385,"length":599.0876396655167},{"x":519,"y":-300,"length":599.4672634931786},{"x":563,"y":-205,"length":599.1610801779435},{"x":590,"y":-104,"length":599.0959856316849}],"y":-420},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4480,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":35,"y":-20,"length":40.311288741492746},{"x":90,"y":-30,"length":94.86832980505137},{"x":130,"y":-10,"length":130.38404810405297},{"x":166,"y":18,"length":166.97305171793442},{"x":212,"y":33,"length":214.55302374937528},{"x":253,"y":42,"length":256.46247288833507},{"x":305,"y":42,"length":307.8782226790326},{"x":356,"y":32,"length":357.4353088322417},{"x":400,"y":20,"length":400.4996878900157},{"x":435,"y":0,"length":435},{"x":465,"y":-5,"length":465.02688094345683},{"x":1768,"y":61,"length":1769.052006019043},{"x":2050,"y":80,"length":2051.5603817582364},{"x":2120,"y":40,"length":2120.3773249117717},{"x":2505,"y":45,"length":2505.4041590130723},{"x":2565,"y":60,"length":2565.70165841627},{"x":2610,"y":90,"length":2611.5512631384436},{"x":2635,"y":140,"length":2638.716544079716},{"x":2640,"y":185,"length":2646.4740693987537},{"x":2630,"y":245,"length":2641.3869462840917},{"x":2595,"y":285,"length":2610.6033785314844},{"x":2565,"y":335,"length":2586.7837172829118},{"x":2540,"y":390,"length":2569.766526359934},{"x":2525,"y":445,"length":2563.9130250458966},{"x":2525,"y":530,"length":2580.0242246924736},{"x":2535,"y":615,"length":2608.5340710828373},{"x":2575,"y":765,"length":2686.233422470951},{"x":-5,"y":650,"length":650.0192304847603},{"x":85,"y":450,"length":457.9574216016157},{"x":100,"y":395,"length":407.4616546375867},{"x":100,"y":345,"length":359.2005011132362},{"x":85,"y":290,"length":302.2002647252315},{"x":70,"y":245,"length":254.80384612481814},{"x":40,"y":195,"length":199.06029237394384},{"x":-5,"y":110,"length":110.11357772772621},{"x":-15,"y":45,"length":47.43416490252569}],"y":150},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6247,"rotation":0,"y":-147,"width":619.1,"height":619.1},"className":"OvalTemplate"},{"params":{"stretchTexture":false,"x":6170,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":24,"density":"1","height":391.75,"action":0,"isStatic":true,"wireframe":false,"width":140.05,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":1,"y":5,"length":5.0990195135927845},{"x":31,"y":-19,"length":36.359317925395686},{"x":59,"y":-47,"length":75.43208866258443},{"x":83,"y":-80,"length":115.27792503337315},{"x":99,"y":-115,"length":151.74320413119},{"x":108,"y":-153,"length":187.27786842016332},{"x":110,"y":-193,"length":222.1463481581455},{"x":101,"y":-239,"length":259.46483384073457},{"x":87,"y":-277,"length":290.34117861577954},{"x":63,"y":-311,"length":317.3168763239674},{"x":28,"y":-345,"length":346.13436697328973},{"x":-15,"y":-373,"length":373.3014867369269}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":5620,"rotation":-167.99999999999994,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-486,"density":"1","height":787.6,"action":0,"isStatic":true,"wireframe":false,"width":350.65,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-225,"y":401,"length":459.8108306684391},{"x":-197,"y":358,"length":408.6232984057566},{"x":-157,"y":297,"length":335.9434476217686},{"x":-115,"y":231,"length":258.0426321366297},{"x":-75,"y":166,"length":182.15652609774924},{"x":-33,"y":100,"length":105.30432089900205},{"x":10,"y":33,"length":34.48187929913333},{"x":50,"y":-27,"length":56.824290580701486},{"x":83,"y":-80,"length":115.27792503337315},{"x":99,"y":-115,"length":151.74320413119},{"x":108,"y":-153,"length":187.27786842016332},{"x":110,"y":-193,"length":222.1463481581455},{"x":101,"y":-239,"length":259.46483384073457},{"x":87,"y":-277,"length":290.34117861577954},{"x":63,"y":-311,"length":317.3168763239674},{"x":28,"y":-345,"length":346.13436697328973},{"x":-15,"y":-373,"length":373.3014867369269}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":6440,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":104,"density":"1","height":491,"action":0,"isStatic":true,"wireframe":false,"width":131,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":41,"y":-38,"length":55.90169943749474},{"x":73,"y":-84,"length":111.28791488746656},{"x":97,"y":-132,"length":163.8078142214223},{"x":110,"y":-183,"length":213.5158073773462},{"x":116,"y":-237,"length":263.86549603917524},{"x":113,"y":-296,"length":316.8359196808342},{"x":100,"y":-355,"length":368.81567211820055},{"x":79,"y":-401,"length":408.7077195258245},{"x":54,"y":-437,"length":440.3237445334966},{"x":17,"y":-478,"length":478.30220572353625}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":8320,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":20,"y":15,"length":25},{"x":60,"y":-15,"length":61.84658438426491},{"x":100,"y":15,"length":101.11874208078342},{"x":97,"y":135,"length":166.23477373883},{"x":165,"y":195,"length":255.44079548889601},{"x":165,"y":215,"length":271.01660465735307},{"x":20,"y":215,"length":215.92822881689185}],"y":77},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":12340,"rotation":0,"y":220,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":1197,"y":-10,"length":1197.041770365596},{"x":1193,"y":101,"length":1197.2677227754868},{"x":1155,"y":152,"length":1164.9587975546604},{"x":1119,"y":193,"length":1135.5219064377402},{"x":1084,"y":226,"length":1107.3084484460505},{"x":1026,"y":276,"length":1062.4744702815217},{"x":962,"y":319,"length":1013.5112234208361},{"x":898,"y":353,"length":964.8901491879789},{"x":824,"y":382,"length":908.2400563727632},{"x":746,"y":404,"length":848.3702022112752},{"x":685,"y":413,"length":799.8712396379807},{"x":629,"y":419,"length":755.7790682467992},{"x":557,"y":418,"length":696.4000287191263},{"x":485,"y":410,"length":635.0787352761861},{"x":422,"y":397,"length":579.3901966723289},{"x":346,"y":374,"length":509.5017173670762},{"x":286,"y":347,"length":449.67210275933286},{"x":229,"y":316,"length":390.2524823751926},{"x":168,"y":276,"length":323.10988842807024},{"x":121,"y":234,"length":263.4331034627197},{"x":75,"y":190,"length":204.26698215815497},{"x":40,"y":150,"length":155.24174696260025},{"x":0,"y":100,"length":100}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":10506,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":3585,"y":2500,"length":4370.609225268257},{"x":3015,"y":3050,"length":4288.674037508563},{"x":3000,"y":3060,"length":4285.277120560583},{"x":1865,"y":3060,"length":3583.549218302994},{"x":1840,"y":3045,"length":3557.755612742393},{"x":1620,"y":2685,"length":3135.8611257515854},{"x":1614,"y":2635,"length":3090.0195792259956},{"x":1630,"y":2592,"length":3061.921618853102},{"x":1690,"y":2545,"length":3055.0163665682708},{"x":1722,"y":2507,"length":3041.436009519188},{"x":1755,"y":2462,"length":3023.486232811388},{"x":1771,"y":2406,"length":2987.5202091366677},{"x":1777,"y":2363,"length":2956.602441993174},{"x":1781,"y":2299,"length":2908.154397551822},{"x":1773,"y":2254,"length":2867.759578486314},{"x":1760,"y":2211,"length":2825.9725759462},{"x":1731,"y":2157,"length":2765.684363769662},{"x":1681,"y":2113,"length":2700.0981463643134},{"x":1636,"y":2084,"length":2649.4437151975885},{"x":1582,"y":2056,"length":2594.197371057183},{"x":1540,"y":2044,"length":2559.2061269073265},{"x":1494,"y":2042,"length":2530.177859360879},{"x":1439,"y":2045,"length":2500.5491396891202},{"x":1389,"y":2055,"length":2480.39230768038},{"x":1344,"y":2077,"length":2473.9169347413426},{"x":1297,"y":2106,"length":2473.346922694024},{"x":1258,"y":2151,"length":2491.8597472570564},{"x":1228,"y":2195,"length":2515.1558599816435},{"x":1215,"y":2239,"length":2547.4194786096773},{"x":1207,"y":2280,"length":2579.7769283408984},{"x":1181,"y":2289,"length":2575.709999204103},{"x":1133,"y":2297,"length":2561.2297827410957},{"x":1082,"y":2280,"length":2523.712344939494},{"x":1031,"y":2250,"length":2474.9668684651115},{"x":992,"y":2223,"length":2434.2951751995893},{"x":957,"y":2179,"length":2379.8928547310697},{"x":931,"y":2132,"length":2326.4103249427003},{"x":0,"y":100,"length":100}],"y":-2760},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11890,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":-60,"y":-355,"length":360.0347205478938},{"x":360,"y":-360,"length":509.11688245431424},{"x":600,"y":35,"length":601.0199663904685},{"x":1435,"y":35,"length":1435.4267658086915},{"x":1845,"y":-400,"length":1887.8625479626423},{"x":2535,"y":-395,"length":2565.589600852015},{"x":2590,"y":525,"length":2642.6738353417736},{"x":-60,"y":540,"length":543.323108288245}],"y":890},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9005,"rotation":168,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-10,"length":10},{"x":30,"y":-10,"length":31.622776601683793},{"x":30,"y":15,"length":33.54101966249684},{"x":65,"y":10,"length":65.76473218982953},{"x":95,"y":50,"length":107.35455276791944},{"x":70,"y":75,"length":102.59142264341595},{"x":35,"y":75,"length":82.76472678623425},{"x":35,"y":95,"length":101.24228365658294},{"x":0,"y":95,"length":95},{"x":-80,"y":75,"length":109.65856099730654},{"x":-20,"y":45,"length":49.24428900898052},{"x":-80,"y":20,"length":82.46211251235322}],"y":216},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":10110,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-98,"y":21,"length":100.22474744293447},{"x":-53,"y":-21,"length":57.0087712549569},{"x":8,"y":-58,"length":58.54912467321779},{"x":80,"y":-89,"length":119.6703806294607},{"x":215,"y":-100,"length":237.11811402758752},{"x":1655,"y":-100,"length":1658.018395555369},{"x":2110,"y":565,"length":2184.336283634001},{"x":2165,"y":635,"length":2256.2025618281705},{"x":2232,"y":700,"length":2339.1930232454097},{"x":2291,"y":750,"length":2410.6391268707143},{"x":2362,"y":800,"length":2493.801114764367},{"x":2454,"y":850,"length":2597.0398533715265},{"x":2560,"y":890,"length":2710.2951868754076},{"x":2660,"y":914,"length":2812.6492849269353},{"x":2755,"y":926,"length":2906.458497897398},{"x":2857,"y":928,"length":3003.9362509880266},{"x":2951,"y":920,"length":3091.084114028604},{"x":3039,"y":904,"length":3170.6051472865556},{"x":3128,"y":880,"length":3249.4282574016},{"x":3218,"y":840,"length":3325.8268144929016},{"x":3292,"y":801,"length":3388.047372750269},{"x":3377,"y":742,"length":3457.555928687199},{"x":3446,"y":682,"length":3512.8393074548685},{"x":3505,"y":620,"length":3559.413575295796},{"x":3555,"y":559,"length":3598.6811473093862},{"x":3599,"y":495,"length":3632.881225694008},{"x":3648,"y":406,"length":3670.5231234798125},{"x":3679,"y":330,"length":3693.7705667786136},{"x":3702,"y":241,"length":3709.8362497555063},{"x":3720,"y":110,"length":3721.6259887312694},{"x":4225,"y":-410,"length":4244.846875919083},{"x":4670,"y":-230,"length":4675.660381165424},{"x":4790,"y":1605,"length":5051.744748104362},{"x":2993,"y":1570,"length":3379.7853482136998},{"x":1685,"y":1595,"length":2320.183182423319},{"x":925,"y":1090,"length":1429.5891018051307},{"x":150,"y":1095,"length":1105.2262211873187},{"x":98,"y":458,"length":468.36737717309046},{"x":70,"y":340,"length":347.1310991541956},{"x":45,"y":260,"length":263.86549603917524},{"x":-15,"y":190,"length":190.59118552545917},{"x":-55,"y":163,"length":172.02906731131225},{"x":-85,"y":130,"length":155.32224567009067},{"x":-95,"y":65,"length":115.10864433221339}],"y":-90},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":12132,"rotation":39,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-184,"density":"1","height":1571.6,"action":0,"isStatic":true,"wireframe":false,"width":4354.85,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":1475,"y":-1295,"length":1962.816853402273},{"x":1378,"y":-493,"length":1463.5344205040071},{"x":1364,"y":-472,"length":1443.3571976472074},{"x":499,"y":228,"length":548.620998504432},{"x":454,"y":237,"length":512.1376768018538},{"x":54,"y":96,"length":110.14535850411491},{"x":17,"y":51,"length":53.75872022286245},{"x":7,"y":5,"length":8.602325267042627},{"x":25,"y":-60,"length":65},{"x":26,"y":-119,"length":121.80722474467596},{"x":20,"y":-173,"length":174.15223225672418},{"x":-2,"y":-229,"length":229.0087334579186},{"x":-39,"y":-281,"length":283.69349657685143},{"x":-77,"y":-325,"length":333.9970059746045},{"x":-130,"y":-364,"length":386.51778743028115},{"x":-188,"y":-387,"length":430.2476031310343},{"x":-259,"y":-388,"length":466.50294747193186},{"x":-323,"y":-380,"length":498.7273804394541},{"x":-379,"y":-362,"length":524.1039973135103},{"x":-425,"y":-336,"length":541.7757838811181},{"x":-473,"y":-296,"length":557.9829746506608},{"x":-508,"y":-250,"length":566.1837157672411},{"x":-529,"y":-206,"length":567.6944600751358},{"x":-543,"y":-159,"length":565.8003181335267},{"x":-547,"y":-111,"length":558.1487256995217},{"x":-544,"y":-59,"length":547.1900949395923},{"x":-526,"y":-10,"length":526.0950484465711},{"x":-512,"y":49,"length":514.339382120405},{"x":-555,"y":95,"length":563.0719314616916},{"x":-613,"y":120,"length":624.6350934745822},{"x":-702,"y":128,"length":713.5741026690921},{"x":-774,"y":119,"length":783.0945025985051},{"x":-2834,"y":-890,"length":2970.463936828724}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":5150,"y":92,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":10870,"y":-253,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":8307,"active":false,"y":69,"safeId":-1,"id":4,"rotation":63.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8296,"active":false,"y":71,"safeId":-1,"id":4,"rotation":78.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8286,"active":false,"y":74,"safeId":-1,"id":4,"rotation":63.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8264,"active":false,"y":80,"safeId":-1,"id":4,"rotation":62.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8274,"active":false,"y":76,"safeId":-1,"id":4,"rotation":78.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8221,"active":false,"y":88,"safeId":-1,"id":4,"rotation":62.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8232,"active":false,"y":86,"safeId":-1,"id":4,"rotation":78.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8244,"active":false,"y":84,"safeId":-1,"id":4,"rotation":63.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8254,"active":false,"y":81,"safeId":-1,"id":4,"rotation":78.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8178,"active":false,"y":99,"safeId":-1,"id":4,"rotation":62.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8189,"active":false,"y":97,"safeId":-1,"id":4,"rotation":78.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8201,"active":false,"y":95,"safeId":-1,"id":4,"rotation":63.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8211,"active":false,"y":92,"safeId":-1,"id":4,"rotation":78.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8169,"active":false,"y":102,"safeId":-1,"id":4,"rotation":80.00000000000004,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8144,"active":false,"y":122,"safeId":-1,"id":4,"rotation":24.000000000000057,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8890,"active":false,"y":171,"safeId":-1,"id":5,"rotation":27,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8863,"active":false,"y":191,"safeId":-1,"id":5,"rotation":84,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8852,"active":false,"y":193,"safeId":-1,"id":5,"rotation":67.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8842,"active":false,"y":194,"safeId":-1,"id":5,"rotation":84,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8829,"active":false,"y":195,"safeId":-1,"id":5,"rotation":65.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8819,"active":false,"y":200,"safeId":-1,"id":5,"rotation":84,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8808,"active":false,"y":202,"safeId":-1,"id":5,"rotation":67.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8798,"active":false,"y":203,"safeId":-1,"id":5,"rotation":84,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8787,"active":false,"y":205,"safeId":-1,"id":5,"rotation":65.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8777,"active":false,"y":208,"safeId":-1,"id":5,"rotation":81.99999999999999,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8767,"active":false,"y":210,"safeId":-1,"id":5,"rotation":65.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8755,"active":false,"y":211,"safeId":-1,"id":5,"rotation":84,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8744,"active":false,"y":215,"safeId":-1,"id":5,"rotation":65.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8733,"active":false,"y":216,"safeId":-1,"id":5,"rotation":83.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8713,"active":false,"y":223,"safeId":-1,"id":5,"rotation":50.00000000000003,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6450,"ag":true,"active":true,"y":-40,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":6560,"ag":true,"active":true,"y":180,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":256.1,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall52E"}],[{"params":{"x":6004,"rotation":-27,"y":121,"safeId":-1,"width":132,"ttl":0.4,"height":18},"className":"GlassCrashed0"},{"params":{"x":6116,"rotation":-30,"y":61,"safeId":-1,"width":132,"ttl":0.4,"height":18},"className":"GlassCrashed0"},{"params":{"x":6273,"rotation":-27,"y":189,"safeId":-1,"width":132,"ttl":0.4,"height":18},"className":"GlassCrashed0"},{"params":{"x":6387,"rotation":-27,"y":131,"safeId":-1,"width":132,"ttl":0.4,"height":18},"className":"GlassCrashed0"},{"params":{"x":6510,"stones":false,"physic":false,"impulse":7000,"id":2,"radius":64,"y":-120,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":30},"className":"Tnt1"},{"params":{"x":6624,"stones":false,"physic":false,"impulse":1900,"id":3,"radius":200,"y":166,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":30},"className":"Tnt1"},{"params":{"x":5890,"rotation":-22,"y":172,"safeId":-1,"width":132,"ttl":0.4,"height":18},"className":"GlassCrashed0"},{"params":{"x":8151,"stones":false,"physic":false,"impulse":1,"id":4,"radius":1,"y":106,"height":53.2,"width":53.2,"safeId":-1,"rotation":-12,"count":1},"className":"Tnt1"},{"params":{"x":8880,"stones":false,"physic":false,"impulse":1,"id":5,"radius":1,"y":188,"height":53.2,"width":53.2,"safeId":-1,"rotation":171,"count":1},"className":"Tnt1"},{"params":{"x":12005,"rotation":-178,"y":-683,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12251,"rotation":-98.99999999999994,"y":-462,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12064,"rotation":-165,"y":-674,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12115,"rotation":-152,"y":-653,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12002,"rotation":-9,"y":-168,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12252,"rotation":-83.99999999999994,"y":-401,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12164,"rotation":-138.99999999999994,"y":-618,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12236,"rotation":-68.99999999999994,"y":-340,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12208,"rotation":-56,"y":-286,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":11749,"rotation":97.00000000000006,"y":-466,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12169,"rotation":-43,"y":-241,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12119,"rotation":-28,"y":-205,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":11836,"rotation":139.00000000000009,"y":-623,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":11751,"rotation":78.00000000000006,"y":-408,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12062,"rotation":-19,"y":-181,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":11764,"rotation":111.00000000000006,"y":-524,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12234,"rotation":-112.99999999999994,"y":-521,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":11792,"rotation":126.00000000000006,"y":-578,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":12205,"rotation":-125.99999999999994,"y":-574,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":11887,"rotation":154,"y":-657,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"},{"params":{"x":11942,"rotation":167,"y":-676,"safeId":2,"width":66,"ttl":0.3,"height":18},"className":"GlassCrashed1"}],null,[{"params":{"x":610,"rotation":0,"y":20,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":5150,"rotation":0,"y":20,"id":0,"width":128,"height":1031},"className":"SafePointE"},{"params":{"x":10870,"rotation":0,"y":-330,"id":0,"width":128,"height":3216},"className":"SafePointE"}],[{"params":{"x":6470,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":-80,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6146,"sndId":-1,"rotation":48,"y":-76,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":175,"height":64},"className":"ToggleE"},{"params":{"x":6564,"rotation":0,"graphic":0,"safeId":-1,"id":3,"y":175,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6420,"sndId":-1,"rotation":0,"y":-160,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":3,"width":268,"height":64},"className":"ToggleE"},{"params":{"x":8114,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":108,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8196,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":132,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8174,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":136,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8183,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":63,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8205,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":57,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8239,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":121,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8162,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":68,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8246,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":47,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8227,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":52,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8281,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":111,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8260,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":116,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8268,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":41,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8218,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":128,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8290,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":37,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8324,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":101,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8303,"rotation":-21,"graphic":0,"safeId":-1,"id":-1,"y":105,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6820,"sndId":-1,"rotation":0,"y":-110,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":4,"width":64,"height":749},"className":"ToggleE"},{"params":{"x":8051,"active":0,"y":124,"cycle":0,"body":false,"id":4,"position":0,"width":909,"height":157,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-896,"y":144,"length":907.4976583991829}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":1270,"rotation":0,"graphic":0,"safeId":-1,"id":11,"y":130,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1250,"sndId":-1,"rotation":0,"y":-210,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":64,"height":983},"className":"ToggleE"},{"params":{"x":8802,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":238,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8782,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":242,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8867,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":226,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8793,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":168,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8823,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":234,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8738,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":250,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8859,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":157,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8837,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":160,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8917,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":184,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8728,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":181,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8846,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":229,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8759,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":247,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8691,"rotation":144,"graphic":0,"safeId":-1,"id":-1,"y":198,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8772,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":173,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8814,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":163,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8751,"rotation":162,"graphic":0,"safeId":-1,"id":-1,"y":177,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8974,"active":0,"y":173,"cycle":0,"body":false,"id":5,"position":0,"width":1005,"height":205,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":992,"y":-192,"length":1010.4098178462044}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1200},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":8540,"sndId":-1,"rotation":0,"y":-220,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":5,"width":64,"height":1061},"className":"ToggleE"},{"params":{"x":13130,"active":0,"y":1090,"cycle":0,"body":false,"id":7,"position":0,"width":13,"height":429,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-416,"length":416}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":800},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":12880,"sndId":-1,"rotation":0,"y":550,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":7,"width":64,"height":1433},"className":"ToggleE"}]],"settings":{"prizes":"32,38,45","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map17.json b/motox3mspooky/assets/levels/map17.json deleted file mode 100644 index 08bf8395..00000000 --- a/motox3mspooky/assets/levels/map17.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":8860,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":15,"y":-40,"length":42.720018726587654},{"x":60,"y":-40,"length":72.11102550927978},{"x":100,"y":-35,"length":105.94810050208545},{"x":165,"y":-40,"length":169.77926846349644},{"x":215,"y":-45,"length":219.65882636488797},{"x":245,"y":-55,"length":251.09759058979438},{"x":285,"y":25,"length":286.09439001839934},{"x":5515,"y":-85,"length":5515.654992836299},{"x":5465,"y":1245,"length":5605.020071328915},{"x":-245,"y":1345,"length":1367.132034589198},{"x":-620,"y":1085,"length":1249.6499509862751},{"x":-630,"y":685,"length":930.658369112963},{"x":-450,"y":-10,"length":450.111097397076}],"y":-750},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4543,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":121,"y":21,"length":122.8087944733601},{"x":106,"y":61,"length":122.29881438509533},{"x":79,"y":94,"length":122.78843593759146},{"x":42,"y":115,"length":122.42957159118053},{"x":0,"y":123,"length":123},{"x":-42,"y":115,"length":122.42957159118053},{"x":-79,"y":94,"length":122.78843593759146},{"x":-106,"y":61,"length":122.29881438509533},{"x":-121,"y":21,"length":122.8087944733601},{"x":-121,"y":-21,"length":122.8087944733601},{"x":-106,"y":-61,"length":122.29881438509533},{"x":-79,"y":-94,"length":122.78843593759146},{"x":-42,"y":-115,"length":122.42957159118053},{"x":0,"y":-123,"length":123},{"x":42,"y":-115,"length":122.42957159118053},{"x":79,"y":-94,"length":122.78843593759146},{"x":106,"y":-61,"length":122.29881438509533},{"x":121,"y":-21,"length":122.8087944733601}],"y":100},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":3900,"bg":true,"rotation":0,"y":100,"vertices":[{"x":-85,"y":0,"length":85},{"x":1375,"y":0,"length":1375},{"x":1375,"y":245,"length":1396.6567223194108},{"x":-85,"y":245,"length":259.3260495977988}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":2684,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-555,"length":555},{"x":25,"y":-570,"length":570.5479822065801},{"x":57,"y":-587,"length":589.7609685287761},{"x":95,"y":-603,"length":610.4375479932406},{"x":135,"y":-611,"length":625.7363662118416},{"x":171,"y":-615,"length":638.3306353293723},{"x":208,"y":-613,"length":647.3275832219728},{"x":246,"y":-610,"length":657.7355091524252},{"x":286,"y":-599,"length":663.7748112123569},{"x":316,"y":-587,"length":666.6520831738246},{"x":342,"y":-572,"length":666.4442962468806},{"x":374,"y":-547,"length":662.6348919276738},{"x":402,"y":-519,"length":656.4792456734638},{"x":427,"y":-487,"length":647.686652633818},{"x":450,"y":-450,"length":636.3961030678928},{"x":466,"y":-419,"length":626.6713652306128},{"x":485,"y":-383,"length":617.991909332153},{"x":509,"y":-343,"length":613.7833493994441},{"x":540,"y":-300,"length":617.73780845922},{"x":573,"y":-260,"length":629.2288931700451},{"x":615,"y":-222,"length":653.8417239668939},{"x":661,"y":-185,"length":686.4007575753395},{"x":712,"y":-157,"length":729.1042449471818},{"x":780,"y":-133,"length":791.2578593606512},{"x":860,"y":-117,"length":867.9222315392088},{"x":911,"y":-115,"length":918.2298187273162},{"x":957,"y":-115,"length":963.884847894187},{"x":1004,"y":-122,"length":1011.3851887386921},{"x":1046,"y":-131,"length":1054.1712384617597},{"x":1078,"y":-139,"length":1086.9245603996626},{"x":1108,"y":-153,"length":1118.5137460040444},{"x":1142,"y":-160,"length":1153.1539359513108},{"x":1173,"y":-156,"length":1183.3279342599835},{"x":1205,"y":-145,"length":1213.6927123452624},{"x":1228,"y":-129,"length":1234.7570611257909},{"x":1251,"y":-103,"length":1255.233046091442},{"x":1264,"y":-71,"length":1265.9924960283138},{"x":1268,"y":-37,"length":1268.5397116369672},{"x":1265,"y":-6,"length":1265.0142291689845},{"x":1251,"y":27,"length":1251.2913329836501},{"x":1226,"y":53,"length":1227.1450606998344},{"x":1200,"y":72,"length":1202.1580594913466},{"x":1118,"y":140,"length":1126.7315563167654},{"x":0,"y":125,"length":125}],"y":207},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2163,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":37,"y":-2,"length":37.05401462729781},{"x":87,"y":-9,"length":87.46427842267951},{"x":141,"y":-25,"length":143.19916200872126},{"x":191,"y":-55,"length":198.76116320851014},{"x":224,"y":-81,"length":238.19529802244207},{"x":255,"y":-118,"length":280.9786468755233},{"x":280,"y":-160,"length":322.49030993194197},{"x":298,"y":-198,"length":357.7820565651665},{"x":322,"y":-200,"length":379.05672398732094},{"x":322,"y":0,"length":322},{"x":100,"y":100,"length":141.4213562373095},{"x":0,"y":50,"length":50}],"y":290},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-10,"physic":true,"lineId":0,"y":290,"height":1154,"isRoad":true,"direction":90,"width":14368,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":5010,"y":0,"length":5010},{"x":5010,"y":-145,"length":5012.097864168257},{"x":5020,"y":-175,"length":5023.049372642081},{"x":5039,"y":-200,"length":5042.96747956994},{"x":5062,"y":-219,"length":5066.735142081141},{"x":5091,"y":-235,"length":5096.4209009853175},{"x":5129,"y":-244,"length":5134.8005803536325},{"x":5795,"y":-245,"length":5800.1767214456495},{"x":6315,"y":-725,"length":6356.480944673712},{"x":6935,"y":-725,"length":6972.793557821714},{"x":6935,"y":-675,"length":6967.772240824179},{"x":7100,"y":-675,"length":7132.014091405036},{"x":7100,"y":0,"length":7100},{"x":8022,"y":0,"length":8022},{"x":8025,"y":-1090,"length":8098.6866219159265},{"x":8895,"y":-1090,"length":8961.535861670141},{"x":8895,"y":-315,"length":8900.575824068912},{"x":8293,"y":-315,"length":8298.980298807799},{"x":8293,"y":0,"length":8293},{"x":10870,"y":0,"length":10870},{"x":12000,"y":-575,"length":12013.768143259633},{"x":14355,"y":-575,"length":14366.51140674033}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":40,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":585,"y":0,"length":585},{"x":585,"y":1055,"length":1206.3374320645116},{"x":0,"y":1055,"length":1055}],"y":-610},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":12760,"rotation":0,"y":-970,"vertices":[{"x":0,"y":0,"length":0},{"x":760,"y":5,"length":760.0164471904538},{"x":765,"y":770,"length":1085.4146673046205},{"x":5,"y":765,"length":765.0163396947806}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":8320,"rotation":-42,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":40,"y":0,"length":40},{"x":40,"y":135,"length":140.80127840328723},{"x":0,"y":135,"length":135}],"y":30},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8342,"rotation":-132,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":40,"y":0,"length":40},{"x":40,"y":135,"length":140.80127840328723},{"x":0,"y":135,"length":135}],"y":258},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8577,"rotation":-42,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":40,"y":0,"length":40},{"x":40,"y":135,"length":140.80127840328723},{"x":0,"y":135,"length":135}],"y":160},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8602,"rotation":-132,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":40,"y":0,"length":40},{"x":40,"y":135,"length":140.80127840328723},{"x":0,"y":135,"length":135}],"y":128},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7536,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":50,"length":50},{"x":100,"y":50,"length":111.80339887498948},{"x":100,"y":0,"length":100},{"x":125,"y":0,"length":125},{"x":125,"y":80,"length":148.4082207965583},{"x":60,"y":130,"length":143.17821063276352},{"x":60,"y":205,"length":213.60009363293827},{"x":60,"y":290,"length":296.1418578992169},{"x":60,"y":400,"length":404.4749683231337},{"x":60,"y":505,"length":508.55186559484764},{"x":65,"y":725,"length":727.9079612148778},{"x":40,"y":725,"length":726.102609828666},{"x":40,"y":550,"length":551.4526271584895},{"x":40,"y":450,"length":451.7742799230607},{"x":40,"y":365,"length":367.18523935474315},{"x":40,"y":285,"length":287.7933286231632},{"x":40,"y":205,"length":208.86598574205422},{"x":40,"y":130,"length":136.01470508735443},{"x":-25,"y":85,"length":88.60022573334675},{"x":-25,"y":0,"length":25},{"x":0,"y":0,"length":0}],"y":-380},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7060,"bg":true,"rotation":0,"y":-220,"vertices":[{"x":0,"y":0,"length":0},{"x":1295,"y":0,"length":1295},{"x":1295,"y":570,"length":1414.8939889617172},{"x":0,"y":570,"length":570}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":2492,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":90,"density":"1","height":211,"action":0,"isStatic":true,"wireframe":false,"width":64,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":198,"length":198}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2677,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":290,"density":"1","height":645,"action":0,"isStatic":true,"wireframe":false,"width":64,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-632,"length":632}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":6850,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-420,"length":420},{"x":55,"y":-420,"length":423.5858826731599},{"x":55,"y":-360,"length":364.17715469260287},{"x":55,"y":-290,"length":295.16944286290885},{"x":55,"y":-200,"length":207.4246851269154},{"x":55,"y":-125,"length":136.56500283747664},{"x":55,"y":-45,"length":71.06335201775947},{"x":55,"y":40,"length":68.00735254367721},{"x":55,"y":120,"length":132.00378782444085},{"x":55,"y":205,"length":212.24985276791125},{"x":55,"y":265,"length":270.64737205448716},{"x":55,"y":350,"length":354.29507476113747},{"x":55,"y":425,"length":428.54404674432243},{"x":0,"y":425,"length":425},{"x":0,"y":375,"length":375},{"x":0,"y":315,"length":315},{"x":0,"y":250,"length":250},{"x":0,"y":185,"length":185},{"x":0,"y":110,"length":110},{"x":0,"y":60,"length":60},{"x":0,"y":-5,"length":5},{"x":0,"y":-85,"length":85},{"x":0,"y":-150,"length":150},{"x":0,"y":-230,"length":230},{"x":0,"y":-320,"length":320},{"x":0,"y":-380,"length":380}],"y":-860},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":8006,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":280,"density":"1","height":1091,"action":0,"isStatic":true,"wireframe":false,"width":64,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-1078,"length":1078}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":9100,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":5485,"y":-415,"length":5500.677231032557},{"x":5225,"y":340,"length":5236.050515417131},{"x":5375,"y":805,"length":5434.94710185849},{"x":4695,"y":810,"length":4764.3598730574495},{"x":3610,"y":460,"length":3639.189470198},{"x":2870,"y":785,"length":2975.420138400626},{"x":1610,"y":1390,"length":2127.016690108472},{"x":100,"y":1395,"length":1398.5796366313932},{"x":0,"y":1395,"length":1395}],"y":-1420},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8677,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":60,"y":0,"length":60},{"x":59,"y":10,"length":59.841457201508724},{"x":56,"y":20,"length":59.464274989274024},{"x":51,"y":29,"length":58.66856057549052},{"x":45,"y":38,"length":58.89821729050889},{"x":38,"y":45,"length":58.89821729050889},{"x":30,"y":51,"length":59.16924876994806},{"x":20,"y":56,"length":59.464274989274024},{"x":10,"y":59,"length":59.841457201508724},{"x":0,"y":60,"length":60},{"x":-10,"y":59,"length":59.841457201508724},{"x":-20,"y":56,"length":59.464274989274024},{"x":-29,"y":51,"length":58.66856057549052},{"x":-38,"y":45,"length":58.89821729050889},{"x":-45,"y":38,"length":58.89821729050889},{"x":-51,"y":29,"length":58.66856057549052},{"x":-56,"y":20,"length":59.464274989274024},{"x":-59,"y":10,"length":59.841457201508724},{"x":-60,"y":0,"length":60},{"x":-59,"y":-10,"length":59.841457201508724},{"x":-56,"y":-20,"length":59.464274989274024},{"x":-51,"y":-30,"length":59.16924876994806},{"x":-45,"y":-38,"length":58.89821729050889},{"x":-38,"y":-45,"length":58.89821729050889},{"x":-30,"y":-51,"length":59.16924876994806},{"x":-20,"y":-56,"length":59.464274989274024},{"x":-10,"y":-59,"length":59.841457201508724},{"x":0,"y":-60,"length":60},{"x":10,"y":-59,"length":59.841457201508724},{"x":20,"y":-56,"length":59.464274989274024},{"x":30,"y":-51,"length":59.16924876994806},{"x":38,"y":-45,"length":58.89821729050889},{"x":45,"y":-38,"length":58.89821729050889},{"x":51,"y":-30,"length":59.16924876994806},{"x":56,"y":-20,"length":59.464274989274024},{"x":59,"y":-10,"length":59.841457201508724}],"y":45},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8347,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":60,"y":0,"length":60},{"x":59,"y":10,"length":59.841457201508724},{"x":56,"y":20,"length":59.464274989274024},{"x":51,"y":29,"length":58.66856057549052},{"x":45,"y":38,"length":58.89821729050889},{"x":38,"y":45,"length":58.89821729050889},{"x":30,"y":51,"length":59.16924876994806},{"x":20,"y":56,"length":59.464274989274024},{"x":10,"y":59,"length":59.841457201508724},{"x":0,"y":60,"length":60},{"x":-10,"y":59,"length":59.841457201508724},{"x":-20,"y":56,"length":59.464274989274024},{"x":-29,"y":51,"length":58.66856057549052},{"x":-38,"y":45,"length":58.89821729050889},{"x":-45,"y":38,"length":58.89821729050889},{"x":-51,"y":29,"length":58.66856057549052},{"x":-56,"y":20,"length":59.464274989274024},{"x":-59,"y":10,"length":59.841457201508724},{"x":-60,"y":0,"length":60},{"x":-59,"y":-10,"length":59.841457201508724},{"x":-56,"y":-20,"length":59.464274989274024},{"x":-51,"y":-30,"length":59.16924876994806},{"x":-45,"y":-38,"length":58.89821729050889},{"x":-38,"y":-45,"length":58.89821729050889},{"x":-30,"y":-51,"length":59.16924876994806},{"x":-20,"y":-56,"length":59.464274989274024},{"x":-10,"y":-59,"length":59.841457201508724},{"x":0,"y":-60,"length":60},{"x":10,"y":-59,"length":59.841457201508724},{"x":20,"y":-56,"length":59.464274989274024},{"x":30,"y":-51,"length":59.16924876994806},{"x":38,"y":-45,"length":58.89821729050889},{"x":45,"y":-38,"length":58.89821729050889},{"x":51,"y":-30,"length":59.16924876994806},{"x":56,"y":-20,"length":59.464274989274024},{"x":59,"y":-10,"length":59.841457201508724}],"y":26},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8677,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":60,"y":0,"length":60},{"x":59,"y":10,"length":59.841457201508724},{"x":56,"y":20,"length":59.464274989274024},{"x":51,"y":29,"length":58.66856057549052},{"x":45,"y":38,"length":58.89821729050889},{"x":38,"y":45,"length":58.89821729050889},{"x":30,"y":51,"length":59.16924876994806},{"x":20,"y":56,"length":59.464274989274024},{"x":10,"y":59,"length":59.841457201508724},{"x":0,"y":60,"length":60},{"x":-10,"y":59,"length":59.841457201508724},{"x":-20,"y":56,"length":59.464274989274024},{"x":-29,"y":51,"length":58.66856057549052},{"x":-38,"y":45,"length":58.89821729050889},{"x":-45,"y":38,"length":58.89821729050889},{"x":-51,"y":29,"length":58.66856057549052},{"x":-56,"y":20,"length":59.464274989274024},{"x":-59,"y":10,"length":59.841457201508724},{"x":-60,"y":0,"length":60},{"x":-59,"y":-10,"length":59.841457201508724},{"x":-56,"y":-20,"length":59.464274989274024},{"x":-51,"y":-30,"length":59.16924876994806},{"x":-45,"y":-38,"length":58.89821729050889},{"x":-38,"y":-45,"length":58.89821729050889},{"x":-30,"y":-51,"length":59.16924876994806},{"x":-20,"y":-56,"length":59.464274989274024},{"x":-10,"y":-59,"length":59.841457201508724},{"x":0,"y":-60,"length":60},{"x":10,"y":-59,"length":59.841457201508724},{"x":20,"y":-56,"length":59.464274989274024},{"x":30,"y":-51,"length":59.16924876994806},{"x":38,"y":-45,"length":58.89821729050889},{"x":45,"y":-38,"length":58.89821729050889},{"x":51,"y":-30,"length":59.16924876994806},{"x":56,"y":-20,"length":59.464274989274024},{"x":59,"y":-10,"length":59.841457201508724}],"y":226},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8347,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":60,"y":0,"length":60},{"x":59,"y":10,"length":59.841457201508724},{"x":56,"y":20,"length":59.464274989274024},{"x":51,"y":29,"length":58.66856057549052},{"x":45,"y":38,"length":58.89821729050889},{"x":38,"y":45,"length":58.89821729050889},{"x":30,"y":51,"length":59.16924876994806},{"x":20,"y":56,"length":59.464274989274024},{"x":10,"y":59,"length":59.841457201508724},{"x":0,"y":60,"length":60},{"x":-10,"y":59,"length":59.841457201508724},{"x":-20,"y":56,"length":59.464274989274024},{"x":-29,"y":51,"length":58.66856057549052},{"x":-38,"y":45,"length":58.89821729050889},{"x":-45,"y":38,"length":58.89821729050889},{"x":-51,"y":29,"length":58.66856057549052},{"x":-56,"y":20,"length":59.464274989274024},{"x":-59,"y":10,"length":59.841457201508724},{"x":-60,"y":0,"length":60},{"x":-59,"y":-10,"length":59.841457201508724},{"x":-56,"y":-20,"length":59.464274989274024},{"x":-51,"y":-30,"length":59.16924876994806},{"x":-45,"y":-38,"length":58.89821729050889},{"x":-38,"y":-45,"length":58.89821729050889},{"x":-30,"y":-51,"length":59.16924876994806},{"x":-20,"y":-56,"length":59.464274989274024},{"x":-10,"y":-59,"length":59.841457201508724},{"x":0,"y":-60,"length":60},{"x":10,"y":-59,"length":59.841457201508724},{"x":20,"y":-56,"length":59.464274989274024},{"x":30,"y":-51,"length":59.16924876994806},{"x":38,"y":-45,"length":58.89821729050889},{"x":45,"y":-38,"length":58.89821729050889},{"x":51,"y":-30,"length":59.16924876994806},{"x":56,"y":-20,"length":59.464274989274024},{"x":59,"y":-10,"length":59.841457201508724}],"y":226},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8511,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":144,"y":0,"length":144},{"x":142,"y":9,"length":142.28492541376264},{"x":133,"y":21,"length":134.6476884316994},{"x":120,"y":32,"length":124.1933975700802},{"x":106,"y":42,"length":114.0175425099138},{"x":89,"y":51,"length":102.57680049601859},{"x":71,"y":58,"length":91.67878707749138},{"x":46,"y":63,"length":78.00640999302557},{"x":20,"y":66,"length":68.96375859826666},{"x":0,"y":66,"length":66},{"x":-20,"y":66,"length":68.96375859826666},{"x":-46,"y":63,"length":78.00640999302557},{"x":-70,"y":58,"length":90.9065454189081},{"x":-89,"y":51,"length":102.57680049601859},{"x":-106,"y":42,"length":114.0175425099138},{"x":-120,"y":32,"length":124.1933975700802},{"x":-133,"y":21,"length":134.6476884316994},{"x":-142,"y":9,"length":142.28492541376264},{"x":-144,"y":0,"length":144},{"x":-142,"y":-9,"length":142.28492541376264},{"x":-133,"y":-21,"length":134.6476884316994},{"x":-120,"y":-33,"length":124.45481107614924},{"x":-106,"y":-42,"length":114.0175425099138},{"x":-89,"y":-51,"length":102.57680049601859},{"x":-71,"y":-58,"length":91.67878707749138},{"x":-46,"y":-63,"length":78.00640999302557},{"x":-20,"y":-66,"length":68.96375859826666},{"x":0,"y":-66,"length":66},{"x":20,"y":-66,"length":68.96375859826666},{"x":46,"y":-63,"length":78.00640999302557},{"x":71,"y":-58,"length":91.67878707749138},{"x":89,"y":-51,"length":102.57680049601859},{"x":106,"y":-42,"length":114.0175425099138},{"x":120,"y":-33,"length":124.45481107614924},{"x":133,"y":-21,"length":134.6476884316994},{"x":142,"y":-9,"length":142.28492541376264}],"y":132},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-10,"physic":false,"lineId":0,"y":290,"height":1008.5,"isRoad":false,"direction":90,"width":14368,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2300,"y":0,"length":2300},{"x":2835,"y":-265,"length":2847.358424926514},{"x":3010,"y":-270,"length":3022.0853727186463},{"x":3410,"y":-185,"length":3415.0146412570475},{"x":5080,"y":-150,"length":5082.214084432099},{"x":5795,"y":-245,"length":5800.1767214456495},{"x":6380,"y":-615,"length":6409.572918689669},{"x":6730,"y":-620,"length":6758.498353924487},{"x":7295,"y":-430,"length":7307.662074836247},{"x":7795,"y":-430,"length":7806.851157797233},{"x":8205,"y":-965,"length":8261.552517535672},{"x":8625,"y":-970,"length":8679.37353730095},{"x":8905,"y":5,"length":8905.001403705674},{"x":10870,"y":0,"length":10870},{"x":12000,"y":-575,"length":12013.768143259633},{"x":14355,"y":-575,"length":14366.51140674033}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":8260,"rotation":0,"physic":false,"line":false,"plr":false,"id":17,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":625,"y":0,"length":625},{"x":625,"y":385,"length":734.0640299047488},{"x":0,"y":385,"length":385}],"y":-60},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":5400,"y":-20,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":8440,"y":-860,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":1040,"rotation":-12,"y":260,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":960,"rotation":0,"y":260,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":1560,"rotation":0,"y":250,"width":92.7,"height":85.5},"className":"Dec27"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":5370,"y":0,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":5600,"rotation":0,"y":20,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":5540,"rotation":0,"y":20,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":6580,"rotation":0,"y":-470,"width":92.7,"height":85.5},"className":"Dec27"},{"params":{"x":9580,"rotation":0,"y":200,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":9580,"y":190,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":10320,"y":190,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":10320,"rotation":0,"y":200,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":-15,"scaleY":1,"x":11061.5,"y":59.9,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":11064.15,"rotation":-15,"y":69.55,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":-15,"scaleY":1,"x":11792,"y":-320,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":11794,"rotation":-15,"y":-310,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":8410,"y":-845,"width":77.3,"height":79.6},"className":"Dec23"}],[{"params":{"speed":1300,"x":2578,"rotation":-90,"y":61,"safeId":-1,"id":-1,"rate":1,"width":457,"height":128},"className":"GeyserE"},{"params":{"x":7560,"stones":false,"physic":true,"impulse":2500,"id":0,"radius":64,"y":-353,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"},{"params":{"x":7610,"stones":false,"physic":true,"impulse":2500,"id":0,"radius":64,"y":-353,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"},{"params":{"x":6820,"stones":false,"physic":false,"impulse":2000,"id":1,"radius":64,"y":-1260,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":12},"className":"Tnt1"},{"params":{"x":8860,"stones":false,"physic":false,"impulse":1,"id":17,"radius":1,"y":270,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8860,"stones":false,"physic":false,"impulse":1,"id":16,"radius":1,"y":220,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8860,"stones":false,"physic":false,"impulse":1,"id":14,"radius":1,"y":120,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8860,"stones":false,"physic":false,"impulse":1,"id":15,"radius":1,"y":170,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8860,"stones":false,"physic":false,"impulse":1,"id":12,"radius":1,"y":17,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8860,"stones":false,"physic":false,"impulse":1,"id":13,"radius":1,"y":67,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8520,"stones":false,"physic":false,"impulse":1,"id":17,"radius":1,"y":130,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":8860,"stones":false,"physic":false,"impulse":1,"id":12,"radius":1,"y":-33,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"}],null,[{"params":{"x":1220,"rotation":0,"y":210,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":5400,"rotation":0,"y":-100,"id":0,"width":128,"height":3172},"className":"SafePointE"},{"params":{"x":8440,"rotation":0,"y":-940,"id":0,"width":128,"height":1602},"className":"SafePointE"}],[{"params":{"x":6903,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":-438,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6880,"sndId":-1,"rotation":0,"y":-790,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":719},"className":"ToggleE"},{"params":{"x":7540,"sndId":-1,"rotation":0,"y":-680,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":988},"className":"ToggleE"},{"params":{"x":8420,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":110,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8403,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":100,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8590,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":157,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8613,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":159,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8592,"rotation":-96,"graphic":0,"safeId":-1,"id":-1,"y":100,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8615,"rotation":-96,"graphic":0,"safeId":-1,"id":-1,"y":102,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8410,"rotation":-84,"graphic":0,"safeId":-1,"id":-1,"y":168,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8426,"rotation":-84,"graphic":0,"safeId":-1,"id":-1,"y":156,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8347,"rotation":0,"graphic":0,"id":11,"y":26,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-770,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8677,"rotation":0,"graphic":0,"id":11,"y":45,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-770,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8677,"rotation":0,"graphic":0,"id":11,"y":226,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":770,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8347,"rotation":0,"graphic":0,"id":11,"y":226,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":770,"useWeld":false},"className":"MotorJointE"},{"params":{"x":9256,"sndId":-1,"rotation":-45,"y":140,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":9030,"sndId":-1,"rotation":0,"y":-450,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":12,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":9030,"sndId":-1,"rotation":0,"y":-380,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":13,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":9030,"sndId":-1,"rotation":0,"y":-310,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":14,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":9030,"sndId":-1,"rotation":0,"y":-240,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":15,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":9030,"sndId":-1,"rotation":0,"y":-170,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":16,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":9030,"sndId":-1,"rotation":0,"y":-100,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":17,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":9030,"sndId":-1,"rotation":0,"y":-520,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":10,"width":487,"height":53},"className":"ToggleE"},{"params":{"x":10320,"sndId":1,"rotation":0,"y":-200,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":1615},"className":"ToggleE"},{"params":{"x":12310,"sndId":1,"rotation":0,"y":-770,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":1615},"className":"ToggleE"}]],"settings":{"prizes":"26,34,43","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map18.json b/motox3mspooky/assets/levels/map18.json deleted file mode 100644 index 7828db3b..00000000 --- a/motox3mspooky/assets/levels/map18.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":-30,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":5,"y":-860,"length":860.0145347608958},{"x":2575,"y":-905,"length":2729.4046969989627},{"x":2385,"y":-725,"length":2492.759515075612},{"x":1695,"y":-725,"length":1843.542784965947},{"x":1370,"y":-405,"length":1428.6094637793774},{"x":1005,"y":-410,"length":1085.4146673046205},{"x":725,"y":-575,"length":925.3377761660873},{"x":435,"y":-575,"length":721.0062413044702},{"x":315,"y":-470,"length":565.795899596312},{"x":320,"y":-275,"length":421.9300889957956},{"x":450,"y":-180,"length":484.66483264210535},{"x":1390,"y":-175,"length":1400.9728762542122},{"x":1705,"y":-475,"length":1769.9293771221494},{"x":2005,"y":-475,"length":2060.497512738125},{"x":2205,"y":-335,"length":2230.3026700427904},{"x":2385,"y":-335,"length":2408.4123401112192},{"x":2500,"y":-430,"length":2536.710468303389},{"x":2500,"y":-595,"length":2569.82976089857},{"x":2400,"y":-720,"length":2505.673562138532},{"x":2605,"y":-905,"length":2757.7255120841887},{"x":6235,"y":-1110,"length":6333.034422770809},{"x":6390,"y":-770,"length":6436.22560201241},{"x":6275,"y":-655,"length":6309.092644746945},{"x":6090,"y":-655,"length":6125.122447755636},{"x":5970,"y":-555,"length":5995.742239289478},{"x":5970,"y":-435,"length":5985.827010530792},{"x":5830,"y":-330,"length":5839.332153594279},{"x":5210,"y":-325,"length":5220.126914165977},{"x":4920,"y":-120,"length":4921.4631970583705},{"x":3735,"y":-120,"length":3736.927213634218},{"x":3450,"y":35,"length":3450.1775316641315},{"x":3450,"y":300,"length":3463.0189141845585},{"x":3535,"y":375,"length":3554.8347359617155},{"x":3685,"y":375,"length":3704.031587338315},{"x":4215,"y":85,"length":4215.856971008386},{"x":4925,"y":85,"length":4925.733447924278},{"x":5215,"y":-165,"length":5217.609605940253},{"x":5700,"y":-165,"length":5702.387657814927},{"x":5750,"y":-125,"length":5751.35853516367},{"x":5750,"y":775,"length":5801.993191998764},{"x":5800,"y":815,"length":5856.980877551164},{"x":5920,"y":815,"length":5975.836761492067},{"x":5975,"y":775,"length":6025.051866996665},{"x":5975,"y":-75,"length":5975.470692757182},{"x":6015,"y":-105,"length":6015.916389046643},{"x":6055,"y":-105,"length":6055.910336192239},{"x":6095,"y":-75,"length":6095.461426340093},{"x":6095,"y":775,"length":6144.074381060177},{"x":6140,"y":815,"length":6193.853808413628},{"x":6270,"y":815,"length":6322.746634177271},{"x":6315,"y":775,"length":6362.377700199824},{"x":6310,"y":-250,"length":6314.950514453775},{"x":6390,"y":-365,"length":6400.416002104863},{"x":6390,"y":-565,"length":6414.929851526048},{"x":6285,"y":-650,"length":6318.522374732877},{"x":6395,"y":-760,"length":6440.001940993497},{"x":6445,"y":-1020,"length":6525.214555859447},{"x":11170,"y":-390,"length":11176.806341706024},{"x":12610,"y":605,"length":12624.504940788767},{"x":9635,"y":1955,"length":9831.340193483287},{"x":9575,"y":1765,"length":9736.316038420282},{"x":9580,"y":1555,"length":9705.381239291943},{"x":9460,"y":1320,"length":9551.649072280661},{"x":9880,"y":1100,"length":9941.046222606552},{"x":9690,"y":730,"length":9717.458515476153},{"x":9470,"y":845,"length":9507.624571889657},{"x":8890,"y":-5,"length":8890.001406074129},{"x":8565,"y":200,"length":8567.33476642532},{"x":8790,"y":540,"length":8806.571410032397},{"x":8965,"y":430,"length":8975.306401455051},{"x":9425,"y":1115,"length":9490.724419136825},{"x":9290,"y":1195,"length":9366.542852087958},{"x":9075,"y":1205,"length":9154.65182298049},{"x":8830,"y":880,"length":8873.74216438589},{"x":8735,"y":880,"length":8779.215511650229},{"x":8620,"y":1030,"length":8681.319024203638},{"x":8615,"y":1390,"length":8726.415357980619},{"x":8725,"y":1555,"length":8862.485543006544},{"x":9570,"y":1555,"length":9695.510559016477},{"x":9565,"y":1765,"length":9726.481892236267},{"x":9705,"y":2385,"length":9993.760553465347},{"x":9150,"y":2825,"length":9576.174862647402},{"x":5800,"y":1450,"length":5978.5031571456075},{"x":4555,"y":1380,"length":4759.456376520327},{"x":-35,"y":495,"length":496.2358310319802}],"y":120},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":10800,"rotation":0,"y":230,"width":1233,"height":1318},"className":"FinishZone"},{"params":{"x":1330,"bg":true,"rotation":0,"y":393,"vertices":[{"x":0,"y":0,"length":0},{"x":410,"y":0,"length":410},{"x":410,"y":100,"length":422.0189569201839},{"x":0,"y":100,"length":100}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":1660,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-45,"length":51.478150704935004},{"x":47,"y":-114,"length":123.30855606972291},{"x":32,"y":-176,"length":178.88543819998318},{"x":-5,"y":-230,"length":230.05434140654683},{"x":-40,"y":-277,"length":279.8731855680354},{"x":-80,"y":-320,"length":329.84845004941286},{"x":-110,"y":-367,"length":383.13052606128895},{"x":-114,"y":-411,"length":426.51729156037743},{"x":-97,"y":-465,"length":475.009473589738},{"x":-72,"y":-514,"length":519.0183041088243},{"x":-34,"y":-561,"length":562.0293586637623},{"x":1,"y":-596,"length":596.000838925584},{"x":45,"y":-620,"length":621.6309194369276},{"x":101,"y":-634,"length":641.9945482634569},{"x":164,"y":-638,"length":658.7412238504586},{"x":232,"y":-629,"length":670.4215092014873},{"x":285,"y":-608,"length":671.4826877887471},{"x":324,"y":-577,"length":661.7439081699204},{"x":337,"y":-526,"length":624.6959260312173},{"x":342,"y":-460,"length":573.2050244022639},{"x":310,"y":-165,"length":351.17659375305755},{"x":310,"y":-90,"length":322.80024783137947},{"x":300,"y":5,"length":300.04166377354994},{"x":290,"y":105,"length":308.4234102658227},{"x":0,"y":100,"length":100}],"y":320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-60,"physic":false,"lineId":0,"y":381,"height":2524,"isRoad":false,"direction":90,"width":11839,"textureMode":true,"cameraOffsetY":120,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":false,"wireframe":false,"vertices":[{"x":0,"y":10,"length":10},{"x":1385,"y":10,"length":1385.0361006125436},{"x":1685,"y":-193,"length":1696.0170989704084},{"x":1832,"y":-282,"length":1853.577082292506},{"x":1925,"y":-275,"length":1944.5436482630057},{"x":2017,"y":-213,"length":2028.215471787946},{"x":2095,"y":16,"length":2095.061096961136},{"x":2134,"y":84,"length":2135.6525934711385},{"x":2188,"y":143,"length":2192.668009526294},{"x":2251,"y":163,"length":2256.893883194334},{"x":2336,"y":171,"length":2342.2504135979993},{"x":2479,"y":163,"length":2484.3530344940914},{"x":2664,"y":146,"length":2667.99775112349},{"x":3122,"y":166,"length":3126.4100818670604},{"x":3686,"y":236,"length":3693.5473463866683},{"x":3942,"y":179,"length":3946.061960993517},{"x":4203,"y":-20,"length":4203.047584788923},{"x":5285,"y":-37,"length":5285.129515915386},{"x":5565,"y":110,"length":5566.0870456722105},{"x":5719,"y":442,"length":5736.054828887186},{"x":5979,"y":619,"length":6010.956828991538},{"x":6333,"y":768,"length":6379.397542088124},{"x":9044,"y":2229,"length":9314.632413573818},{"x":9319,"y":2194,"length":9573.786972771015},{"x":9476,"y":1992,"length":9683.111070312061},{"x":9539,"y":1866,"length":9719.798197493608},{"x":9766,"y":599,"length":9784.352661264822},{"x":9859,"y":486,"length":9870.971431424568},{"x":10064,"y":326,"length":10069.278623615497},{"x":11826,"y":126,"length":11826.671213828513}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":1580,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":320,"density":"1","height":145.5,"action":0,"isStatic":true,"wireframe":false,"width":73,"graphic":true,"textureMode":true,"shapeH":20,"straightSides":true,"vertices":[{"x":23,"y":126,"length":128.08200498118384},{"x":25,"y":-3,"length":25.179356624028344},{"x":75,"y":-3,"length":75.05997601918082},{"x":76,"y":100,"length":125.60254774486066}],"type":2,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1340,"rotation":-36,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":85,"y":0,"length":85},{"x":195,"y":0,"length":195},{"x":285,"y":0,"length":285},{"x":335,"y":0,"length":335},{"x":375,"y":-55,"length":379.0118731649445},{"x":400,"y":-55,"length":403.7635446644484},{"x":385,"y":55,"length":388.90872965260115},{"x":300,"y":55,"length":305},{"x":200,"y":55,"length":207.4246851269154},{"x":90,"y":55,"length":105.47511554864494},{"x":0,"y":55,"length":55}],"y":387},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2321,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.5,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":2,"vertices":[{"x":10,"y":3,"length":10.44030650891055},{"x":60,"y":-22,"length":63.90618123468183},{"x":120,"y":-33,"length":124.45481107614924},{"x":176,"y":-32,"length":178.88543819998318},{"x":230,"y":-16,"length":230.5558500667463},{"x":271,"y":8,"length":271.1180554666177},{"x":312,"y":45,"length":315.22848856028224},{"x":342,"y":92,"length":354.1581567605072},{"x":360,"y":145,"length":388.1043674065006},{"x":364,"y":192,"length":411.5337167231866},{"x":358,"y":242,"length":432.12035360533525},{"x":343,"y":290,"length":449.16478045367717},{"x":318,"y":326,"length":455.411901469428},{"x":286,"y":362,"length":461.34585724811706},{"x":252,"y":386,"length":460.9772228646444},{"x":200,"y":407,"length":453.48539116491946},{"x":153,"y":415,"length":442.30532440837743},{"x":104,"y":412,"length":424.92352253081964},{"x":66,"y":403,"length":408.36870595088453},{"x":23,"y":384,"length":384.68818541774846},{"x":-17,"y":352,"length":352.4102722679916},{"x":-50,"y":313,"length":316.9684526889072},{"x":-72,"y":271,"length":280.40149785619906},{"x":-84,"y":222,"length":237.36048533822978},{"x":-85,"y":177,"length":196.3517252279694},{"x":-76,"y":123,"length":144.5856147754679},{"x":-58,"y":78,"length":97.20082304178294},{"x":-28,"y":38,"length":47.20169488482379}],"y":-30},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5806,"rotation":-10,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":true,"layer":1,"rem":true,"safeId":1,"vertices":[{"x":99,"y":305,"length":320.66493416025395},{"x":122,"y":276,"length":301.7614952242913},{"x":148,"y":266,"length":304.4010512465422},{"x":175,"y":273,"length":324.27457501321317},{"x":193,"y":295,"length":352.5251764058845},{"x":201,"y":321,"length":378.73737602724134},{"x":182,"y":671,"length":695.244561287609},{"x":112,"y":673,"length":682.2558171243394},{"x":40,"y":657,"length":658.2165297225527},{"x":-16,"y":635,"length":635.201542819285}],"y":-246},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5645,"rotation":-9,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":1,"vertices":[{"x":92,"y":12,"length":92.77930803794561},{"x":88,"y":78,"length":117.5925167687128},{"x":97,"y":121,"length":155.08062419270823},{"x":116,"y":155,"length":193.60010330575756},{"x":140,"y":196,"length":240.86510747719356},{"x":170,"y":231,"length":286.8117849740488},{"x":204,"y":261,"length":331.2657543423407},{"x":244,"y":286,"length":375.9414848084739},{"x":286,"y":301,"length":415.20717720193613},{"x":335,"y":310,"length":456.4263357870578},{"x":407,"y":310,"length":511.61411239331545},{"x":460,"y":296,"length":547.0063985000542},{"x":513,"y":270,"length":579.714584946765},{"x":568,"y":223,"length":610.2073418109618},{"x":601,"y":177,"length":626.5221464561329},{"x":621,"y":132,"length":634.8740032478886},{"x":629,"y":89,"length":635.2652989106205},{"x":723,"y":101,"length":730.0205476560232},{"x":714,"y":157,"length":731.057453282572},{"x":696,"y":221,"length":730.2444796093977},{"x":663,"y":273,"length":717.0062761231592},{"x":620,"y":322,"length":698.6300881009921},{"x":566,"y":363,"length":672.402409275874},{"x":518,"y":389,"length":647.800123494894},{"x":463,"y":408,"length":617.1166826459969},{"x":397,"y":420,"length":577.93511746562},{"x":334,"y":421,"length":537.398362483549},{"x":276,"y":411,"length":495.07272193082906},{"x":225,"y":395,"length":454.58772530722825},{"x":173,"y":371,"length":409.35314827175813},{"x":124,"y":334,"length":356.2751745491117},{"x":87,"y":299,"length":311.40006422606916},{"x":56,"y":261,"length":266.94006818010666},{"x":30,"y":216,"length":218.07338214463496},{"x":10,"y":167,"length":167.29913329123974},{"x":-1,"y":111,"length":111.00450441310929},{"x":-5,"y":50,"length":50.24937810560445},{"x":2,"y":-1,"length":2.23606797749979}],"y":36},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9338,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":2,"vertices":[{"x":0,"y":0,"length":0},{"x":35,"y":-35,"length":49.49747468305833},{"x":95,"y":3,"length":95.04735661763561},{"x":140,"y":-15,"length":140.80127840328723},{"x":156,"y":-85,"length":177.65415840897168},{"x":211,"y":-85,"length":227.477471412006},{"x":222,"y":-15,"length":222.50617968946392},{"x":272,"y":2,"length":272.0073528417936},{"x":329,"y":-35,"length":330.8564643467013},{"x":366,"y":5,"length":366.0341514121326},{"x":331,"y":59,"length":336.21719170797917},{"x":347,"y":105,"length":362.5382738415353},{"x":419,"y":124,"length":436.9633851937711},{"x":418,"y":175,"length":453.15449903978663},{"x":348,"y":189,"length":396.01136347332255},{"x":328,"y":232,"length":401.756144943671},{"x":366,"y":302,"length":474.51027386137804},{"x":330,"y":335,"length":470.2393007820593},{"x":272,"y":293,"length":399.7911955008514},{"x":227,"y":314,"length":387.45967532118743},{"x":205,"y":385,"length":436.1765697512878},{"x":157,"y":384,"length":414.85539649376625},{"x":141,"y":314,"length":344.2048808486016},{"x":99,"y":297,"length":313.06548835666956},{"x":34,"y":332,"length":333.73642294481436},{"x":0,"y":299,"length":299},{"x":37,"y":234,"length":236.90715480964266},{"x":20,"y":192,"length":193.03885619221847},{"x":-50,"y":174,"length":181.0414317221337},{"x":-52,"y":124,"length":134.46189051177288},{"x":17,"y":106,"length":107.35455276791944},{"x":37,"y":64,"length":73.92563831310488}],"y":1470},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9558,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":2,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":165,"y":0,"length":165},{"x":250,"y":0,"length":250},{"x":320,"y":0,"length":320},{"x":400,"y":0,"length":400},{"x":490,"y":0,"length":490},{"x":585,"y":0,"length":585},{"x":670,"y":0,"length":670},{"x":770,"y":0,"length":770},{"x":880,"y":0,"length":880},{"x":970,"y":0,"length":970},{"x":1060,"y":0,"length":1060},{"x":1055,"y":25,"length":1055.2961669597782},{"x":1025,"y":90,"length":1028.943633052851},{"x":935,"y":90,"length":939.3215636830658},{"x":900,"y":25,"length":900.3471552684554},{"x":815,"y":25,"length":815.3833454271678},{"x":690,"y":25,"length":690.4527500126276},{"x":587,"y":24,"length":587.4904254538963},{"x":555,"y":80,"length":560.7361233236182},{"x":515,"y":80,"length":521.1765535785354},{"x":480,"y":23,"length":480.5507257303853},{"x":425,"y":24,"length":425.677107676699},{"x":395,"y":80,"length":403.01985062773275},{"x":355,"y":80,"length":363.90245945857527},{"x":319,"y":26,"length":320.0578072786227},{"x":266,"y":27,"length":267.36678926149375},{"x":236,"y":81,"length":249.51352668743232},{"x":192,"y":81,"length":208.38665984174708},{"x":160,"y":27,"length":162.2621335986927},{"x":104,"y":28,"length":107.70329614269008},{"x":75,"y":85,"length":113.35784048754634},{"x":30,"y":85,"length":90.13878188659973},{"x":0,"y":35,"length":35}],"y":518},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9571,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":2,"vertices":[{"x":0,"y":0,"length":0},{"x":35,"y":-35,"length":49.49747468305833},{"x":95,"y":3,"length":95.04735661763561},{"x":140,"y":-15,"length":140.80127840328723},{"x":156,"y":-85,"length":177.65415840897168},{"x":211,"y":-85,"length":227.477471412006},{"x":222,"y":-15,"length":222.50617968946392},{"x":272,"y":2,"length":272.0073528417936},{"x":329,"y":-35,"length":330.8564643467013},{"x":366,"y":5,"length":366.0341514121326},{"x":331,"y":59,"length":336.21719170797917},{"x":347,"y":105,"length":362.5382738415353},{"x":419,"y":124,"length":436.9633851937711},{"x":418,"y":175,"length":453.15449903978663},{"x":348,"y":189,"length":396.01136347332255},{"x":328,"y":232,"length":401.756144943671},{"x":366,"y":302,"length":474.51027386137804},{"x":330,"y":335,"length":470.2393007820593},{"x":272,"y":293,"length":399.7911955008514},{"x":227,"y":314,"length":387.45967532118743},{"x":205,"y":385,"length":436.1765697512878},{"x":157,"y":384,"length":414.85539649376625},{"x":141,"y":314,"length":344.2048808486016},{"x":99,"y":297,"length":313.06548835666956},{"x":34,"y":332,"length":333.73642294481436},{"x":0,"y":299,"length":299},{"x":37,"y":234,"length":236.90715480964266},{"x":20,"y":192,"length":193.03885619221847},{"x":-50,"y":174,"length":181.0414317221337},{"x":-52,"y":124,"length":134.46189051177288},{"x":17,"y":106,"length":107.35455276791944},{"x":37,"y":64,"length":73.92563831310488}],"y":1124},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9478,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":2,"vertices":[{"x":0,"y":0,"length":0},{"x":35,"y":-35,"length":49.49747468305833},{"x":95,"y":3,"length":95.04735661763561},{"x":140,"y":-15,"length":140.80127840328723},{"x":156,"y":-85,"length":177.65415840897168},{"x":211,"y":-85,"length":227.477471412006},{"x":222,"y":-15,"length":222.50617968946392},{"x":272,"y":2,"length":272.0073528417936},{"x":329,"y":-35,"length":330.8564643467013},{"x":366,"y":5,"length":366.0341514121326},{"x":331,"y":59,"length":336.21719170797917},{"x":347,"y":105,"length":362.5382738415353},{"x":419,"y":124,"length":436.9633851937711},{"x":418,"y":175,"length":453.15449903978663},{"x":348,"y":189,"length":396.01136347332255},{"x":328,"y":232,"length":401.756144943671},{"x":366,"y":302,"length":474.51027386137804},{"x":330,"y":335,"length":470.2393007820593},{"x":272,"y":293,"length":399.7911955008514},{"x":227,"y":314,"length":387.45967532118743},{"x":205,"y":385,"length":436.1765697512878},{"x":157,"y":384,"length":414.85539649376625},{"x":141,"y":314,"length":344.2048808486016},{"x":99,"y":297,"length":313.06548835666956},{"x":34,"y":332,"length":333.73642294481436},{"x":0,"y":299,"length":299},{"x":37,"y":234,"length":236.90715480964266},{"x":20,"y":192,"length":193.03885619221847},{"x":-50,"y":174,"length":181.0414317221337},{"x":-52,"y":124,"length":134.46189051177288},{"x":17,"y":106,"length":107.35455276791944},{"x":37,"y":64,"length":73.92563831310488}],"y":700},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":9480,"rotation":0,"y":1880,"originOffsetRatio":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"height":1199,"wireframe":false,"width":521.4,"vertices":[{"x":59,"y":7,"length":59.413803110051795},{"x":64,"y":-202,"length":211.8962010041709},{"x":-49,"y":-437,"length":439.7385586914115},{"x":366,"y":-657,"length":752.0671512571201},{"x":173,"y":-1029,"length":1043.4414214511517},{"x":458,"y":-1179,"length":1264.833981200695}],"textureMode":true,"smoothing":true,"straightSides":true,"type":2},"className":"frg.game.editor.objects::PillarPather"},{"params":{"stretchTexture":false,"x":9520,"rotation":0,"y":1620,"originOffsetRatio":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"height":974.45,"wireframe":false,"width":454.7,"vertices":[{"x":25,"y":50,"length":55.90169943749474},{"x":350,"y":-120,"length":370},{"x":-5,"y":-775,"length":775.0161288644256},{"x":260,"y":-910,"length":946.4142856064674},{"x":435,"y":-605,"length":745.1509914104657}],"textureMode":true,"smoothing":true,"straightSides":true,"type":3},"className":"frg.game.editor.objects::PillarPather"},{"params":{"x":-60,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-680,"y":-108,"length":688.5230569850221},{"x":-622,"y":-746,"length":971.2878049270463},{"x":136,"y":-2026,"length":2030.5595287998824},{"x":9933,"y":-3006,"length":10377.886345494442},{"x":12162,"y":-3000,"length":12526.54158177747},{"x":13627,"y":-786,"length":13649.649262893168},{"x":13080,"y":240,"length":13082.20164956954},{"x":11740,"y":225,"length":11742.155892339362},{"x":11575,"y":105,"length":11575.4762321038},{"x":11440,"y":60,"length":11440.157341575334},{"x":11323,"y":26,"length":11323.029850706922},{"x":11195,"y":25,"length":11195.027914212631},{"x":11080,"y":-25,"length":11080.028203935222},{"x":10972,"y":-112,"length":10972.57162200366},{"x":10860,"y":-242,"length":10862.695982121566},{"x":10717,"y":-340,"length":10722.391943964742},{"x":10550,"y":-406,"length":10557.809242451769},{"x":10317,"y":-413,"length":10325.263095921575},{"x":10073,"y":-366,"length":10079.647067234051},{"x":9581,"y":-104,"length":9581.564433848995},{"x":9428,"y":-44,"length":9428.102672330207},{"x":9370,"y":-29,"length":9370.044877160408},{"x":9305,"y":-34,"length":9305.062116933987},{"x":9225,"y":-64,"length":9225.22200274877},{"x":9180,"y":-149,"length":9181.209125164289},{"x":9130,"y":-227,"length":9132.821524589212},{"x":9071,"y":-280,"length":9075.320435114123},{"x":8991,"y":-320,"length":8996.692781239115},{"x":8893,"y":-338,"length":8899.420936218266},{"x":8810,"y":-331,"length":8816.21579817554},{"x":8754,"y":-312,"length":8759.558208037663},{"x":8694,"y":-280,"length":8698.507688103748},{"x":8650,"y":-238,"length":8653.273600204722},{"x":8615,"y":-200,"length":8617.321219497391},{"x":8580,"y":-150,"length":8581.311088639079},{"x":8560,"y":-95,"length":8560.527144983538},{"x":8550,"y":-30,"length":8550.052631416955},{"x":8550,"y":60,"length":8550.210523723963},{"x":8575,"y":125,"length":8575.911030322084},{"x":8615,"y":190,"length":8617.094928106571},{"x":8685,"y":260,"length":8688.890895850862},{"x":8765,"y":300,"length":8770.132553160185},{"x":8835,"y":320,"length":8840.793233641425},{"x":8940,"y":320,"length":8945.72523611138},{"x":8965,"y":345,"length":8971.635859752669},{"x":8920,"y":400,"length":8928.964105650779},{"x":8970,"y":470,"length":8982.304826713464},{"x":9130,"y":470,"length":9142.089476700608},{"x":9230,"y":580,"length":9248.20523128677},{"x":9280,"y":685,"length":9305.2471756531},{"x":9230,"y":745,"length":9260.017548579484},{"x":9140,"y":745,"length":9170.31215390185},{"x":9050,"y":705,"length":9077.41841053942},{"x":9002,"y":674,"length":9027.196685571884},{"x":8958,"y":600,"length":8978.071285081223},{"x":8898,"y":550,"length":8914.981996616707},{"x":8838,"y":520,"length":8853.284362314362},{"x":8776,"y":524,"length":8791.62965553031},{"x":8716,"y":550,"length":8733.33590330751},{"x":8660,"y":590,"length":8680.074884469603},{"x":8623,"y":637,"length":8646.496284623037},{"x":8571,"y":751,"length":8603.838794398696},{"x":8543,"y":848,"length":8584.984158401225},{"x":8537,"y":954,"length":8590.138823092442},{"x":8557,"y":1057,"length":8622.035606514277},{"x":8568,"y":1155,"length":8645.498771036868},{"x":8600,"y":1275,"length":8693.99936737978},{"x":8680,"y":1367,"length":8786.98406735781},{"x":8768,"y":1415,"length":8881.444083030641},{"x":8857,"y":1429,"length":8971.537772310832},{"x":8945,"y":1409,"length":9055.29160215175},{"x":9011,"y":1355,"length":9112.307391654433},{"x":9050,"y":1310,"length":9144.32064179729},{"x":9085,"y":1307,"length":9178.533325101565},{"x":9097,"y":1349,"length":9196.478130240946},{"x":9077,"y":1412,"length":9186.167481599712},{"x":9045,"y":1475,"length":9164.477617409517},{"x":9130,"y":1497,"length":9251.913802019559},{"x":9170,"y":1530,"length":9296.762877475148},{"x":9187,"y":1597,"length":9324.772276039776},{"x":9165,"y":1675,"length":9316.804709770406},{"x":9102,"y":1740,"length":9266.82275647916},{"x":9030,"y":1757,"length":9199.34503103346},{"x":8932,"y":1742,"length":9100.285050480561},{"x":8839,"y":1702,"length":9001.373506304468},{"x":8767,"y":1660,"length":8922.773615866314},{"x":8690,"y":1607,"length":8837.33834364171},{"x":8627,"y":1537,"length":8762.847596529338},{"x":8531,"y":1442,"length":8652.012771604073},{"x":8437,"y":1328,"length":8540.875423514852},{"x":8365,"y":1197,"length":8450.209109838643},{"x":8320,"y":1085,"length":8390.448438552019},{"x":8307,"y":980,"length":8364.606924416712},{"x":8270,"y":837,"length":8312.248131522543},{"x":8200,"y":725,"length":8231.987913013478},{"x":8115,"y":652,"length":8141.150348691516},{"x":7970,"y":587,"length":7991.587389248772},{"x":7796,"y":568,"length":7816.664250177309},{"x":7668,"y":568,"length":7689.008258546742},{"x":7508,"y":594,"length":7531.460681700462},{"x":7345,"y":622,"length":7371.28950727076},{"x":7194,"y":637,"length":7222.146841486955},{"x":7065,"y":614,"length":7091.630348516482},{"x":6971,"y":580,"length":6995.086918688002},{"x":6894,"y":568,"length":6917.359322747373},{"x":6774,"y":560,"length":6797.107914400065},{"x":6671,"y":577,"length":6695.9069587323265},{"x":6605,"y":600,"length":6632.196091793427},{"x":6520,"y":597,"length":6547.274929312194},{"x":6467,"y":569,"length":6491.983518155295},{"x":6454,"y":514,"length":6474.435264947824},{"x":6457,"y":431,"length":6471.368479695774},{"x":6457,"y":131,"length":6458.328731181156},{"x":6455,"y":-237,"length":6459.349348038082},{"x":6448,"y":-376,"length":6458.953475602685},{"x":6356,"y":-376,"length":6367.111747095381},{"x":6360,"y":-412,"length":6373.330683402517},{"x":6416,"y":-468,"length":6433.045934858541},{"x":6446,"y":-498,"length":6465.208426647976},{"x":6472,"y":-532,"length":6493.828454771499},{"x":6495,"y":-570,"length":6519.963573517876},{"x":6512,"y":-616,"length":6541.070248820142},{"x":6522,"y":-682,"length":6557.561132006319},{"x":6517,"y":-735,"length":6558.316399808719},{"x":6508,"y":-788,"length":6555.532625195301},{"x":6489,"y":-831,"length":6541.993732800422},{"x":6471,"y":-866,"length":6528.690297448639},{"x":6440,"y":-905,"length":6503.278019583662},{"x":6407,"y":-938,"length":6475.298680369887},{"x":6368,"y":-968,"length":6441.152691871231},{"x":6310,"y":-990,"length":6387.190305603865},{"x":6266,"y":-1002,"length":6345.609505792174},{"x":6222,"y":-1000,"length":6301.847665566028},{"x":6178,"y":-995,"length":6257.612084493573},{"x":6145,"y":-987,"length":6223.760438834387},{"x":6103,"y":-974,"length":6180.233409831703},{"x":6068,"y":-960,"length":6143.470029226154},{"x":6024,"y":-931,"length":6095.5177794835445},{"x":5996,"y":-905,"length":6063.913010589779},{"x":5975,"y":-876,"length":6038.874150038234},{"x":5957,"y":-843,"length":6016.352549510376},{"x":5948,"y":-809,"length":6002.764779666117},{"x":5941,"y":-767,"length":5990.306336073307},{"x":5925,"y":-751,"length":5972.405378070045},{"x":5902,"y":-735,"length":5947.59018426791},{"x":5856,"y":-709,"length":5898.764023081446},{"x":5800,"y":-686,"length":5840.427724062682},{"x":5740,"y":-667,"length":5778.62345199962},{"x":5680,"y":-660,"length":5718.216505170121},{"x":5615,"y":-656,"length":5653.190338207268},{"x":5550,"y":-656,"length":5588.634538060259},{"x":5484,"y":-656,"length":5523.096233092449},{"x":5413,"y":-660,"length":5453.088024229941},{"x":5331,"y":-658,"length":5371.454644693558},{"x":5253,"y":-653,"length":5293.431590187975},{"x":5167,"y":-641,"length":5206.608300995957},{"x":5096,"y":-623,"length":5133.940494396093},{"x":4940,"y":-573,"length":4973.120650054651},{"x":4750,"y":-510,"length":4777.300492956247},{"x":4682,"y":-490,"length":4707.570923523086},{"x":4593,"y":-473,"length":4617.291197228089},{"x":4502,"y":-460,"length":4525.439647150319},{"x":4433,"y":-456,"length":4456.3914774175755},{"x":4283,"y":-453,"length":4306.889596913299},{"x":4066,"y":-450,"length":4090.8258334962147},{"x":3870,"y":-466,"length":3897.9553614683687},{"x":3756,"y":-473,"length":3785.665727451382},{"x":3653,"y":-470,"length":3683.111320609248},{"x":3615,"y":-464,"length":3644.656499589502},{"x":3562,"y":-446,"length":3589.81336562223},{"x":3526,"y":-426,"length":3551.640747598214},{"x":3483,"y":-401,"length":3506.0077010753985},{"x":3460,"y":-370,"length":3479.727000786125},{"x":3445,"y":-330,"length":3460.7694231196624},{"x":3428,"y":-278,"length":3439.253988876076},{"x":3407,"y":-239,"length":3415.372600463967},{"x":3393,"y":-213,"length":3399.6791025036464},{"x":3372,"y":-186,"length":3377.125997057261},{"x":3339,"y":-154,"length":3342.549476073615},{"x":3310,"y":-133,"length":3312.670976719541},{"x":3278,"y":-113,"length":3279.9471032320016},{"x":3240,"y":-100,"length":3241.54284253656},{"x":3185,"y":-87,"length":3186.18800449691},{"x":2769,"y":-33,"length":2769.196634405004},{"x":2728,"y":-34,"length":2728.211868605516},{"x":2706,"y":-57,"length":2706.6002660163913},{"x":2712,"y":-89,"length":2713.459968379854},{"x":2741,"y":-137,"length":2744.421614839819},{"x":2757,"y":-197,"length":2764.029305199205},{"x":2756,"y":-252,"length":2767.497064135751},{"x":2747,"y":-307,"length":2764.101662385087},{"x":2726,"y":-349,"length":2748.249806695163},{"x":2689,"y":-401,"length":2718.735367776717},{"x":2640,"y":-437,"length":2675.9239525816124},{"x":2592,"y":-456,"length":2631.8054639353572},{"x":2592,"y":-543,"length":2648.2660364850053},{"x":2603,"y":-625,"length":2676.982256198199},{"x":2618,"y":-703,"length":2710.7439938142443},{"x":2640,"y":-809,"length":2761.173844581322},{"x":2629,"y":-869,"length":2768.8990591930215},{"x":2591,"y":-956,"length":2761.741660619255},{"x":2492,"y":-1009,"length":2688.520968860016},{"x":2358,"y":-1067,"length":2588.175612279816},{"x":2201,"y":-1107,"length":2463.7065572019733},{"x":2038,"y":-1123,"length":2326.9235054036476},{"x":1927,"y":-1120,"length":2228.8402814019673},{"x":1767,"y":-1110,"length":2086.7172784064446},{"x":1656,"y":-1074,"length":1973.781142882868},{"x":1565,"y":-1016,"length":1865.872718059836},{"x":1467,"y":-923,"length":1733.2103161474663},{"x":1354,"y":-786,"length":1565.6027593230665},{"x":1285,"y":-730,"length":1477.8785471073054},{"x":1221,"y":-702,"length":1408.4193267631626},{"x":1166,"y":-705,"length":1362.5641269312796},{"x":1060,"y":-766,"length":1307.8057959804278},{"x":880,"y":-874,"length":1240.272550691984},{"x":753,"y":-920,"length":1188.8687900689463},{"x":594,"y":-941,"length":1112.7969266672153},{"x":496,"y":-924,"length":1048.7096833728579},{"x":408,"y":-891,"length":979.9719383737475},{"x":338,"y":-843,"length":908.2362027578508},{"x":289,"y":-785,"length":836.508218728304},{"x":265,"y":-707,"length":755.0324496337889},{"x":261,"y":-621,"length":673.6185864419123},{"x":288,"y":-548,"length":619.0702706478481},{"x":325,"y":-474,"length":574.7181918123003},{"x":387,"y":-410,"length":563.7987229499549},{"x":470,"y":-356,"length":589.6066485378196},{"x":554,"y":-316,"length":637.7867982327637},{"x":643,"y":-292,"length":706.1961483893834},{"x":760,"y":-272,"length":807.2075321749668},{"x":852,"y":-264,"length":891.9641248391104},{"x":917,"y":-267,"length":955.0801013527608},{"x":984,"y":-275,"length":1021.7049476243129},{"x":1038,"y":-291,"length":1078.019016529857},{"x":1095,"y":-317,"length":1139.9622800777227},{"x":1146,"y":-363,"length":1202.116882836274},{"x":1196,"y":-423,"length":1268.599621630087},{"x":1215,"y":-395,"length":1277.5953976122487},{"x":1218,"y":-357,"length":1269.2411118459722},{"x":1228,"y":-321,"length":1269.2615963622313},{"x":1268,"y":-280,"length":1298.5468801702925},{"x":1245,"y":-246,"length":1269.0709200040792},{"x":1198,"y":-243,"length":1222.3964168795653},{"x":1151,"y":-215,"length":1170.9081945225253},{"x":1111,"y":-188,"length":1126.7941249403104},{"x":1082,"y":-163,"length":1094.2088466101889},{"x":1033,"y":-140,"length":1042.4437634712003},{"x":1001,"y":-129,"length":1009.2779597316094},{"x":964,"y":-126,"length":972.1995679900295},{"x":909,"y":-130,"length":918.2488769391445},{"x":874,"y":-139,"length":884.9841806495753},{"x":844,"y":-158,"length":858.6617494683223},{"x":807,"y":-190,"length":829.0651361624127},{"x":769,"y":-197,"length":793.8324760300501},{"x":738,"y":-192,"length":762.5667183925614},{"x":681,"y":-176,"length":703.3754331791806},{"x":608,"y":-171,"length":631.5892652665972},{"x":537,"y":-177,"length":565.4184291301443},{"x":475,"y":-191,"length":511.9628892800727},{"x":370,"y":-225,"length":433.0415684434925},{"x":294,"y":-250,"length":385.9222719667783},{"x":225,"y":-266,"length":348.39776118683653},{"x":162,"y":-258,"length":304.6440545948665},{"x":124,"y":-227,"length":258.6600085053737},{"x":77,"y":-182,"length":197.61831898890347},{"x":56,"y":-130,"length":141.54857823376398},{"x":56,"y":-80,"length":97.65244492586962},{"x":58,"y":-34,"length":67.23094525588644},{"x":90,"y":0,"length":90},{"x":1385,"y":0,"length":1385},{"x":1428,"y":51,"length":1428.9104240644338},{"x":1459,"y":62,"length":1460.3167464629034},{"x":1515,"y":65,"length":1516.3937483384716},{"x":1555,"y":60,"length":1556.1571257427702},{"x":1600,"y":45,"length":1600.632687408326},{"x":1635,"y":24,"length":1635.1761373014224},{"x":1683,"y":-1,"length":1683.0002970885062},{"x":1713,"y":-25,"length":1713.1824187750701},{"x":1753,"y":-70,"length":1754.397047421136},{"x":1775,"y":-116,"length":1778.7863840270422},{"x":1783,"y":-158,"length":1789.986871460235},{"x":1783,"y":-200,"length":1794.181986310196},{"x":1766,"y":-255,"length":1784.3152748323375},{"x":1731,"y":-308,"length":1758.187987673673},{"x":1698,"y":-343,"length":1732.2970299576225},{"x":1665,"y":-380,"length":1707.8129288654538},{"x":1636,"y":-414,"length":1687.5698504061988},{"x":1625,"y":-462,"length":1689.399005563813},{"x":1625,"y":-490,"length":1697.2698665798553},{"x":1650,"y":-550,"length":1739.2527130926087},{"x":1680,"y":-595,"length":1782.252787906362},{"x":1715,"y":-630,"length":1827.0536390593463},{"x":1755,"y":-660,"length":1875},{"x":1815,"y":-680,"length":1938.2014859141966},{"x":1885,"y":-685,"length":2005.604646983049},{"x":1955,"y":-675,"length":2068.2480508875137},{"x":2030,"y":-655,"length":2133.055320426547},{"x":2070,"y":-615,"length":2159.4270073331954},{"x":2085,"y":-570,"length":2161.509888943375},{"x":2085,"y":-525,"length":2150.0813938081506},{"x":2080,"y":-454,"length":2128.970643292199},{"x":2071,"y":-382,"length":2105.9356590361444},{"x":2066,"y":-310,"length":2089.1280477749565},{"x":2068,"y":-220,"length":2079.6692044649794},{"x":2084,"y":-97,"length":2086.2562162879226},{"x":2102,"y":-16,"length":2102.0608935042774},{"x":2134,"y":78,"length":2135.425016243839},{"x":2184,"y":125,"length":2187.57422731207},{"x":2238,"y":148,"length":2242.88831643486},{"x":2306,"y":161,"length":2311.613505757396},{"x":2546,"y":141,"length":2549.9013706416176},{"x":2857,"y":131,"length":2860.001748251214},{"x":3075,"y":133,"length":3077.8749162368504},{"x":3281,"y":147,"length":3284.2913999826505},{"x":3471,"y":167,"length":3475.0151078808276},{"x":3605,"y":183,"length":3609.641810484802},{"x":3711,"y":190,"length":3715.860734742356},{"x":3836,"y":174,"length":3839.944270428934},{"x":3934,"y":138,"length":3936.4196930713574},{"x":4030,"y":82,"length":4030.834156846446},{"x":4121,"y":-6,"length":4121.004367869561},{"x":4176,"y":-52,"length":4176.323742240297},{"x":4242,"y":-72,"length":4242.6109885305295},{"x":5202,"y":-165,"length":5204.616124172848},{"x":5315,"y":-185,"length":5318.21868674089},{"x":5430,"y":-225,"length":5434.659602955829},{"x":5512,"y":-275,"length":5518.855769088372},{"x":5602,"y":-342,"length":5612.429776843537},{"x":5685,"y":-370,"length":5697.027733827526},{"x":5701,"y":-329,"length":5710.4852683462905},{"x":5690,"y":500,"length":5711.926119970391},{"x":5700,"y":605,"length":5732.017533120428},{"x":5728,"y":678,"length":5767.986477099266},{"x":5772,"y":744,"length":5819.752572060087},{"x":5841,"y":804,"length":5896.074711195576},{"x":5900,"y":842,"length":5959.7788549576235},{"x":5974,"y":870,"length":6037.017144252615},{"x":6065,"y":875,"length":6127.793240637285},{"x":6228,"y":865,"length":6287.782518503642},{"x":6408,"y":842,"length":6463.081927377991},{"x":6568,"y":822,"length":6619.237720462984},{"x":6728,"y":805,"length":6775.987677084427},{"x":6903,"y":800,"length":6949.20204052235},{"x":7103,"y":811,"length":7149.148900393669},{"x":7263,"y":828,"length":7310.044664706229},{"x":7434,"y":865,"length":7484.155329761669},{"x":7625,"y":960,"length":7685.195182947536},{"x":7808,"y":1077,"length":7881.928253923656},{"x":8862,"y":2086,"length":9104.19903121631},{"x":8951,"y":2133,"length":9201.635180770862},{"x":9017,"y":2155,"length":9270.939218870977},{"x":9090,"y":2170,"length":9345.426689028169},{"x":9186,"y":2174,"length":9439.749572949486},{"x":9268,"y":2151,"length":9514.33786450744},{"x":9348,"y":2107,"length":9582.512875023962},{"x":9408,"y":2053,"length":9629.39629468016},{"x":9453,"y":1986,"length":9659.368768195984},{"x":9484,"y":1910,"length":9674.417605210145},{"x":9494,"y":1840,"length":9670.658509119221},{"x":9491,"y":1782,"length":9656.84239283214},{"x":9480,"y":1715,"length":9633.879021453404},{"x":9430,"y":1567,"length":9559.309023145972},{"x":9422,"y":1512,"length":9542.548296969735},{"x":9435,"y":1465,"length":9548.060012379477},{"x":9467,"y":1447,"length":9576.946172971842},{"x":9520,"y":1480,"length":9634.355193784377},{"x":9585,"y":1495,"length":9700.889134507208},{"x":9667,"y":1494,"length":9781.764922548487},{"x":9737,"y":1464,"length":9846.44428207462},{"x":9821,"y":1377,"length":9917.064585854021},{"x":9880,"y":1210,"length":9953.818362819366},{"x":9906,"y":1181,"length":9976.1514122431},{"x":9966,"y":1152,"length":10032.360639450717},{"x":10023,"y":1112,"length":10084.496665674495},{"x":10071,"y":1055,"length":10126.1081368905},{"x":10101,"y":1004,"length":10150.774206926288},{"x":10118,"y":942,"length":10161.756147438296},{"x":10127,"y":875,"length":10164.730886747568},{"x":10117,"y":800,"length":10148.580639675678},{"x":10089,"y":727,"length":10115.159415451642},{"x":10050,"y":675,"length":10072.642404056643},{"x":10010,"y":635,"length":10030.120886609493},{"x":10010,"y":600,"length":10027.965895434627},{"x":10018,"y":556,"length":10033.41716465532},{"x":10034,"y":497,"length":10046.301060589414},{"x":10040,"y":420,"length":10048.781020601455},{"x":10023,"y":356,"length":10029.320266099792},{"x":9986,"y":295,"length":9990.356400048999},{"x":9976,"y":265,"length":9979.519076588811},{"x":9990,"y":255,"length":9993.253974557036},{"x":10870,"y":255,"length":10872.99061896036},{"x":11740,"y":253,"length":11742.725790888588},{"x":13500,"y":283,"length":13502.965933453286},{"x":12775,"y":3500,"length":13245.777629116383},{"x":4965,"y":3365,"length":5997.87045541999},{"x":-795,"y":2885,"length":2992.532372423062}],"y":390},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"scaleX":1,"rotation":21,"scaleY":2.1059602649006623,"x":9080,"y":1760,"width":9.3,"height":270.3},"className":"SignPillar"},{"params":{"x":9070,"rotation":111,"y":1780,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"x":9105,"rotation":111,"y":1694,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"x":9140,"rotation":111,"y":1610,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":0,"scaleY":0.852356836774445,"x":2980,"y":470,"width":9.3,"height":109.45},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":6868,"y":1129,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":4400,"ag":true,"active":true,"y":270,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":256.1,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall52E"},{"params":{"x":4480,"ag":true,"active":true,"y":260,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":256.1,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall52E"},{"params":{"x":4330,"ag":true,"active":true,"y":270,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":256.1,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall52E"},{"params":{"x":4560,"ag":true,"active":true,"y":250,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":256.1,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall52E"}],[{"params":{"x":1630,"stones":false,"physic":false,"impulse":4000,"id":1,"radius":64,"y":290,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"},{"params":{"speed":1700,"x":2337,"rotation":-177,"y":-181,"safeId":-1,"id":-1,"rate":1,"width":410,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":9321,"rotation":-116,"y":1085,"safeId":-1,"id":-1,"rate":1,"width":710,"height":128},"className":"GeyserE"},{"params":{"x":4620,"stones":false,"physic":true,"impulse":7000,"id":42,"radius":64,"y":250,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":12},"className":"Tnt1"}],null,[{"params":{"x":350,"rotation":0,"y":300,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":2980,"rotation":0,"y":410,"id":1,"width":128,"height":627},"className":"SafePointE"},{"params":{"x":6870,"rotation":0,"y":1070,"id":2,"width":128,"height":864},"className":"SafePointE"}],[{"params":{"x":6010,"active":0,"y":50,"cycle":0,"body":true,"id":7,"position":0,"width":13,"height":829,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":816,"length":816}],"sideWait":0,"safeId":1,"startTime":"0","rotation":0,"speed":250},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":1360,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":397,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1586,"sndId":-1,"rotation":0,"y":210,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":573},"className":"ToggleE"},{"params":{"x":2460,"rotation":0,"graphic":0,"id":5,"y":160,"height":17,"width":17,"time":0,"safeId":2,"snd":false,"rate":-180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":1070,"sndId":-1,"rotation":0,"y":-150,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":5,"width":64,"height":514},"className":"ToggleE"},{"params":{"x":5938,"rotation":-9,"graphic":0,"safeId":1,"id":-1,"y":323,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6070,"rotation":-9,"graphic":0,"safeId":1,"id":-1,"y":323,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6010,"rotation":0,"graphic":0,"id":6,"y":50,"height":17,"width":17,"time":2,"safeId":1,"snd":false,"rate":45,"useWeld":false},"className":"MotorJointE"},{"params":{"x":6010,"sndId":-1,"rotation":0,"y":220,"fnl":false,"safeId":1,"id_off":-1,"off":false,"id":7,"width":876,"height":172},"className":"ToggleE"},{"params":{"x":6020,"sndId":-1,"rotation":0,"y":1000,"fnl":false,"safeId":1,"id_off":-1,"off":false,"id":6,"width":876,"height":172},"className":"ToggleE"},{"params":{"x":9520,"rotation":0,"graphic":1,"id":11,"y":1620,"height":17,"width":17,"time":0,"safeId":2,"snd":false,"rate":-50,"useWeld":false},"className":"MotorJointE"},{"params":{"x":9250,"sndId":-1,"rotation":0,"y":2060,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":11,"width":678,"height":138},"className":"ToggleE"},{"params":{"x":9590,"rotation":0,"graphic":0,"safeId":2,"id":12,"y":540,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9410,"sndId":-1,"rotation":21.000000000000057,"y":1250,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":12,"width":679,"height":64},"className":"ToggleE"},{"params":{"x":1862,"sndId":0,"rotation":0,"y":-440,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":239,"height":699},"className":"ToggleE"},{"params":{"x":6592,"sndId":0,"rotation":0,"y":1280,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":239,"height":699},"className":"ToggleE"},{"params":{"x":9362,"sndId":0,"rotation":0,"y":1030,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":239,"height":699},"className":"ToggleE"},{"params":{"x":9753,"rotation":0,"graphic":1,"id":11,"y":1274,"height":17,"width":17,"time":0,"safeId":2,"snd":false,"rate":50,"useWeld":false},"className":"MotorJointE"},{"params":{"x":9660,"rotation":0,"graphic":1,"id":11,"y":850,"height":17,"width":17,"time":0,"safeId":2,"snd":false,"rate":-50,"useWeld":false},"className":"MotorJointE"},{"params":{"x":4330,"rotation":0,"graphic":0,"safeId":-1,"id":41,"y":270,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3790,"sndId":-1,"rotation":0,"y":240,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":41,"width":64,"height":726},"className":"ToggleE"},{"params":{"x":3820,"sndId":-1,"rotation":0,"y":240,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":42,"width":64,"height":726},"className":"ToggleE"}]],"settings":{"prizes":"35,41,50","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map19.json b/motox3mspooky/assets/levels/map19.json deleted file mode 100644 index c0d31d49..00000000 --- a/motox3mspooky/assets/levels/map19.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":5210,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":830,"y":0,"length":830},{"x":1580,"y":-330,"length":1614.094173212951},{"x":1570,"y":-265,"length":1592.2075869684832},{"x":1570,"y":-205,"length":1583.3271929705495},{"x":1580,"y":-130,"length":1585.3390804493529},{"x":1600,"y":-80,"length":1601.9987515600628},{"x":1630,"y":-30,"length":1630.2760502442522},{"x":1655,"y":5,"length":1655.0075528528564},{"x":1685,"y":35,"length":1685.363462283433},{"x":1730,"y":60,"length":1731.040149736568},{"x":1765,"y":105,"length":1768.1204710086922},{"x":615,"y":670,"length":909.4641279346866},{"x":-5,"y":900,"length":900.0138887817232}],"y":510},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5919,"rotation":-24,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":195,"y":0,"length":195},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370},{"x":465,"y":0,"length":465},{"x":565,"y":0,"length":565},{"x":670,"y":0,"length":670},{"x":750,"y":0,"length":750},{"x":740,"y":70,"length":743.3034373659252},{"x":645,"y":70,"length":648.7873303325213},{"x":550,"y":70,"length":554.4366510251645},{"x":445,"y":70,"length":450.4719747109691},{"x":370,"y":70,"length":376.5634076752546},{"x":280,"y":70,"length":288.61739379323626},{"x":205,"y":70,"length":216.6217902243447},{"x":95,"y":70,"length":118.00423721205946},{"x":0,"y":70,"length":70}],"y":230},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7129,"rotation":-24,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":195,"y":0,"length":195},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370},{"x":465,"y":0,"length":465},{"x":565,"y":0,"length":565},{"x":670,"y":0,"length":670},{"x":750,"y":0,"length":750},{"x":865,"y":0,"length":865},{"x":865,"y":70,"length":867.8277478854891},{"x":740,"y":70,"length":743.3034373659252},{"x":645,"y":70,"length":648.7873303325213},{"x":550,"y":70,"length":554.4366510251645},{"x":445,"y":70,"length":450.4719747109691},{"x":370,"y":70,"length":376.5634076752546},{"x":280,"y":70,"length":288.61739379323626},{"x":205,"y":70,"length":216.6217902243447},{"x":95,"y":70,"length":118.00423721205946},{"x":0,"y":70,"length":70}],"y":180},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-90,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":285,"y":0,"length":285},{"x":280,"y":915,"length":956.8829604502318},{"x":-5,"y":915,"length":915.0136611002046}],"y":-570},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5190,"rotation":0,"y":530,"vertices":[{"x":0,"y":0,"length":0},{"x":770,"y":5,"length":770.0162335951106},{"x":775,"y":535,"length":941.727136701497},{"x":5,"y":795,"length":795.0157231149583}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":3890,"bg":true,"rotation":0,"y":1190,"vertices":[{"x":0,"y":0,"length":0},{"x":625,"y":0,"length":625},{"x":625,"y":630,"length":887.4260532573968},{"x":0,"y":630,"length":630}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":-30,"physic":true,"lineId":0,"y":300,"height":3257.65,"isRoad":true,"direction":90,"width":9055.6,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1960,"y":-5,"length":1960.0063775406447},{"x":2570,"y":815,"length":2696.1314878914936},{"x":2613,"y":864,"length":2752.138259608336},{"x":2668,"y":916,"length":2820.8651155275043},{"x":2744,"y":980,"length":2913.749474474427},{"x":2842,"y":1041,"length":3026.655745207902},{"x":2943,"y":1087,"length":3137.326568911818},{"x":3058,"y":1119,"length":3256.305421793232},{"x":3170,"y":1140,"length":3368.753478662397},{"x":3285,"y":1144,"length":3478.499820324848},{"x":3390,"y":1137,"length":3575.5935171660662},{"x":3494,"y":1117,"length":3668.2046017091247},{"x":3581,"y":1092,"length":3743.7982050318897},{"x":3676,"y":1051,"length":3823.2939986352085},{"x":3753,"y":1004,"length":3884.9742598889893},{"x":3817,"y":960,"length":3935.8720761732084},{"x":3875,"y":914,"length":3981.334072895667},{"x":3917,"y":875,"length":4013.541329050942},{"x":3935,"y":875,"length":4031.110268896151},{"x":3930,"y":1505,"length":4208.316171582169},{"x":4527,"y":1502,"length":4769.668017797465},{"x":4528,"y":797,"length":4597.60731250506},{"x":4745,"y":794,"length":4810.972978514845},{"x":4747,"y":155,"length":4749.529871471491},{"x":5249,"y":161,"length":5251.468556508741},{"x":5250,"y":971,"length":5339.039333063581},{"x":6131,"y":614,"length":6161.668361734507},{"x":9017,"y":-563,"length":9034.559092728323},{"x":9011,"y":-1714,"length":9172.563273153257}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":1600,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":310,"density":"1","height":150.75,"action":0,"isStatic":true,"wireframe":false,"width":395,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":75,"y":-11,"length":75.8023746329889},{"x":128,"y":-19,"length":129.40247292845683},{"x":194,"y":-36,"length":197.3119357768303},{"x":244,"y":-60,"length":251.26878039263056},{"x":298,"y":-94,"length":312.47399891831},{"x":342,"y":-127,"length":364.81913327017264},{"x":382,"y":-134,"length":404.82094807457776}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2497,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":662,"density":"1","height":904.25,"action":0,"isStatic":true,"wireframe":false,"width":386,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":52,"y":-13,"length":53.600373133029585},{"x":104,"y":-31,"length":108.52188719332152},{"x":150,"y":-55,"length":159.76545308670458},{"x":195,"y":-86,"length":213.12203077110541},{"x":236,"y":-123,"length":266.1296676434253},{"x":275,"y":-167,"length":321.73591655269075},{"x":310,"y":-215,"length":377.25985739275256},{"x":334,"y":-262,"length":424.4997055358225},{"x":354,"y":-319,"length":476.5259699113995},{"x":367,"y":-384,"length":531.1732297471325},{"x":371,"y":-443,"length":577.8321555607649},{"x":367,"y":-499,"length":619.4271547163556},{"x":358,"y":-553,"length":658.7662711462997},{"x":338,"y":-612,"length":699.1337497217539},{"x":316,"y":-657,"length":729.0438944261175},{"x":282,"y":-708,"length":762.0944823314233},{"x":251,"y":-746,"length":787.0940223378653},{"x":208,"y":-787,"length":814.0227269554579},{"x":158,"y":-823,"length":838.0292357668675},{"x":105,"y":-852,"length":858.4456884392862},{"x":5,"y":-888,"length":888.0140764650074}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2600,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":810,"density":"1","height":1163.5,"action":0,"isStatic":true,"wireframe":false,"width":544,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":114,"y":-49,"length":124.08464852672147},{"x":178,"y":-89,"length":199.01004999748127},{"x":232,"y":-131,"length":266.4301034042512},{"x":281,"y":-179,"length":333.16962646675944},{"x":320,"y":-225,"length":391.184099881373},{"x":356,"y":-279,"length":452.30189033432083},{"x":387,"y":-337,"length":513.1646909131609},{"x":411,"y":-398,"length":572.1232384722719},{"x":431,"y":-474,"length":640.6535725335495},{"x":437,"y":-529,"length":686.1559589481097},{"x":440,"y":-587,"length":733.600027262813},{"x":437,"y":-662,"length":793.2294749944684},{"x":429,"y":-715,"length":833.826120962878},{"x":412,"y":-778,"length":880.3567458706726},{"x":386,"y":-846,"length":929.8989192379997},{"x":346,"y":-917,"length":980.1045862559771},{"x":303,"y":-977,"length":1022.9066428565219},{"x":252,"y":-1032,"length":1062.3219850873838},{"x":206,"y":-1072,"length":1091.613484709675},{"x":153,"y":-1112,"length":1122.4762803729975},{"x":93,"y":-1145,"length":1148.770647257319},{"x":21,"y":-1173,"length":1173.1879644796907},{"x":-89,"y":-1197,"length":1200.304128127534}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2990,"rotation":0,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":480,"density":"1","height":34.7,"action":0,"isStatic":true,"wireframe":false,"width":201,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":-6,"length":6},{"x":34,"y":4,"length":34.23448553724738},{"x":83,"y":12,"length":83.86298349093002},{"x":136,"y":9,"length":136.2974687952788},{"x":188,"y":-2,"length":188.01063799689632}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2905,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":614,"density":"1","height":51.5,"action":0,"isStatic":true,"wireframe":false,"width":375,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":57,"y":17,"length":59.481089431852205},{"x":125,"y":31,"length":128.7866452703851},{"x":207,"y":34,"length":209.77368757782756},{"x":270,"y":26,"length":271.2489631316588},{"x":317,"y":15,"length":317.35469115801646},{"x":362,"y":-1,"length":362.0013812128346}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2776,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":728,"density":"1","height":100.1,"action":0,"isStatic":true,"wireframe":false,"width":632,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":52,"y":26,"length":58.137767414994535},{"x":116,"y":52,"length":127.12198865656563},{"x":180,"y":69,"length":192.77188591700815},{"x":245,"y":80,"length":257.73047937719747},{"x":311,"y":84,"length":322.1443775700579},{"x":378,"y":80,"length":386.37287689484623},{"x":440,"y":72,"length":445.85199337896876},{"x":502,"y":56,"length":505.11384855297723},{"x":565,"y":31,"length":565.8498033930912},{"x":619,"y":0,"length":619}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4560,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":390,"density":"1","height":537.2,"action":0,"isStatic":true,"wireframe":false,"width":832.3,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":170,"y":78,"length":187.040102651811},{"x":104,"y":47,"length":114.12712210513327},{"x":49,"y":19,"length":52.55473337388365},{"x":22,"y":-4,"length":22.360679774997898},{"x":16,"y":-36,"length":39.395431207184416},{"x":28,"y":-66,"length":71.69379331573968},{"x":84,"y":-113,"length":140.80127840328723},{"x":148,"y":-165,"length":221.65062598603234},{"x":217,"y":-221,"length":309.7256850827842},{"x":274,"y":-269,"length":383.97525961967915},{"x":328,"y":-315,"length":454.7625754171071},{"x":392,"y":-372,"length":540.4146556117811},{"x":435,"y":-407,"length":595.7130181555546},{"x":480,"y":-428,"length":643.1049681039635},{"x":530,"y":-441,"length":689.4787886512536},{"x":596,"y":-443,"length":742.6068946623105},{"x":648,"y":-433,"length":779.3542198512818},{"x":690,"y":-415,"length":805.1863138429514},{"x":736,"y":-385,"length":830.614832518659},{"x":775,"y":-345,"length":848.3218728760918},{"x":804,"y":-302,"length":858.848065725248},{"x":820,"y":-261,"length":860.5352985206359},{"x":831,"y":-199,"length":854.4951726019287},{"x":831,"y":-151,"length":844.6076011971477},{"x":823,"y":-109,"length":830.1867259839801},{"x":806,"y":-64,"length":808.5369502997373},{"x":776,"y":-17,"length":776.1861890036437},{"x":743,"y":16,"length":743.1722545951242},{"x":707,"y":45,"length":708.4306599802129},{"x":655,"y":70,"length":658.729838401146}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3730,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-400,"density":"1","height":1236,"action":0,"isStatic":true,"wireframe":false,"width":1073,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-68,"y":3,"length":68.06614430096654},{"x":-130,"y":12,"length":130.5526713629407},{"x":-197,"y":30,"length":199.27117202445515},{"x":-274,"y":62,"length":280.9270367906941},{"x":-344,"y":104,"length":359.3772391234592},{"x":-402,"y":148,"length":428.37833745417146},{"x":-453,"y":198,"length":494.3814316901475},{"x":-498,"y":254,"length":559.0348826325599},{"x":-535,"y":312,"length":619.3294761272065},{"x":-566,"y":374,"length":678.4040094221142},{"x":-589,"y":441,"length":735.8002446316527},{"x":-604,"y":505,"length":787.2998158262201},{"x":-610,"y":575,"length":838.2869437131894},{"x":-609,"y":638,"length":882.0005668932419},{"x":-601,"y":709,"length":929.4525270286805},{"x":-586,"y":782,"length":977.2000818665541},{"x":-558,"y":860,"length":1025.1653525163636},{"x":-530,"y":920,"length":1061.7438485811915},{"x":-488,"y":980,"length":1094.7803432652597},{"x":-444,"y":1031,"length":1122.5404224347558},{"x":-386,"y":1082,"length":1148.7906684857776},{"x":-330,"y":1124,"length":1171.4418466146751},{"x":-269,"y":1160,"length":1190.781676043094},{"x":-194,"y":1189,"length":1204.7227896906409},{"x":-124,"y":1207,"length":1213.352792884246},{"x":-46,"y":1218,"length":1218.8683275891617},{"x":31,"y":1219,"length":1219.3941118440748},{"x":112,"y":1211,"length":1216.168162714351},{"x":189,"y":1191,"length":1205.9029811722003},{"x":269,"y":1159,"length":1189.807547463034},{"x":336,"y":1121,"length":1170.2721905608114},{"x":396,"y":1074,"length":1144.6798679106748},{"x":448,"y":1016,"length":1110.3873198123256}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":4579,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":55,"y":0,"length":55},{"x":51,"y":18,"length":54.08326913195984},{"x":42,"y":35,"length":54.67174773134658},{"x":27,"y":47,"length":54.20332093147061},{"x":9,"y":54,"length":54.74486277268398},{"x":-9,"y":54,"length":54.74486277268398},{"x":-27,"y":47,"length":54.20332093147061},{"x":-42,"y":35,"length":54.67174773134658},{"x":-51,"y":18,"length":54.08326913195984},{"x":-55,"y":0,"length":55},{"x":-51,"y":-18,"length":54.08326913195984},{"x":-42,"y":-35,"length":54.67174773134658},{"x":-27,"y":-47,"length":54.20332093147061},{"x":-9,"y":-54,"length":54.74486277268398},{"x":9,"y":-54,"length":54.74486277268398},{"x":27,"y":-47,"length":54.20332093147061},{"x":42,"y":-35,"length":54.67174773134658},{"x":51,"y":-18,"length":54.08326913195984}],"y":975},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":2978,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-52,"density":"1","height":36.65,"action":0,"isStatic":true,"wireframe":false,"width":210,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":43,"y":-13,"length":44.9221548904324},{"x":83,"y":-19,"length":85.14693182963201},{"x":128,"y":-20,"length":129.55307792561317},{"x":164,"y":-16,"length":164.77863939236784},{"x":197,"y":-7,"length":197.12432625122653}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2894,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-188,"density":"1","height":57.45,"action":0,"isStatic":true,"wireframe":false,"width":383,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":39,"y":-15,"length":41.78516483155236},{"x":88,"y":-30,"length":92.97311439335567},{"x":139,"y":-39,"length":144.3675863897433},{"x":189,"y":-41,"length":193.3959668659096},{"x":241,"y":-39,"length":244.13520843991347},{"x":283,"y":-32,"length":284.80344099044873},{"x":333,"y":-21,"length":333.66150512158276},{"x":370,"y":-7,"length":370.0662102921584}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2766,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-300,"density":"1","height":106.85,"action":0,"isStatic":true,"wireframe":false,"width":641,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":-26,"length":51.97114584074513},{"x":104,"y":-53,"length":116.72617529928752},{"x":168,"y":-73,"length":183.17477992343814},{"x":232,"y":-86,"length":247.42675683927152},{"x":293,"y":-91,"length":306.8061277093403},{"x":361,"y":-91,"length":372.29289544658246},{"x":432,"y":-84,"length":440.09089970141395},{"x":495,"y":-70,"length":499.9249943741561},{"x":558,"y":-45,"length":559.8115754430235},{"x":628,"y":-11,"length":628.0963301914762}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3914,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":1184,"density":"1","height":632,"action":0,"isStatic":true,"wireframe":false,"width":64,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":619,"length":619}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4486,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":1800,"density":"1","height":714,"action":0,"isStatic":true,"wireframe":false,"width":67,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":3,"y":-701,"length":701.0064193714634}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4706,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":1093,"density":"1","height":645,"action":0,"isStatic":true,"wireframe":false,"width":67,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":3,"y":-632,"length":632.0071202130558}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":5915,"rotation":-24,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":95,"y":0,"length":95},{"x":89,"y":32,"length":94.57801012920498},{"x":72,"y":61,"length":94.36630754670864},{"x":47,"y":82,"length":94.51454914456292},{"x":16,"y":93,"length":94.36630754670864},{"x":-16,"y":93,"length":94.36630754670864},{"x":-47,"y":82,"length":94.51454914456292},{"x":-72,"y":61,"length":94.36630754670864},{"x":-89,"y":32,"length":94.57801012920498},{"x":-95,"y":0,"length":95},{"x":-89,"y":-32,"length":94.57801012920498},{"x":-72,"y":-61,"length":94.36630754670864},{"x":-47,"y":-82,"length":94.51454914456292},{"x":-16,"y":-93,"length":94.36630754670864},{"x":16,"y":-93,"length":94.36630754670864},{"x":47,"y":-82,"length":94.51454914456292},{"x":72,"y":-61,"length":94.36630754670864},{"x":89,"y":-32,"length":94.57801012920498}],"y":271},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6655,"rotation":-24,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":95,"y":0,"length":95},{"x":89,"y":32,"length":94.57801012920498},{"x":72,"y":61,"length":94.36630754670864},{"x":47,"y":82,"length":94.51454914456292},{"x":16,"y":93,"length":94.36630754670864},{"x":-16,"y":93,"length":94.36630754670864},{"x":-47,"y":82,"length":94.51454914456292},{"x":-72,"y":61,"length":94.36630754670864},{"x":-89,"y":32,"length":94.57801012920498},{"x":-95,"y":0,"length":95},{"x":-89,"y":-32,"length":94.57801012920498},{"x":-72,"y":-61,"length":94.36630754670864},{"x":-47,"y":-82,"length":94.51454914456292},{"x":-16,"y":-93,"length":94.36630754670864},{"x":16,"y":-93,"length":94.36630754670864},{"x":47,"y":-82,"length":94.51454914456292},{"x":72,"y":-61,"length":94.36630754670864},{"x":89,"y":-32,"length":94.57801012920498}],"y":-58},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":5225,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":912,"density":"1","height":1587.3,"action":0,"isStatic":true,"wireframe":false,"width":3780.1,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":1,"y":356,"length":356.00140449161154},{"x":3757,"y":-1172,"length":3935.5600617955256}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":7905,"rotation":-24,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":95,"y":0,"length":95},{"x":89,"y":32,"length":94.57801012920498},{"x":72,"y":61,"length":94.36630754670864},{"x":47,"y":82,"length":94.51454914456292},{"x":16,"y":93,"length":94.36630754670864},{"x":-16,"y":93,"length":94.36630754670864},{"x":-47,"y":82,"length":94.51454914456292},{"x":-72,"y":61,"length":94.36630754670864},{"x":-89,"y":32,"length":94.57801012920498},{"x":-95,"y":0,"length":95},{"x":-89,"y":-32,"length":94.57801012920498},{"x":-72,"y":-61,"length":94.36630754670864},{"x":-47,"y":-82,"length":94.51454914456292},{"x":-16,"y":-93,"length":94.36630754670864},{"x":16,"y":-93,"length":94.36630754670864},{"x":47,"y":-82,"length":94.51454914456292},{"x":72,"y":-61,"length":94.36630754670864},{"x":89,"y":-32,"length":94.57801012920498}],"y":-128},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7165,"rotation":-24,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":95,"y":0,"length":95},{"x":89,"y":32,"length":94.57801012920498},{"x":72,"y":61,"length":94.36630754670864},{"x":47,"y":82,"length":94.51454914456292},{"x":16,"y":93,"length":94.36630754670864},{"x":-16,"y":93,"length":94.36630754670864},{"x":-47,"y":82,"length":94.51454914456292},{"x":-72,"y":61,"length":94.36630754670864},{"x":-89,"y":32,"length":94.57801012920498},{"x":-95,"y":0,"length":95},{"x":-89,"y":-32,"length":94.57801012920498},{"x":-72,"y":-61,"length":94.36630754670864},{"x":-47,"y":-82,"length":94.51454914456292},{"x":-16,"y":-93,"length":94.36630754670864},{"x":16,"y":-93,"length":94.36630754670864},{"x":47,"y":-82,"length":94.51454914456292},{"x":72,"y":-61,"length":94.36630754670864},{"x":89,"y":-32,"length":94.57801012920498}],"y":201},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5220,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":40,"y":0,"length":40},{"x":755,"y":5,"length":755.0165561098644},{"x":1525,"y":-335,"length":1561.3615852838188},{"x":1550,"y":-339,"length":1586.6382700540157},{"x":1573,"y":-334,"length":1608.0687174371621},{"x":1593,"y":-318,"length":1624.430053895827},{"x":1601,"y":-295,"length":1627.9514734782483},{"x":1598,"y":-270,"length":1620.6492526145194},{"x":1589,"y":-250,"length":1608.546238067156},{"x":1575,"y":-240,"length":1593.180780702554},{"x":795,"y":105,"length":801.9039842774196},{"x":44,"y":101,"length":110.16805344563369},{"x":0,"y":100,"length":100},{"x":0,"y":52,"length":52}],"y":460},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-30,"physic":false,"lineId":0,"y":300,"height":2871,"isRoad":false,"direction":90,"width":9030,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1960,"y":-5,"length":1960.0063775406447},{"x":2570,"y":815,"length":2696.1314878914936},{"x":2613,"y":864,"length":2752.138259608336},{"x":2668,"y":916,"length":2820.8651155275043},{"x":2744,"y":980,"length":2913.749474474427},{"x":2842,"y":1041,"length":3026.655745207902},{"x":2943,"y":1087,"length":3137.326568911818},{"x":3058,"y":1119,"length":3256.305421793232},{"x":3170,"y":1140,"length":3368.753478662397},{"x":3285,"y":1144,"length":3478.499820324848},{"x":3390,"y":1137,"length":3575.5935171660662},{"x":3494,"y":1117,"length":3668.2046017091247},{"x":3581,"y":1092,"length":3743.7982050318897},{"x":4528,"y":797,"length":4597.60731250506},{"x":4826,"y":212,"length":4830.654200002315},{"x":5059,"y":215,"length":5063.566529631066},{"x":5455,"y":655,"length":5494.183287805386},{"x":5576,"y":682,"length":5617.55284799351},{"x":5716,"y":666,"length":5754.668713314433},{"x":6139,"y":579,"length":6166.243751263812},{"x":9017,"y":-563,"length":9034.559092728323},{"x":9011,"y":-1714,"length":9172.563273153257}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"}],[{"params":{"x":4546,"active":false,"y":1086,"safeId":-1,"id":11,"rotation":180,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2940,"ag":true,"active":true,"y":330,"sgos":true,"btg":true,"id":7,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2950,"ag":true,"active":true,"y":178,"sgos":true,"btg":true,"id":7,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2920,"ag":true,"active":true,"y":30,"sgos":true,"btg":true,"id":7,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2840,"ag":true,"active":true,"y":-110,"sgos":true,"btg":true,"id":7,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2730,"ag":true,"active":true,"y":-220,"sgos":true,"btg":true,"id":7,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2590,"ag":true,"active":true,"y":-280,"sgos":true,"btg":true,"id":7,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall137E"},{"params":{"x":2512,"active":true,"y":700,"safeId":-1,"id":-1,"rotation":82.00000000000007,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2547,"active":true,"y":759,"safeId":-1,"id":-1,"rotation":39.00000000000006,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2684,"active":true,"y":774,"safeId":-1,"id":-1,"rotation":-17.999999999999943,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":2614,"active":true,"y":783,"safeId":-1,"id":-1,"rotation":3,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4545,"active":false,"y":1071,"safeId":-1,"id":11,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4546,"active":false,"y":1079,"safeId":-1,"id":11,"rotation":-10,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4546,"active":false,"y":1063,"safeId":-1,"id":11,"rotation":-10,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4545,"active":false,"y":1055,"safeId":-1,"id":11,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4546,"active":false,"y":1046,"safeId":-1,"id":11,"rotation":-10,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4545,"active":false,"y":1038,"safeId":-1,"id":11,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4546,"active":false,"y":1029,"safeId":-1,"id":11,"rotation":-10,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5896,"active":false,"y":172,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5838,"active":false,"y":213,"safeId":-1,"id":12,"rotation":-48,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5818,"active":false,"y":276,"safeId":-1,"id":12,"rotation":-96,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5849,"active":false,"y":338,"safeId":-1,"id":12,"rotation":-134,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5909,"active":false,"y":365,"safeId":-1,"id":12,"rotation":180,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5974,"active":false,"y":351,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6681,"active":false,"y":36,"safeId":-1,"id":12,"rotation":156,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6736,"active":false,"y":-4,"safeId":-1,"id":12,"rotation":132,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6757,"active":false,"y":-68,"safeId":-1,"id":12,"rotation":84,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6727,"active":false,"y":-129,"safeId":-1,"id":12,"rotation":46,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6665,"active":false,"y":-156,"safeId":-1,"id":12,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6601,"active":false,"y":-142,"safeId":-1,"id":12,"rotation":156,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5958,"active":false,"y":144,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6039,"active":false,"y":323,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6023,"active":false,"y":115,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6103,"active":false,"y":294,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6087,"active":false,"y":86,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6166,"active":false,"y":265,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6150,"active":false,"y":58,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6230,"active":false,"y":238,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6214,"active":false,"y":30,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6294,"active":false,"y":210,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6279,"active":false,"y":2,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6359,"active":false,"y":181,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6534,"active":false,"y":-111,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6614,"active":false,"y":66,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6342,"active":false,"y":-27,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6423,"active":false,"y":152,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6407,"active":false,"y":-55,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6486,"active":false,"y":124,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6470,"active":false,"y":-83,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":6550,"active":false,"y":95,"safeId":-1,"id":12,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7864,"active":false,"y":-4,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8007,"active":false,"y":-138,"safeId":-1,"id":17,"rotation":84,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7673,"active":false,"y":82,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7159,"active":false,"y":295,"safeId":-1,"id":17,"rotation":180,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7986,"active":false,"y":-74,"safeId":-1,"id":17,"rotation":132,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7784,"active":false,"y":-181,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7736,"active":false,"y":54,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7657,"active":false,"y":-125,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7931,"active":false,"y":-34,"safeId":-1,"id":17,"rotation":156,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7592,"active":false,"y":-97,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7800,"active":false,"y":25,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7544,"active":false,"y":140,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7720,"active":false,"y":-153,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7146,"active":false,"y":102,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7088,"active":false,"y":143,"safeId":-1,"id":17,"rotation":-48,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7099,"active":false,"y":268,"safeId":-1,"id":17,"rotation":-134,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7289,"active":false,"y":253,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7224,"active":false,"y":281,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7464,"active":false,"y":-40,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7353,"active":false,"y":224,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7273,"active":false,"y":45,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7208,"active":false,"y":74,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7480,"active":false,"y":168,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7529,"active":false,"y":-68,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7416,"active":false,"y":195,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7851,"active":false,"y":-212,"safeId":-1,"id":17,"rotation":156,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7915,"active":false,"y":-226,"safeId":-1,"id":17,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7068,"active":false,"y":206,"safeId":-1,"id":17,"rotation":-96,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7337,"active":false,"y":16,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7609,"active":false,"y":111,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7400,"active":false,"y":-12,"safeId":-1,"id":17,"rotation":-24,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":7977,"active":false,"y":-199,"safeId":-1,"id":17,"rotation":46,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3740,"y":750,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":90.00000000000006,"scaleY":1,"x":6870,"y":160,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":6970,"rotation":-42,"y":160,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":-51,"scaleY":1,"x":4453,"y":1067,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":4380,"rotation":90.00000000000006,"y":1020,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"x":930,"rotation":0,"y":260,"width":92.7,"height":85.5},"className":"Dec27"},{"params":{"x":1000,"rotation":0,"y":270,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":350,"rotation":0,"y":270,"width":95,"height":72.35},"className":"Dec26"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3710,"y":750,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":2041,"ag":true,"active":true,"y":268,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":2414,"ag":true,"active":true,"y":-307,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":2165,"rotation":30.000000000000004,"y":591,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2222,"rotation":26.000000000000004,"y":621,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2280,"rotation":18.000000000000014,"y":644,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2341,"rotation":9.000000000000009,"y":659,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2404,"rotation":3.0000000000000098,"y":666,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":2465,"rotation":-4.999999999999989,"y":665,"safeId":-1,"width":66,"ttl":0.5,"height":18},"className":"GlassCrashed1"},{"params":{"x":4547,"stones":false,"physic":false,"impulse":1,"id":11,"radius":1,"y":1061,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":7330,"stones":false,"physic":false,"impulse":1,"id":13,"radius":1,"y":130,"height":53.2,"width":53.2,"safeId":-1,"rotation":-27,"count":1},"className":"Tnt1"},{"params":{"x":7690,"stones":false,"physic":false,"impulse":1,"id":13,"radius":1,"y":-30,"height":53.2,"width":53.2,"safeId":-1,"rotation":-24,"count":1},"className":"Tnt1"}],null,[{"params":{"x":620,"rotation":0,"y":220,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":3740,"rotation":0,"y":680,"id":0,"width":128,"height":591},"className":"SafePointE"}],[{"params":{"x":4580,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1022,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4580,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1086,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2940,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":310,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2490,"sndId":-1,"rotation":0,"y":120,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":743},"className":"ToggleE"},{"params":{"x":2506,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":665,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2518,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":737,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2577,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":781,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2650,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":788,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2719,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":764,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2460,"sndId":-1,"rotation":0,"y":770,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":455,"height":64},"className":"ToggleE"},{"params":{"x":4580,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1072,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4510,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1085,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4510,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1069,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4580,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1056,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4510,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1053,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4580,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1039,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4510,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":1036,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4578,"active":0,"y":977,"cycle":0,"body":false,"id":11,"position":0,"width":13,"height":525,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-512,"length":512}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":4280,"sndId":-1,"rotation":0,"y":980,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":64,"height":782},"className":"ToggleE"},{"params":{"x":5875,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":366,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5822,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":313,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5814,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":240,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5862,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":184,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5943,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":367,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6007,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":337,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5927,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":156,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6713,"rotation":156,"graphic":0,"safeId":-1,"id":14,"y":23,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6760,"rotation":156,"graphic":0,"safeId":-1,"id":14,"y":-31,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6753,"rotation":156,"graphic":0,"safeId":-1,"id":14,"y":-104,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6700,"rotation":156,"graphic":0,"safeId":-1,"id":14,"y":-157,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6631,"rotation":156,"graphic":0,"safeId":-1,"id":14,"y":-158,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5991,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":128,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6071,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":308,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6056,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":99,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6135,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":279,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6118,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":72,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6199,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":250,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6183,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":43,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6263,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":222,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6247,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":15,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6327,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":195,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6311,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":-13,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6391,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":166,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6566,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":-128,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6646,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":53,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6655,"rotation":-24,"graphic":1,"id":12,"y":-58,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-120,"useWeld":false},"className":"MotorJointE"},{"params":{"x":5915,"rotation":-24,"graphic":1,"id":12,"y":271,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-120,"useWeld":false},"className":"MotorJointE"},{"params":{"x":4730,"sndId":-1,"rotation":0,"y":-160,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":12,"width":64,"height":2161},"className":"ToggleE"},{"params":{"x":6374,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":-42,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6456,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":137,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6438,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":-70,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6519,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":109,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6502,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":-99,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6583,"rotation":-24,"graphic":0,"safeId":-1,"id":14,"y":80,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7561,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-83,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7816,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-198,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8010,"rotation":156,"graphic":0,"safeId":-1,"id":16,"y":-101,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7624,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-112,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7064,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":170,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7905,"rotation":-24,"graphic":1,"id":17,"y":-128,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":140,"useWeld":false},"className":"MotorJointE"},{"params":{"x":7706,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":67,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7963,"rotation":156,"graphic":0,"safeId":-1,"id":16,"y":-47,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7577,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":125,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7193,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":297,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7688,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-140,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7769,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":39,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7752,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-169,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7165,"rotation":-24,"graphic":1,"id":17,"y":201,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":140,"useWeld":false},"className":"MotorJointE"},{"params":{"x":7497,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-55,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7177,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":86,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7321,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":238,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7833,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":10,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7125,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":296,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7241,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":58,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7385,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":209,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7306,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":29,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7449,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":180,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7513,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":152,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7257,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":267,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7433,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-27,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7881,"rotation":156,"graphic":0,"safeId":-1,"id":16,"y":-228,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7368,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":2,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7072,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":243,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7641,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":96,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7112,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":114,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7950,"rotation":156,"graphic":0,"safeId":-1,"id":16,"y":-227,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7896,"rotation":-24,"graphic":0,"safeId":-1,"id":16,"y":-17,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8003,"rotation":156,"graphic":0,"safeId":-1,"id":16,"y":-174,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7470,"sndId":-1,"rotation":-24,"y":-80,"fnl":false,"safeId":-1,"id_off":12,"off":false,"id":13,"width":733,"height":64},"className":"ToggleE"},{"params":{"x":7290,"rotation":0,"graphic":0,"safeId":-1,"id":13,"y":150,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":7750,"rotation":0,"graphic":0,"safeId":-1,"id":13,"y":-60,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4720,"sndId":-1,"rotation":0,"y":-160,"fnl":false,"safeId":-1,"id_off":7,"off":false,"id":14,"width":64,"height":2161},"className":"ToggleE"},{"params":{"x":5940,"sndId":-1,"rotation":0,"y":-300,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":16,"width":64,"height":1151},"className":"ToggleE"},{"params":{"x":5950,"sndId":-1,"rotation":0,"y":-300,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":17,"width":64,"height":1151},"className":"ToggleE"},{"params":{"x":7420,"sndId":0,"rotation":-24,"y":-50,"fnl":false,"safeId":-1,"id_off":14,"off":false,"id":0,"width":622,"height":64},"className":"ToggleE"},{"params":{"x":2041,"rotation":0,"graphic":1,"id":31,"y":268,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":90,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2414,"rotation":0,"graphic":1,"id":31,"y":-307,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":90,"useWeld":false},"className":"MotorJointE"},{"params":{"x":1270,"sndId":-1,"rotation":0,"y":20,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":31,"width":64,"height":934},"className":"ToggleE"},{"params":{"x":1330,"sndId":-1,"rotation":0,"y":-70,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":7,"width":64,"height":1137},"className":"ToggleE"}]],"settings":{"prizes":"27,34,45","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map2.json b/motox3mspooky/assets/levels/map2.json deleted file mode 100644 index da0561ba..00000000 --- a/motox3mspooky/assets/levels/map2.json +++ /dev/null @@ -1 +0,0 @@ -{"settings":{"theme":6,"countdown":0,"prizes":"27,33,42","gravityY":500},"layers":[[{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":768,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":55,"y":0,"length":55},{"x":115,"y":0,"length":115},{"x":175,"y":0,"length":175}],"physic":false,"repeatTexture":true,"id":-1,"rotation":0,"y":-10,"height":17,"isStatic":true,"textureOffset":0,"action":0,"width":188,"wireframe":false,"snapToGrid":true,"density":"1","textureMode":true,"shapeH":17,"type":4,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":728,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":55,"y":0,"length":55},{"x":115,"y":0,"length":115},{"x":195,"y":0,"length":195},{"x":255,"y":0,"length":255}],"physic":false,"repeatTexture":true,"id":-1,"rotation":0,"y":70,"height":17,"isStatic":true,"textureOffset":0,"action":0,"width":268,"wireframe":false,"snapToGrid":true,"density":"1","textureMode":true,"shapeH":17,"type":4,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":688,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":55,"y":0,"length":55},{"x":115,"y":0,"length":115},{"x":195,"y":0,"length":195},{"x":270,"y":0,"length":270},{"x":330,"y":0,"length":330}],"physic":false,"repeatTexture":true,"id":-1,"rotation":0,"y":140,"height":17,"isStatic":true,"textureOffset":0,"action":0,"width":343,"wireframe":false,"snapToGrid":true,"density":"1","textureMode":true,"shapeH":17,"type":4,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":809,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":47,"y":1,"length":47.01063709417264},{"x":100,"y":0,"length":100}],"physic":false,"repeatTexture":true,"id":-1,"rotation":0,"y":-80,"height":18,"isStatic":true,"textureOffset":0,"action":0,"width":113,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":17,"type":4,"smoothing":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":4289,"rotation":-24,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":29,"rem":true,"density":1,"ignore":true,"layer":8,"vertices":[{"x":-29,"y":42,"length":51.03920062069938},{"x":-57,"y":27,"length":63.071388124885914},{"x":-83,"y":4,"length":83.09632964216891},{"x":-105,"y":-15,"length":106.06601717798213},{"x":-122,"y":-50,"length":131.84839779079607},{"x":-129,"y":-79,"length":151.2679741386127},{"x":-131,"y":-104,"length":167.26326554267678},{"x":-128,"y":-136,"length":186.76188047886004},{"x":-122,"y":-159,"length":200.4120754844877},{"x":-110,"y":-185,"length":215.23243250030885},{"x":-94,"y":-208,"length":228.25424421026653},{"x":-76,"y":-227,"length":239.38462774372127},{"x":-75,"y":-275,"length":285.0438562747845},{"x":-73,"y":-326,"length":334.07334524023315},{"x":-75,"y":-374,"length":381.4459332592235},{"x":-21,"y":-372,"length":372.5922704512266},{"x":35,"y":-370,"length":371.6517186829626},{"x":90,"y":-370,"length":380.7886552931954},{"x":157,"y":-373,"length":404.6949468426805},{"x":155,"y":-325,"length":360.06943774777665},{"x":155,"y":-275,"length":315.67388235329196},{"x":156,"y":-218,"length":268.06715576511795},{"x":170,"y":-202,"length":264.0151510803878},{"x":184,"y":-177,"length":255.31353273964936},{"x":193,"y":-155,"length":247.53585598858197},{"x":199,"y":-130,"length":237.69938998659632},{"x":200,"y":-104,"length":225.42404485768594},{"x":198,"y":-76,"length":212.08488866489287},{"x":192,"y":-50,"length":198.40362899906847},{"x":182,"y":-27,"length":183.99184764548673},{"x":163,"y":0,"length":163},{"x":141,"y":15,"length":141.7956275771577},{"x":117,"y":33,"length":121.56479753612885},{"x":89,"y":47,"length":100.64790112068906},{"x":65,"y":53,"length":83.86894538504703},{"x":35,"y":57,"length":66.88796603276258},{"x":0,"y":54,"length":54}],"isStatic":false,"safeId":3,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":2079,"rotation":-24,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":19,"rem":true,"density":1,"ignore":true,"layer":8,"vertices":[{"x":-29,"y":42,"length":51.03920062069938},{"x":-57,"y":27,"length":63.071388124885914},{"x":-83,"y":4,"length":83.09632964216891},{"x":-105,"y":-15,"length":106.06601717798213},{"x":-122,"y":-50,"length":131.84839779079607},{"x":-129,"y":-79,"length":151.2679741386127},{"x":-131,"y":-104,"length":167.26326554267678},{"x":-128,"y":-136,"length":186.76188047886004},{"x":-122,"y":-159,"length":200.4120754844877},{"x":-110,"y":-185,"length":215.23243250030885},{"x":-94,"y":-208,"length":228.25424421026653},{"x":-76,"y":-227,"length":239.38462774372127},{"x":-75,"y":-285,"length":294.7032405658275},{"x":-75,"y":-335,"length":343.29287787543745},{"x":-75,"y":-374,"length":381.4459332592235},{"x":-25,"y":-375,"length":375.8324094593227},{"x":25,"y":-375,"length":375.8324094593227},{"x":75,"y":-375,"length":382.4264635194589},{"x":125,"y":-375,"length":395.28470752104744},{"x":155,"y":-375,"length":405.77087130546965},{"x":155,"y":-325,"length":360.06943774777665},{"x":155,"y":-280,"length":320.0390601161052},{"x":156,"y":-218,"length":268.06715576511795},{"x":170,"y":-202,"length":264.0151510803878},{"x":184,"y":-177,"length":255.31353273964936},{"x":193,"y":-155,"length":247.53585598858197},{"x":199,"y":-130,"length":237.69938998659632},{"x":200,"y":-104,"length":225.42404485768594},{"x":198,"y":-76,"length":212.08488866489287},{"x":192,"y":-50,"length":198.40362899906847},{"x":182,"y":-27,"length":183.99184764548673},{"x":163,"y":0,"length":163},{"x":141,"y":15,"length":141.7956275771577},{"x":117,"y":33,"length":121.56479753612885},{"x":89,"y":47,"length":100.64790112068906},{"x":65,"y":53,"length":83.86894538504703},{"x":35,"y":57,"length":66.88796603276258},{"x":0,"y":54,"length":54}],"isStatic":false,"safeId":3,"isWheel":false}},{"className":"FinishZone","params":{"x":16830,"rotation":0,"y":-230,"width":1161,"height":884}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":2900,"rotation":0,"graphic":true,"id":41,"line":true,"physic":false,"plr":false,"y":-750,"rem":false,"density":1,"ignore":false,"layer":8,"vertices":[{"x":0,"y":0,"length":0},{"x":70,"y":0,"length":70},{"x":70,"y":70,"length":98.99494936611666},{"x":140,"y":70,"length":156.52475842498527},{"x":140,"y":0,"length":140},{"x":215,"y":0,"length":215},{"x":215,"y":70,"length":226.10838109190027},{"x":290,"y":70,"length":298.328677803526},{"x":290,"y":0,"length":290},{"x":365,"y":0,"length":365},{"x":365,"y":70,"length":371.6517186829626},{"x":440,"y":70,"length":445.5333881989093},{"x":440,"y":0,"length":440},{"x":510,"y":0,"length":510},{"x":535,"y":100,"length":544.2655601817921},{"x":565,"y":210,"length":602.7644647787392},{"x":595,"y":310,"length":670.9135562797937},{"x":620,"y":400,"length":737.8346698278687},{"x":650,"y":490,"length":814.0024569987488},{"x":740,"y":790,"length":1082.450922675019},{"x":415,"y":795,"length":896.799866190891},{"x":415,"y":560,"length":697.0114776673337},{"x":415,"y":475,"length":630.7535176279241},{"x":415,"y":405,"length":579.8706752371601},{"x":415,"y":355,"length":546.122696836526},{"x":410,"y":327,"length":524.4320737712368},{"x":398,"y":299,"length":497.80016070708535},{"x":381,"y":271,"length":467.54892792091823},{"x":360,"y":251,"length":438.8633044582333},{"x":335,"y":232,"length":407.49110419737997},{"x":308,"y":220,"length":378.50231174987556},{"x":275,"y":211,"length":346.6208303030849},{"x":242,"y":210,"length":320.4122344730301},{"x":209,"y":216,"length":300.56114186634306},{"x":178,"y":227,"length":288.46663585239804},{"x":148,"y":245,"length":286.23242304113626},{"x":123,"y":269,"length":295.78708558691335},{"x":103,"y":296,"length":313.40867888429636},{"x":92,"y":324,"length":336.8085509603341},{"x":85,"y":360,"length":369.8986347636336},{"x":85,"y":415,"length":423.6153915995027},{"x":85,"y":480,"length":487.46794766425415},{"x":85,"y":560,"length":566.4141594275341},{"x":85,"y":795,"length":799.5311125903731},{"x":-250,"y":795,"length":833.3816652650813},{"x":-160,"y":505,"length":529.7405025104273},{"x":-135,"y":425,"length":445.92600283006595},{"x":-110,"y":350,"length":366.87872655688284},{"x":-85,"y":265,"length":278.29840100151495},{"x":-62,"y":192,"length":201.76223630798702},{"x":-31,"y":102,"length":106.60675400742676}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":13868,"rotation":-126,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":494,"rem":true,"density":1,"ignore":false,"layer":8,"vertices":[{"x":634,"y":138,"length":648.8451279003334},{"x":643,"y":94,"length":649.8345943392056},{"x":644,"y":50,"length":645.9380775275599},{"x":637,"y":0,"length":637},{"x":623,"y":-42,"length":624.4141254007632},{"x":608,"y":-75,"length":612.6083577621187},{"x":586,"y":-110,"length":596.2348530570819},{"x":581,"y":-142,"length":598.1011620119125},{"x":592,"y":-173,"length":616.7600830144571},{"x":623,"y":-194,"length":652.5067049463936},{"x":669,"y":-189,"length":695.1848674992862},{"x":713,"y":-113,"length":721.8988848862422},{"x":742,"y":-39,"length":743.0242257154204},{"x":755,"y":38,"length":755.9556865319554},{"x":753,"y":107,"length":760.5642642144055},{"x":741,"y":169,"length":760.0276310766602},{"x":716,"y":232,"length":752.6486564128046},{"x":682,"y":288,"length":740.3161486824396},{"x":661,"y":331,"length":739.244208634738},{"x":652,"y":362,"length":745.7533104183983},{"x":647,"y":394,"length":757.5255771259476},{"x":645,"y":426,"length":772.981888532972},{"x":647,"y":457,"length":792.1224652792016},{"x":653,"y":494,"length":818.8070590804649},{"x":664,"y":529,"length":848.9623077616579},{"x":680,"y":559,"length":880.2732530299895},{"x":696,"y":586,"length":909.841744480874},{"x":718,"y":611,"length":942.7857656965341},{"x":737,"y":629,"length":968.9220814905603},{"x":763,"y":649,"length":1001.6835827745207},{"x":790,"y":665,"length":1032.6301370771628},{"x":816,"y":680,"length":1062.1939559233049},{"x":834,"y":696,"length":1086.2651609989157},{"x":841,"y":719,"length":1106.45469857559},{"x":832,"y":747,"length":1118.138184662343},{"x":818,"y":764,"length":1119.2944206061245},{"x":796,"y":778,"length":1113.0588483993108},{"x":768,"y":776,"length":1091.7875251164944},{"x":738,"y":766,"length":1063.6728820459793},{"x":697,"y":741,"length":1017.2954339816924},{"x":665,"y":717,"length":977.9130840724036},{"x":642,"y":696,"length":946.8790841496078},{"x":619,"y":671,"length":912.908538682819},{"x":598,"y":644,"length":878.8287660289689},{"x":581,"y":616,"length":846.7685634221431},{"x":566,"y":584,"length":813.2724020892385},{"x":551,"y":547,"length":776.4083976877117},{"x":541,"y":507,"length":741.4377924006841},{"x":534,"y":474,"length":714.0252096389875},{"x":532,"y":446,"length":694.2189856234127},{"x":533,"y":430,"length":684.8277155606364},{"x":532,"y":390,"length":659.6392953728575},{"x":537,"y":360,"length":646.5052203965564},{"x":546,"y":319,"length":632.3582845191482},{"x":500,"y":210,"length":542.3098745182499},{"x":594,"y":216,"length":632.0537951788598},{"x":615,"y":185,"length":642.2227028064331}],"isStatic":false,"safeId":2,"isWheel":false}},{"className":"frg.game.editor.objects::PillarPather","params":{"originOffsetRatio":0,"x":13545,"stretchTexture":false,"y":300,"straightSides":true,"wireframe":false,"repeatTexture":true,"rotation":0,"textureOffset":0,"snapToGrid":true,"width":413,"vertices":[{"x":0,"y":0,"length":0},{"x":122,"y":-352,"length":372.54261501202785},{"x":261,"y":-352,"length":438.20657229210974},{"x":400,"y":0,"length":400}],"height":365,"smoothing":true,"textureMode":true,"type":2}},{"className":"frg.game.editor.objects::PillarPather","params":{"originOffsetRatio":0,"x":13505,"stretchTexture":false,"y":300,"straightSides":true,"wireframe":false,"repeatTexture":true,"rotation":0,"textureOffset":0,"snapToGrid":true,"width":488,"vertices":[{"x":0,"y":0,"length":0},{"x":137,"y":-382,"length":405.8238534142615},{"x":326,"y":-382,"length":502.19518117958876},{"x":475,"y":-4,"length":475.0168418066879}],"height":395,"smoothing":true,"textureMode":true,"type":2}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":580,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":70,"y":0,"length":70},{"x":135,"y":0,"length":135},{"x":200,"y":0,"length":200},{"x":270,"y":0,"length":270},{"x":330,"y":0,"length":330},{"x":395,"y":0,"length":395},{"x":470,"y":0,"length":470},{"x":545,"y":0,"length":545},{"x":615,"y":0,"length":615}],"physic":false,"repeatTexture":true,"id":-1,"rotation":-63,"y":360,"height":17,"isStatic":true,"textureOffset":0,"action":0,"width":558,"wireframe":false,"snapToGrid":true,"density":"1","textureMode":true,"shapeH":17,"type":4,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":852,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":70,"y":0,"length":70},{"x":135,"y":0,"length":135},{"x":200,"y":0,"length":200},{"x":270,"y":0,"length":270},{"x":330,"y":0,"length":330},{"x":395,"y":0,"length":395},{"x":470,"y":0,"length":470},{"x":545,"y":0,"length":545}],"physic":false,"repeatTexture":true,"id":-1,"rotation":63,"y":-190,"height":17,"isStatic":true,"textureOffset":0,"action":0,"width":558,"wireframe":false,"snapToGrid":true,"density":"1","textureMode":true,"shapeH":17,"type":4,"smoothing":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":1370,"rotation":0,"graphic":true,"id":71,"line":true,"physic":false,"plr":false,"y":217,"rem":false,"density":1,"ignore":false,"layer":8,"vertices":[{"x":250,"y":-260,"length":360.69377593742865},{"x":335,"y":-260,"length":424.05777908204914},{"x":410,"y":-260,"length":485.4894437575342},{"x":410,"y":-330,"length":526.3078946776307},{"x":485,"y":-330,"length":586.6216838815285},{"x":570,"y":-330,"length":658.6349520030045},{"x":655,"y":-330,"length":733.4337052522197},{"x":750,"y":-330,"length":819.3900170248597},{"x":845,"y":-330,"length":907.1521371853786},{"x":925,"y":-330,"length":982.1023368264633},{"x":995,"y":-330,"length":1048.2962367575303},{"x":995,"y":-260,"length":1028.4089653440406},{"x":1070,"y":-260,"length":1101.135777277262},{"x":1150,"y":-260,"length":1179.0250209389112},{"x":1230,"y":-260,"length":1257.179382586272},{"x":1230,"y":-325,"length":1272.2126394593004},{"x":1230,"y":-397,"length":1292.48172134077},{"x":1230,"y":-455,"length":1311.4591110667538},{"x":1330,"y":-455,"length":1405.675993961624},{"x":1330,"y":-365,"length":1379.1754783202898},{"x":1430,"y":-365,"length":1475.847214314544},{"x":1430,"y":-455,"length":1500.6415294799754},{"x":1530,"y":-455,"length":1596.222102340398},{"x":1530,"y":-365,"length":1572.9351544167357},{"x":1630,"y":-365,"length":1670.3667262011656},{"x":1630,"y":-455,"length":1692.3135052347718},{"x":1730,"y":-455,"length":1788.8334187397104},{"x":1730,"y":-365,"length":1768.0851223852317},{"x":1830,"y":-365,"length":1866.0452834805483},{"x":1830,"y":-455,"length":1885.7160443714743},{"x":1930,"y":-455,"length":1982.9082177448356},{"x":1930,"y":-365,"length":1964.2110375415366},{"x":2030,"y":-365,"length":2062.553029621299},{"x":2030,"y":-455,"length":2080.3665542399012},{"x":2130,"y":-455,"length":2178.055325284461},{"x":2130,"y":-365,"length":2161.0471998547373},{"x":2230,"y":-365,"length":2259.6736490033245},{"x":2230,"y":-455,"length":2275.944858734499},{"x":2330,"y":-455,"length":2374.010320112362},{"x":2330,"y":-390,"length":2362.4140195994437},{"x":2330,"y":-315,"length":2351.196503910296},{"x":2330,"y":-260,"length":2344.461558652647},{"x":2400,"y":-260,"length":2414.0422531513404},{"x":2475,"y":-260,"length":2488.6190950002774},{"x":2545,"y":-260,"length":2558.246469752279},{"x":2615,"y":-260,"length":2627.893643205524},{"x":2615,"y":-330,"length":2635.7399340602633},{"x":2700,"y":-330,"length":2720.091910211859},{"x":2780,"y":-330,"length":2799.5178156246834},{"x":2870,"y":-330,"length":2888.909828983937},{"x":2960,"y":-330,"length":2978.3384629689085},{"x":3035,"y":-330,"length":3052.8879769817954},{"x":3110,"y":-330,"length":3127.459032505462},{"x":3210,"y":-330,"length":3226.9180342859654},{"x":3210,"y":-260,"length":3220.51238159396},{"x":3310,"y":-260,"length":3320.1957773601243},{"x":3395,"y":-255,"length":3404.5631144098356},{"x":3580,"y":105,"length":3581.5394734666825},{"x":0,"y":95,"length":95}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":7904,"rotation":0,"graphic":true,"id":7,"line":true,"physic":true,"plr":true,"y":-362,"rem":false,"density":1,"ignore":false,"layer":3,"vertices":[{"x":-20,"y":15,"length":25},{"x":105,"y":140,"length":175},{"x":200,"y":105,"length":225.88713996153035},{"x":200,"y":-80,"length":215.40659228538016},{"x":330,"y":-80,"length":339.5585369269929},{"x":330,"y":100,"length":344.81879299133334},{"x":425,"y":140,"length":447.4650824366076},{"x":550,"y":10,"length":550.0909015790027},{"x":645,"y":105,"length":653.490627323759},{"x":515,"y":235,"length":566.0830327787612},{"x":550,"y":325,"length":638.8466169590318},{"x":735,"y":325,"length":803.6479328661277},{"x":735,"y":455,"length":864.4362324659928},{"x":555,"y":455,"length":717.669840525572},{"x":515,"y":550,"length":753.4752816118124},{"x":645,"y":680,"length":937.2432981888961},{"x":555,"y":770,"length":949.1706906557956},{"x":425,"y":640,"length":768.261023350788},{"x":330,"y":680,"length":755.8438992278762},{"x":330,"y":865,"length":925.8104557629493},{"x":205,"y":865,"length":888.9600665946699},{"x":205,"y":680,"length":710.2288363619151},{"x":110,"y":640,"length":649.3843238021688},{"x":-20,"y":770,"length":770.2596964660685},{"x":-115,"y":680,"length":689.6557112066861},{"x":15,"y":550,"length":550.2045074333724},{"x":-25,"y":455,"length":455.6862956025779},{"x":-205,"y":455,"length":499.0490957811666},{"x":-205,"y":330,"length":388.4906691286163},{"x":-25,"y":330,"length":330.94561486745823},{"x":15,"y":235,"length":235.47823678633233},{"x":-115,"y":105,"length":155.72411502397438}],"isStatic":false,"safeId":1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":6600,"rotation":0,"graphic":true,"id":51,"line":true,"physic":true,"plr":false,"y":310,"rem":false,"density":1,"ignore":false,"layer":8,"vertices":[{"x":60,"y":-5,"length":60.207972893961475},{"x":103,"y":-16,"length":104.23531071570709},{"x":141,"y":-31,"length":144.3675863897433},{"x":181,"y":-47,"length":187.00267377767625},{"x":216,"y":-66,"length":225.85836269662454},{"x":247,"y":-86,"length":261.5434954266689},{"x":277,"y":-110,"length":298.04194335697116},{"x":304,"y":-137,"length":333.44414824674914},{"x":328,"y":-164,"length":366.7151483099655},{"x":354,"y":-199,"length":406.09974144291203},{"x":376,"y":-234,"length":442.86792613599823},{"x":392,"y":-267,"length":474.2921040877657},{"x":406,"y":-309,"length":510.2127007435232},{"x":415,"y":-344,"length":539.0371044742653},{"x":419,"y":-369,"length":558.3206963744045},{"x":435,"y":-390,"length":584.2302628245134},{"x":460,"y":-395,"length":606.320872146094},{"x":500,"y":-395,"length":637.200910231616},{"x":555,"y":-395,"length":681.2121549121096},{"x":630,"y":-395,"length":743.5892683464441},{"x":700,"y":-395,"length":803.7568040147468},{"x":765,"y":-395,"length":860.9587678861283},{"x":830,"y":-395,"length":919.198020015274},{"x":895,"y":-395,"length":978.2893232576956},{"x":947,"y":-395,"length":1026.0769951616692},{"x":1003,"y":-407,"length":1082.4315220834987},{"x":1053,"y":-431,"length":1137.7917208347053},{"x":1094,"y":-473,"length":1191.8745739380465},{"x":1113,"y":-508,"length":1223.4512658867945},{"x":1123,"y":-532,"length":1242.6395293889536},{"x":1150,"y":-530,"length":1266.2543188475213},{"x":1150,"y":-475,"length":1244.2367138129305},{"x":1150,"y":-410,"length":1220.9013064126027},{"x":1205,"y":-410,"length":1272.84130982617},{"x":1255,"y":-410,"length":1320.2745926510893},{"x":1325,"y":-410,"length":1386.9841383375658},{"x":1390,"y":-410,"length":1449.206679531943},{"x":1450,"y":-410,"length":1506.8510211696444},{"x":1499,"y":-410,"length":1554.059522669579},{"x":1500,"y":-475,"length":1573.4118977559563},{"x":1500,"y":-535,"length":1592.5529818502114},{"x":1500,"y":-600,"length":1615.5494421403512},{"x":1500,"y":-675,"length":1644.878414959598},{"x":1500,"y":-735,"length":1670.3966594794183},{"x":1446,"y":-761,"length":1634.0247856137312},{"x":1390,"y":-790,"length":1598.8120589988055},{"x":1390,"y":-850,"length":1629.2943257741986},{"x":1390,"y":-895,"length":1653.216561736544},{"x":1455,"y":-895,"length":1708.230078180337},{"x":1530,"y":-895,"length":1772.5476016175137},{"x":1600,"y":-895,"length":1833.309848334427},{"x":1660,"y":-895,"length":1885.9016411255386},{"x":1710,"y":-895,"length":1930.058289275223},{"x":1755,"y":-895,"length":1970.0380706981273},{"x":1755,"y":-843,"length":1946.9653309702255},{"x":1755,"y":-785,"length":1922.563392973038},{"x":1695,"y":-760,"length":1857.5857988259922},{"x":1635,"y":-740,"length":1794.6657070329281},{"x":1635,"y":-680,"length":1770.7696066964781},{"x":1635,"y":-615,"length":1746.8400041217283},{"x":1635,"y":-555,"length":1726.6296649832007},{"x":1635,"y":-490,"length":1706.8465074516805},{"x":1635,"y":-410,"length":1685.6230302176107},{"x":1700,"y":-410,"length":1748.7424052730007},{"x":1775,"y":-410,"length":1821.736808652666},{"x":1835,"y":-410,"length":1880.2459945443309},{"x":1910,"y":-410,"length":1953.5096621209734},{"x":1975,"y":-410,"length":2017.1080784132514},{"x":2026,"y":-410,"length":2067.0694231205684},{"x":2080,"y":-355,"length":2110.0770128125655},{"x":2136,"y":-301,"length":2157.10384543721},{"x":2196,"y":-301,"length":2216.5326525905275},{"x":2195,"y":-355,"length":2223.5219810022118},{"x":2195,"y":-405,"length":2232.0506266659813},{"x":2195,"y":-455,"length":2241.662329611666},{"x":2195,"y":-510,"length":2253.4695471649934},{"x":2230,"y":-510,"length":2287.575135378071},{"x":2230,"y":-455,"length":2275.944858734499},{"x":2230,"y":-405,"length":2266.478546115096},{"x":2230,"y":-360,"length":2258.8713996153033},{"x":2230,"y":-300,"length":2250.0888871331285},{"x":2270,"y":-300,"length":2289.7379762758883},{"x":2310,"y":-300,"length":2329.3990641364994},{"x":2310,"y":-245,"length":2322.9560908463163},{"x":2310,"y":-185,"length":2317.396168116276},{"x":2310,"y":-125,"length":2313.3795624583527},{"x":2365,"y":-125,"length":2368.3010788326724},{"x":2450,"y":-125,"length":2453.186703045653},{"x":2530,"y":-125,"length":2533.0860624937322},{"x":2610,"y":-125,"length":2612.9915805451806},{"x":2675,"y":-125,"length":2677.9189681541898},{"x":2745,"y":-125,"length":2747.8446098715262},{"x":2820,"y":-125,"length":2822.769030579725},{"x":2893,"y":-125,"length":2895.699224712401},{"x":2985,"y":-125,"length":2987.6161065304223},{"x":3066,"y":-138,"length":3069.1041038061903},{"x":3136,"y":-157,"length":3139.9275469348013},{"x":3187,"y":-185,"length":3192.364954074017},{"x":3240,"y":-219,"length":3247.3929543558475},{"x":3282,"y":-239,"length":3290.690656989806},{"x":3332,"y":-238,"length":3340.4891857331313},{"x":3280,"y":-180,"length":3284.9353113874254},{"x":3235,"y":-125,"length":3237.4140915242833},{"x":3200,"y":-80,"length":3200.9998437988093},{"x":3160,"y":-35,"length":3160.193823169712},{"x":3110,"y":20,"length":3110.0643080167974},{"x":3070,"y":70,"length":3070.7979419037},{"x":3025,"y":120,"length":3027.379229630804},{"x":2990,"y":160,"length":2994.2778762165676},{"x":2950,"y":205,"length":2957.114302829703},{"x":2875,"y":205,"length":2882.299429275175},{"x":2775,"y":205,"length":2782.5617693054005},{"x":2685,"y":205,"length":2692.814512735699},{"x":2590,"y":205,"length":2598.100267503162},{"x":2495,"y":205,"length":2503.4076775467474},{"x":2400,"y":205,"length":2408.7392968106783},{"x":2310,"y":205,"length":2319.078480776362},{"x":2200,"y":205,"length":2209.5304931138653},{"x":2100,"y":205,"length":2109.982227413302},{"x":2010,"y":205,"length":2020.4269350808013},{"x":2010,"y":140,"length":2014.8697228356973},{"x":2010,"y":80,"length":2011.5914098046849},{"x":2010,"y":10,"length":2010.024875467963},{"x":2010,"y":-60,"length":2010.895322984267},{"x":2010,"y":-130,"length":2014.1995928904364},{"x":2010,"y":-200,"length":2019.9257412093148},{"x":2010,"y":-275,"length":2028.7249690384353},{"x":2010,"y":-325,"length":2036.1053509089356},{"x":1960,"y":-325,"length":1986.7624417629804},{"x":1900,"y":-325,"length":1927.5956526201235},{"x":1840,"y":-325,"length":1868.482004194849},{"x":1780,"y":-325,"length":1809.426704788011},{"x":1727,"y":-325,"length":1757.3144283252216},{"x":1730,"y":-298,"length":1755.4782824062506},{"x":1730,"y":-274,"length":1751.563872657803},{"x":1728,"y":-250,"length":1745.9908361729738},{"x":1722,"y":-226,"length":1736.767111618596},{"x":1710,"y":-202,"length":1721.8896596472146},{"x":1693,"y":-178,"length":1702.3316363153215},{"x":1676,"y":-159,"length":1683.5251705870037},{"x":1656,"y":-142,"length":1662.0770138594662},{"x":1630,"y":-130,"length":1635.1758315239374},{"x":1604,"y":-122,"length":1608.6329600005092},{"x":1575,"y":-118,"length":1579.414131885618},{"x":1542,"y":-121,"length":1546.7401203822185},{"x":1516,"y":-129,"length":1521.4785571936268},{"x":1489,"y":-138,"length":1495.3812222975116},{"x":1465,"y":-158,"length":1473.495503895414},{"x":1446,"y":-176,"length":1456.671548428128},{"x":1424,"y":-205,"length":1438.6802980509603},{"x":1412,"y":-241,"length":1432.41928219359},{"x":1408,"y":-264,"length":1432.5362124567741},{"x":1405,"y":-294,"length":1435.4305974166775},{"x":1411,"y":-323,"length":1447.4978411037441},{"x":1340,"y":-325,"length":1378.8491578124128},{"x":1270,"y":-325,"length":1310.9252457710927},{"x":1210,"y":-325,"length":1252.8866668617716},{"x":1140,"y":-324,"length":1185.1480920121332},{"x":1140,"y":-240,"length":1164.989270336856},{"x":1140,"y":-170,"length":1152.6057435220423},{"x":1140,"y":-80,"length":1142.8035701729323},{"x":1140,"y":5,"length":1140.010964859549},{"x":1140,"y":95,"length":1143.951484985268},{"x":1140,"y":185,"length":1154.9134166681067},{"x":1085,"y":185,"length":1100.658893572391},{"x":985,"y":185,"length":1002.2225301798},{"x":920,"y":185,"length":938.416218956173},{"x":830,"y":185,"length":850.3675675847475},{"x":740,"y":185,"length":762.7745407392672},{"x":655,"y":185,"length":680.6247130394253},{"x":565,"y":185,"length":594.5166103650931},{"x":455,"y":185,"length":491.1720676097125},{"x":350,"y":185,"length":395.8850843363513},{"x":250,"y":185,"length":311.0064308016797},{"x":140,"y":185,"length":232.0021551624036},{"x":40,"y":185,"length":189.274932307477},{"x":-60,"y":185,"length":194.48650338776724},{"x":-160,"y":185,"length":244.59149617270018},{"x":-265,"y":185,"length":323.18725222384626},{"x":-295,"y":160,"length":335.5964838909967},{"x":-330,"y":125,"length":352.8809997718778},{"x":-380,"y":77,"length":387.72283915188694},{"x":-420,"y":35,"length":421.4558102577303},{"x":-460,"y":-5,"length":460.02717311045876},{"x":-400,"y":-5,"length":400.03124877939223},{"x":-330,"y":-5,"length":330.037876614185},{"x":-260,"y":-5,"length":260.0480724789169},{"x":-190,"y":-5,"length":190.06577808748213},{"x":-130,"y":-5,"length":130.09611831257686},{"x":-65,"y":-5,"length":65.19202405202648},{"x":5,"y":-5,"length":7.0710678118654755}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":5080,"rotation":0,"y":390,"bg":true,"sf":true,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":5530,"y":0,"length":5530},{"x":5525,"y":510,"length":5548.48853292498},{"x":-5,"y":510,"length":510.02450921499843}]}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":12670,"rotation":0,"y":120,"bg":true,"sf":true,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":1860,"y":-5,"length":1860.0067204179666},{"x":1860,"y":245,"length":1876.0663634317418},{"x":0,"y":250,"length":250}]}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":-30,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":330,"rem":true,"density":1,"ignore":false,"layer":2,"vertices":[{"x":9990,"y":560,"length":10005.683384956772},{"x":10695,"y":-50,"length":10695.116876406728},{"x":12155,"y":-50,"length":12155.1028379031},{"x":12221,"y":-55,"length":12221.123761749572},{"x":12282,"y":-63,"length":12282.161576856088},{"x":12342,"y":-79,"length":12342.252833255361},{"x":12405,"y":-102,"length":12405.419339949778},{"x":12459,"y":-129,"length":12459.667812586336},{"x":12503,"y":-156,"length":12503.973168557264},{"x":12541,"y":-185,"length":12542.364450134592},{"x":12583,"y":-223,"length":12584.97588396577},{"x":12684,"y":-223,"length":12685.960152861902},{"x":12926,"y":-17,"length":12926.011179014198},{"x":14270,"y":-23,"length":14270.01853537689},{"x":14556,"y":-273,"length":14558.559853227242},{"x":15294,"y":-272,"length":15296.41853506892},{"x":15293,"y":-228,"length":15294.699506691853},{"x":15445,"y":-125,"length":15445.505818845817},{"x":15515,"y":100,"length":15515.322265425233},{"x":15560,"y":84,"length":15560.226733566578},{"x":15594,"y":73,"length":15594.170866064023},{"x":15636,"y":64,"length":15636.130979241636},{"x":15670,"y":59,"length":15670.11107171867},{"x":15713,"y":57,"length":15713.103385391441},{"x":15761,"y":59,"length":15761.11043042336},{"x":15812,"y":70,"length":15812.154944851762},{"x":15875,"y":86,"length":15875.232943172834},{"x":15916,"y":105,"length":15916.346345816932},{"x":16000,"y":-145,"length":16000.657017760239},{"x":16170,"y":-235,"length":16171.70754744223},{"x":16169,"y":-265,"length":16171.171447981127},{"x":17626,"y":-262,"length":17627.947129487315},{"x":18534,"y":717,"length":18547.863623609053},{"x":16505,"y":500,"length":16512.5717258094}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":310,"rotation":0,"graphic":true,"id":1,"line":true,"physic":true,"plr":false,"y":110,"rem":true,"density":1,"ignore":false,"layer":4,"vertices":[{"x":72,"y":2,"length":72.02777242147643},{"x":68,"y":-22,"length":71.47027354082255},{"x":74,"y":-43,"length":85.58621384311844},{"x":99,"y":-70,"length":121.24768039018313},{"x":130,"y":-48,"length":138.57849761056005},{"x":119,"y":-42,"length":126.19429464123962},{"x":107,"y":-41,"length":114.58621208504974},{"x":97,"y":-35,"length":103.12128781197411},{"x":91,"y":-27,"length":94.92101980067429},{"x":92,"y":-16,"length":93.38094023943002},{"x":94,"y":-8,"length":94.33981132056604},{"x":102,"y":-1,"length":102.00490184299969},{"x":114,"y":1,"length":114.00438588054409},{"x":130,"y":-1,"length":130.00384609695206},{"x":141,"y":-3,"length":141.0319112825179},{"x":157,"y":-6,"length":157.1146078504478},{"x":176,"y":-4,"length":176.0454486773231},{"x":195,"y":0,"length":195},{"x":210,"y":-2,"length":210.00952359357422},{"x":217,"y":-11,"length":217.27862297059966},{"x":221,"y":-22,"length":222.0923231451281},{"x":218,"y":-33,"length":220.4835594777987},{"x":212,"y":-42,"length":216.1203368496357},{"x":201,"y":-46,"length":206.196508214858},{"x":193,"y":-47,"length":198.64037857394453},{"x":174,"y":-50,"length":181.0414317221337},{"x":206,"y":-76,"length":219.57231155134292},{"x":233,"y":-52,"length":238.73206738936435},{"x":241,"y":-35,"length":243.52823244954578},{"x":239,"y":-16,"length":239.5349661322956},{"x":235,"y":1,"length":235.00212764994276},{"x":228,"y":13,"length":228.3703133071372},{"x":212,"y":23,"length":213.243991709028},{"x":192,"y":27,"length":193.8891435846783},{"x":110,"y":26,"length":113.03096920755833},{"x":85,"y":20,"length":87.32124598286491}],"isStatic":false,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":405,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":4,"y":0,"length":4},{"x":43,"y":-249,"length":252.68557536986555},{"x":63,"y":-262,"length":269.4679943889441},{"x":83,"y":-251,"length":264.3671689147501},{"x":114,"y":-2,"length":114.0175425099138}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":61,"height":277.8,"isStatic":false,"textureOffset":0,"action":0,"width":125.85,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":16,"type":7,"smoothing":true}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-90,"lineId":-1,"wireframe":false,"physic":false,"y":300,"height":533,"isRoad":false,"width":17898,"textureMode":true,"cameraOffsetY":120,"direction":90,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"line":false,"repeatTexture":true,"rotation":0,"textureOffset":0,"snapToGrid":true,"shape":false,"smoothing":true,"vertices":[{"x":0,"y":0,"length":0},{"x":6835,"y":30,"length":6835.0658372835005},{"x":7665,"y":275,"length":7669.931551193922},{"x":9182,"y":260,"length":9185.680377631263},{"x":9600,"y":90,"length":9600.421865730694},{"x":10600,"y":95,"length":10600.425698999074},{"x":12645,"y":-25,"length":12645.024713301274},{"x":13610,"y":-165,"length":13611.000146939974},{"x":14605,"y":-245,"length":14607.054802389152},{"x":15170,"y":-165,"length":15170.897303719381},{"x":15675,"y":15,"length":15675.00717703185},{"x":16025,"y":55,"length":16025.094383497402},{"x":16480,"y":-30,"length":16480.02730580262},{"x":17885,"y":-15,"length":17885.0062901862}]}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":1370,"rotation":0,"graphic":true,"id":2,"line":true,"physic":false,"plr":false,"y":-593,"rem":false,"density":1,"ignore":false,"layer":8,"vertices":[{"x":0,"y":0,"length":0},{"x":75,"y":0,"length":75},{"x":75,"y":70,"length":102.59142264341595},{"x":140,"y":70,"length":156.52475842498527},{"x":140,"y":0,"length":140},{"x":205,"y":0,"length":205},{"x":205,"y":70,"length":216.6217902243447},{"x":270,"y":70,"length":278.9265136196271},{"x":270,"y":0,"length":270},{"x":335,"y":0,"length":335},{"x":335,"y":60,"length":340.3307215048327},{"x":335,"y":115,"length":354.18921496849674},{"x":335,"y":160,"length":371.24789561693143},{"x":305,"y":205,"length":367.4914965002592},{"x":285,"y":245,"length":375.8324094593227},{"x":291,"y":316,"length":429.5776996074168},{"x":295,"y":390,"length":489.004089962446},{"x":335,"y":915,"length":974.3972495856092},{"x":0,"y":915,"length":915},{"x":45,"y":410,"length":412.4621194728069},{"x":50,"y":325,"length":328.8236609491476},{"x":55,"y":245,"length":251.09759058979438},{"x":30,"y":205,"length":207.18349355100662},{"x":0,"y":162,"length":162},{"x":0,"y":100,"length":100},{"x":0,"y":50,"length":50}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":4650,"rotation":0,"graphic":true,"id":52,"line":true,"physic":false,"plr":false,"y":-593,"rem":false,"density":1,"ignore":false,"layer":8,"vertices":[{"x":0,"y":0,"length":0},{"x":75,"y":0,"length":75},{"x":75,"y":70,"length":102.59142264341595},{"x":140,"y":70,"length":156.52475842498527},{"x":140,"y":0,"length":140},{"x":205,"y":0,"length":205},{"x":205,"y":70,"length":216.6217902243447},{"x":270,"y":70,"length":278.9265136196271},{"x":270,"y":0,"length":270},{"x":335,"y":0,"length":335},{"x":335,"y":50,"length":338.71079108879894},{"x":335,"y":110,"length":352.59750424527965},{"x":335,"y":160,"length":371.24789561693143},{"x":285,"y":245,"length":375.8324094593227},{"x":290,"y":335,"length":443.08577047790646},{"x":295,"y":416,"length":509.9813722088288},{"x":300,"y":500,"length":583.09518948453},{"x":305,"y":585,"length":659.7347952018296},{"x":310,"y":665,"length":733.7063445275637},{"x":320,"y":755,"length":820.0152437607486},{"x":335,"y":915,"length":974.3972495856092},{"x":0,"y":915,"length":915},{"x":10,"y":800,"length":800.0624975587845},{"x":15,"y":710,"length":710.1584330274477},{"x":20,"y":615,"length":615.3251173160413},{"x":30,"y":510,"length":510.88159097779203},{"x":40,"y":430,"length":431.8564576337837},{"x":50,"y":335,"length":338.71079108879894},{"x":55,"y":245,"length":251.09759058979438},{"x":0,"y":162,"length":162},{"x":0,"y":110,"length":110},{"x":0,"y":50,"length":50}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":3100,"rotation":0,"graphic":true,"id":41,"line":true,"physic":true,"plr":false,"y":-1160,"rem":false,"density":1,"ignore":false,"layer":8,"vertices":[{"x":50,"y":-45,"length":67.26812023536856},{"x":100,"y":20,"length":101.9803902718557},{"x":145,"y":75,"length":163.24827717314508},{"x":190,"y":130,"length":230.21728866442677},{"x":235,"y":185,"length":299.0819285747636},{"x":280,"y":245,"length":372.05510344571275},{"x":320,"y":300,"length":438.63424398922615},{"x":361,"y":349,"length":502.11751612545845},{"x":400,"y":400,"length":565.685424949238},{"x":335,"y":400,"length":521.7518567288477},{"x":260,"y":400,"length":477.07441767506253},{"x":180,"y":400,"length":438.63424398922615},{"x":105,"y":400,"length":413.5516896350443},{"x":30,"y":400,"length":401.1234224026316},{"x":-60,"y":400,"length":404.4749683231337},{"x":-140,"y":400,"length":423.7924020083418},{"x":-225,"y":400,"length":458.93899376714546},{"x":-300,"y":400,"length":500},{"x":-250,"y":335,"length":418.0011961705373},{"x":-195,"y":260,"length":325},{"x":-145,"y":200,"length":247.0323865407125},{"x":-100,"y":145,"length":176.13914953808538},{"x":-55,"y":85,"length":101.24228365658294},{"x":-4,"y":22,"length":22.360679774997898}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":8395,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":-218,"rem":true,"density":1,"ignore":false,"layer":8,"vertices":[{"x":295,"y":0,"length":295},{"x":345,"y":0,"length":345},{"x":400,"y":0,"length":400},{"x":455,"y":0,"length":455},{"x":517,"y":0,"length":517},{"x":580,"y":0,"length":580},{"x":650,"y":0,"length":650},{"x":725,"y":0,"length":725},{"x":725,"y":55,"length":727.0832139445938},{"x":680,"y":55,"length":682.22063879657},{"x":625,"y":55,"length":627.4153329334564},{"x":570,"y":55,"length":572.647360947381},{"x":495,"y":55,"length":498.0461825975579},{"x":430,"y":55,"length":433.50317184537414},{"x":360,"y":55,"length":364.17715469260287},{"x":295,"y":55,"length":300.0833217624732}],"isStatic":false,"safeId":1,"isWheel":false}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":9033,"safeId":1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":9,"y":46,"length":46.87216658103186},{"x":43,"y":-166,"length":171.4788616710526},{"x":63,"y":-179,"length":189.76301009416983},{"x":83,"y":-168,"length":187.3846311734236},{"x":110,"y":49,"length":120.42009799032718}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":-12,"height":243.8,"isStatic":false,"textureOffset":0,"action":0,"width":116.85,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":16,"type":7,"smoothing":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":13362,"rotation":0,"graphic":false,"id":-1,"line":true,"physic":true,"plr":false,"y":114,"rem":true,"density":1,"ignore":false,"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":50,"y":0,"length":50},{"x":50,"y":25,"length":55.90169943749474},{"x":0,"y":25,"length":25}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":14192,"rotation":0,"graphic":false,"id":-1,"line":true,"physic":true,"plr":false,"y":84,"rem":true,"density":1,"ignore":false,"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":50,"y":0,"length":50},{"x":50,"y":25,"length":55.90169943749474},{"x":0,"y":25,"length":25}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":13962,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":-727,"rem":true,"density":1,"ignore":false,"layer":2,"vertices":[{"x":-5,"y":-48,"length":48.25971404805462},{"x":-15,"y":-88,"length":89.26925562588724},{"x":-33,"y":-129,"length":133.15404612703287},{"x":-53,"y":-160,"length":168.5496959356498},{"x":-83,"y":-194,"length":211.00947846009194},{"x":-106,"y":-213,"length":237.91805311913595},{"x":-134,"y":-232,"length":267.9178978717174},{"x":-163,"y":-247,"length":295.93580384941595},{"x":-192,"y":-258,"length":321.6022387981775},{"x":-233,"y":-266,"length":353.61702447704636},{"x":-265,"y":-268,"length":376.89388426983},{"x":-294,"y":-269,"length":398.4934127435484},{"x":-328,"y":-264,"length":421.0463157421045},{"x":-358,"y":-254,"length":438.953300477397},{"x":-385,"y":-245,"length":456.3441683641854},{"x":-420,"y":-223,"length":475.53023037447366},{"x":-444,"y":-205,"length":489.0408980852215},{"x":-472,"y":-177,"length":504.0962209737343},{"x":-495,"y":-146,"length":516.0823577686027},{"x":-508,"y":-125,"length":523.1529413087534},{"x":-519,"y":-100,"length":528.546119085175},{"x":-530,"y":-75,"length":535.2803004034429},{"x":-535,"y":-48,"length":537.1489551325591},{"x":-537,"y":-21,"length":537.4104576578316},{"x":-538,"y":12,"length":538.1338123552542},{"x":-535,"y":43,"length":536.7252556010384},{"x":-528,"y":76,"length":533.4416556662968},{"x":-518,"y":105,"length":528.5347670683548},{"x":-501,"y":136,"length":519.1310046606733},{"x":-480,"y":167,"length":508.2214084432099},{"x":-449,"y":190,"length":487.5458952755115},{"x":-452,"y":228,"length":506.24895061619634},{"x":-1200,"y":223,"length":1220.5445506002638},{"x":-1805,"y":785,"length":1968.3114590938092},{"x":-2868,"y":784,"length":2973.2272028891434},{"x":-2880,"y":-65,"length":2880.7334135598176},{"x":-2265,"y":-535,"length":2327.32679269586},{"x":3820,"y":-575,"length":3863.0331347271667},{"x":3600,"y":95,"length":3601.253254076975},{"x":61,"y":97,"length":114.58621208504974},{"x":40,"y":96,"length":104},{"x":22,"y":90,"length":92.64987857520376}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":320,"rotation":0,"graphic":true,"id":2,"line":true,"physic":false,"plr":false,"y":260,"rem":false,"density":1,"ignore":false,"layer":8,"vertices":[{"x":90,"y":-40,"length":98.48857801796105},{"x":155,"y":-40,"length":160.0781059358212},{"x":215,"y":-40,"length":218.68927728629038},{"x":275,"y":-40,"length":277.89386463180506},{"x":335,"y":-40,"length":337.37960815674677},{"x":397,"y":-40,"length":399.01002493671757},{"x":420,"y":-87,"length":428.9160757071248},{"x":455,"y":-160,"length":482.3121395942673},{"x":490,"y":-230,"length":541.2947441089743},{"x":535,"y":-325,"length":625.9792328823696},{"x":585,"y":-230,"length":628.589691293136},{"x":620,"y":-160,"length":640.3124237432849},{"x":655,"y":-90,"length":661.1542936410532},{"x":685,"y":-40,"length":686.1668893206667},{"x":755,"y":-40,"length":756.0588601425156},{"x":815,"y":-40,"length":815.9810046808688},{"x":880,"y":-40,"length":880.9086218218097},{"x":880,"y":5,"length":880.0142044308149},{"x":880,"y":55,"length":881.7170748034769},{"x":790,"y":55,"length":791.9122426127784},{"x":705,"y":55,"length":707.1421356417676},{"x":625,"y":55,"length":627.4153329334564},{"x":540,"y":55,"length":542.7936993002038},{"x":455,"y":55,"length":458.31212072123947},{"x":375,"y":55,"length":379.0118731649445},{"x":300,"y":55,"length":305},{"x":215,"y":55,"length":221.92341021172146},{"x":145,"y":55,"length":155.08062419270823},{"x":90,"y":55,"length":105.47511554864494},{"x":90,"y":10,"length":90.55385138137417}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":1969,"safeId":-1,"stretchTexture":false,"graphic":false,"straightSides":true,"vertices":[{"x":0,"y":51,"length":51},{"x":23,"y":79,"length":82.28000972289685},{"x":121,"y":81,"length":145.60906565183365},{"x":462,"y":-590,"length":749.3623956404538}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":53,"height":687.65,"isStatic":true,"textureOffset":0,"action":0,"width":478.65,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":20,"type":0,"smoothing":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":1970,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":false,"plr":false,"y":120,"rem":true,"density":1,"ignore":false,"layer":4,"vertices":[{"x":0,"y":0,"length":0},{"x":210,"y":0,"length":210},{"x":210,"y":50,"length":215.87033144922904},{"x":0,"y":50,"length":50}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":4179,"safeId":-1,"stretchTexture":false,"graphic":false,"straightSides":true,"vertices":[{"x":-173,"y":-805,"length":823.3796208311206},{"x":79,"y":79,"length":111.72287142747452},{"x":205,"y":79,"length":219.69524346239268},{"x":219,"y":30,"length":221.04524423746375}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":63,"height":900.5,"isStatic":true,"textureOffset":0,"action":0,"width":411.2,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":20,"type":0,"smoothing":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":4180,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":false,"plr":false,"y":130,"rem":true,"density":1,"ignore":false,"layer":4,"vertices":[{"x":0,"y":0,"length":0},{"x":210,"y":0,"length":210},{"x":210,"y":50,"length":215.87033144922904},{"x":0,"y":50,"length":50}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":440,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":-220,"rem":true,"density":1,"ignore":false,"layer":8,"vertices":[{"x":0,"y":0,"length":0},{"x":55,"y":0,"length":55},{"x":112,"y":0,"length":112},{"x":181,"y":0,"length":181},{"x":250,"y":0,"length":250},{"x":315,"y":0,"length":315},{"x":375,"y":0,"length":375},{"x":445,"y":0,"length":445},{"x":520,"y":0,"length":520},{"x":590,"y":0,"length":590},{"x":665,"y":0,"length":665},{"x":735,"y":0,"length":735},{"x":735,"y":55,"length":737.0549504616328},{"x":680,"y":55,"length":682.22063879657},{"x":625,"y":55,"length":627.4153329334564},{"x":555,"y":55,"length":557.718567021038},{"x":480,"y":55,"length":483.1407662369219},{"x":410,"y":55,"length":413.67257583746107},{"x":340,"y":55,"length":344.41980198589044},{"x":270,"y":55,"length":275.54491466909707},{"x":200,"y":55,"length":207.4246851269154},{"x":130,"y":55,"length":141.15594213493105},{"x":65,"y":55,"length":85.14693182963201},{"x":0,"y":55,"length":55}],"isStatic":false,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":15262,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":165,"y":108,"length":197.20294115453754},{"x":234,"y":336,"length":409.4532940397476}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":92,"height":372,"isStatic":true,"textureOffset":0,"action":0,"width":282.2,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":15990,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":-111,"y":-12,"length":111.64676439557037},{"x":-32,"y":-260,"length":261.96182928052707},{"x":149,"y":-362,"length":391.46519640959144}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":440,"height":387.6,"isStatic":true,"textureOffset":0,"action":0,"width":306.2,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":-30,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":330,"rem":true,"density":1,"ignore":false,"layer":2,"vertices":[{"x":5095,"y":-5,"length":5095.002453385082},{"x":5490,"y":410,"length":5505.288366652559},{"x":-1050,"y":370,"length":1113.2834320154054},{"x":-1040,"y":-1525,"length":1845.8670049599998},{"x":-835,"y":-1535,"length":1747.412372624161},{"x":-830,"y":0,"length":830}],"isStatic":true,"safeId":-1,"isWheel":false}}],[{"className":"SignPillar","params":{"scaleX":1,"rotation":0,"scaleY":1,"x":6530,"y":240,"width":9.3,"height":128.35}},{"className":"SignPillar","params":{"scaleX":1,"rotation":0,"scaleY":1,"x":10900,"y":206,"width":9.3,"height":128.35}},{"className":"SignPillar","params":{"scaleX":1,"rotation":0,"scaleY":1,"x":14690,"y":-17,"width":9.3,"height":128.35}},{"className":"SpikeBall200E","params":{"x":9090,"active":true,"y":70,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SpikeBall137E","params":{"x":2073,"active":true,"y":0,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SpikeBall137E","params":{"x":4317,"active":true,"y":3,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SpikeBall137E","params":{"x":440,"active":false,"y":260,"ag":true,"sgos":true,"id":2,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"btg":false,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SpikeBall137E","params":{"x":1170,"active":false,"y":260,"ag":true,"sgos":true,"id":2,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"btg":false,"scaleY":1,"safeId":-1,"rotation":0}}],[{"className":"Tnt1","params":{"x":8770,"count":1,"rotation":0,"y":-20,"stones":false,"physic":false,"impulse":1,"id":11,"width":53.2,"radius":1,"height":53.2,"safeId":1}},{"className":"Tnt1","params":{"x":8770,"count":1,"rotation":0,"y":-70,"stones":false,"physic":false,"impulse":1,"id":11,"width":53.2,"radius":1,"height":53.2,"safeId":1}},{"className":"Tnt1","params":{"x":8770,"count":1,"rotation":0,"y":-120,"stones":false,"physic":false,"impulse":1,"id":11,"width":53.2,"radius":1,"height":53.2,"safeId":1}},{"className":"GeyserE","params":{"x":15700,"id":44,"rotation":-89.99999999999994,"y":214,"speed":400,"safeId":-1,"rate":1,"width":331,"height":128}},{"className":"GeyserE","params":{"x":15841,"id":44,"rotation":-74.99999999999994,"y":251,"speed":1400,"safeId":-1,"rate":1,"width":303,"height":128}},{"className":"GeyserE","params":{"x":15565,"id":44,"rotation":-101.99999999999994,"y":243,"speed":400,"safeId":-1,"rate":1,"width":303,"height":128}},{"className":"Tnt1","params":{"x":2024,"count":30,"rotation":0,"y":97,"stones":true,"physic":true,"impulse":25000,"id":42,"width":53.2,"radius":200,"height":53.2,"safeId":3}},{"className":"Tnt1","params":{"x":4347,"count":30,"rotation":0,"y":107,"stones":true,"physic":true,"impulse":10000,"id":52,"width":53.2,"radius":200,"height":53.2,"safeId":3}}],null,[{"className":"PlayerWP","params":{"x":460,"rotation":0,"y":30,"width":64,"height":32}},{"className":"SafePointE","params":{"x":6530,"rotation":0,"y":160,"id":1,"width":128,"height":1891}},{"className":"SafePointE","params":{"x":10900,"rotation":0,"y":130,"id":2,"width":128,"height":1081}},{"className":"SafePointE","params":{"x":14690,"rotation":0,"y":-90,"id":3,"width":128,"height":1145}}],[{"className":"PivotJointE","params":{"x":411,"safeId":-1,"rotation":0,"graphic":0,"id":1,"y":57,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":517,"safeId":-1,"rotation":0,"graphic":0,"id":5,"y":52,"width":17,"height":17}},{"className":"ToggleE","params":{"x":920,"safeId":-1,"rotation":0,"y":-560,"sndId":-1,"fnl":false,"off":false,"id":1,"id_off":-1,"width":64,"height":691}},{"className":"MotorJointE","params":{"x":858,"useWeld":false,"rotation":0,"y":-189,"id":2,"graphic":0,"height":17,"width":17,"time":1,"safeId":-1,"rate":130,"snd":false}},{"className":"ToggleE","params":{"x":470,"safeId":-1,"rotation":0,"y":130,"sndId":-1,"fnl":false,"off":false,"id":2,"id_off":-1,"width":206,"height":64}},{"className":"PivotJointE","params":{"x":470,"safeId":-1,"rotation":0,"graphic":0,"id":-1,"y":-200,"width":17,"height":17}},{"className":"ToggleE","params":{"x":740,"safeId":-1,"rotation":0,"y":-560,"sndId":-1,"fnl":false,"off":false,"id":5,"id_off":-1,"width":64,"height":691}},{"className":"MotorJointE","params":{"x":8813,"useWeld":false,"rotation":0,"y":-187,"id":11,"graphic":0,"height":17,"width":17,"time":0.5,"safeId":1,"rate":-250,"snd":false}},{"className":"PivotJointE","params":{"x":9142,"safeId":1,"rotation":0,"graphic":0,"id":12,"y":29,"width":17,"height":17}},{"className":"ToggleE","params":{"x":8738,"safeId":1,"rotation":0,"y":-420,"sndId":-1,"fnl":false,"off":false,"id":12,"id_off":-1,"width":73,"height":440}},{"className":"ToggleE","params":{"x":8508,"safeId":1,"rotation":0,"y":-516,"sndId":-1,"fnl":false,"off":false,"id":11,"id_off":-1,"width":67,"height":404}},{"className":"PivotJointE","params":{"x":9044,"safeId":1,"rotation":0,"graphic":0,"id":12,"y":28,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":9098,"safeId":1,"rotation":0,"graphic":0,"id":-1,"y":-190,"width":17,"height":17}},{"className":"MotorJointE","params":{"x":8170,"useWeld":false,"rotation":0,"y":30,"id":7,"graphic":2,"height":17,"width":17,"time":0,"safeId":1,"rate":-150,"snd":false}},{"className":"PivotJointE","params":{"x":13742,"safeId":2,"rotation":0,"graphic":0,"id":-1,"y":-57,"width":17,"height":17}},{"className":"ToggleE","params":{"x":14750,"safeId":3,"rotation":0,"y":-280,"sndId":-1,"fnl":false,"off":false,"id":44,"id_off":-1,"width":64,"height":1027}},{"className":"MotorJointE","params":{"x":2069,"useWeld":false,"rotation":0,"y":-87,"id":41,"graphic":0,"height":17,"width":17,"time":1.5,"safeId":3,"rate":60,"snd":false}},{"className":"ToggleE","params":{"x":1379,"safeId":3,"rotation":0,"y":-707,"sndId":-1,"fnl":false,"off":false,"id":41,"id_off":-1,"width":64,"height":1335}},{"className":"ToggleE","params":{"x":2329,"safeId":3,"rotation":0,"y":-648,"sndId":-1,"fnl":false,"off":false,"id":42,"id_off":-1,"width":64,"height":2654}},{"className":"MotorJointE","params":{"x":4279,"useWeld":false,"rotation":0,"y":-77,"id":51,"graphic":0,"height":17,"width":17,"time":0.8,"safeId":3,"rate":60,"snd":false}},{"className":"ToggleE","params":{"x":3599,"safeId":3,"rotation":0,"y":-788,"sndId":-1,"fnl":false,"off":false,"id":52,"id_off":2,"width":64,"height":2486}},{"className":"ToggleE","params":{"x":3669,"safeId":3,"rotation":0,"y":-787,"sndId":-1,"fnl":false,"off":false,"id":51,"id_off":71,"width":64,"height":2798}},{"className":"ToggleE","params":{"x":6590,"safeId":1,"rotation":0,"y":-460,"sndId":-1,"fnl":false,"off":false,"id":7,"id_off":52,"width":64,"height":1658}},{"className":"PivotJointE","params":{"x":8954,"safeId":-1,"rotation":0,"graphic":0,"id":11,"y":-192,"width":17,"height":17}},{"className":"ToggleE","params":{"x":588,"safeId":-1,"rotation":0,"y":-625,"sndId":1,"fnl":false,"off":false,"id":0,"id_off":-1,"width":102,"height":2024}},{"className":"ToggleE","params":{"x":9040,"safeId":-1,"rotation":0,"y":-414,"sndId":0,"fnl":false,"off":false,"id":0,"id_off":-1,"width":118,"height":656}},{"className":"ToggleE","params":{"x":13660,"safeId":-1,"rotation":0,"y":-1104,"sndId":0,"fnl":false,"off":false,"id":0,"id_off":-1,"width":118,"height":656}},{"className":"ToggleE","params":{"x":15980,"safeId":-1,"rotation":0,"y":116,"sndId":0,"fnl":false,"off":false,"id":0,"id_off":-1,"width":242,"height":272}},{"className":"ToggleE","params":{"x":10760,"safeId":1,"rotation":0,"y":-250,"sndId":-1,"fnl":false,"off":false,"id":0,"id_off":7,"width":64,"height":2264}},{"className":"ToggleE","params":{"x":450,"safeId":-1,"rotation":0,"y":-280,"sndId":-1,"fnl":false,"off":false,"id":71,"id_off":-1,"width":567,"height":64}},{"className":"ToggleE","params":{"x":5350,"safeId":-1,"rotation":0,"y":-650,"sndId":-1,"fnl":false,"off":false,"id":0,"id_off":41,"width":64,"height":2884}},{"className":"ToggleE","params":{"x":11350,"safeId":-1,"rotation":0,"y":-60,"sndId":-1,"fnl":false,"off":false,"id":0,"id_off":51,"width":64,"height":1246}}]]} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map20.json b/motox3mspooky/assets/levels/map20.json deleted file mode 100644 index e71f877a..00000000 --- a/motox3mspooky/assets/levels/map20.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":-960,"physic":true,"lineId":0,"y":120,"height":64,"isRoad":true,"direction":90,"width":5678,"textureMode":true,"cameraOffsetY":50,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":5665,"y":0,"length":5665}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":1710,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-210,"density":"1","height":1204,"action":0,"isStatic":true,"wireframe":false,"width":1053,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-407,"y":-383,"length":558.8720783864586},{"x":-329,"y":-289,"length":437.9063826892684},{"x":-261,"y":-210,"length":334.9940297975473},{"x":-211,"y":-149,"length":258.3060200614767},{"x":-167,"y":-106,"length":197.80040444852483},{"x":-115,"y":-67,"length":133.09395177843356},{"x":-64,"y":-39,"length":74.94664769020693},{"x":-10,"y":-19,"length":21.470910553583888},{"x":54,"y":-5,"length":54.230987451824994},{"x":118,"y":0,"length":118},{"x":181,"y":-4,"length":181.04419349981927},{"x":240,"y":-16,"length":240.53274205396653},{"x":294,"y":-34,"length":295.9594566828369},{"x":345,"y":-61,"length":350.3512523168713},{"x":386,"y":-90,"length":396.35337768208814},{"x":424,"y":-123,"length":441.4804638939304},{"x":458,"y":-157,"length":484.16216291651705},{"x":491,"y":-200,"length":530.1707272190723},{"x":516,"y":-242,"length":569.9298202410539},{"x":531,"y":-271,"length":596.1560198471537},{"x":545,"y":-310,"length":626.9968101992226},{"x":557,"y":-358,"length":662.1276312011152},{"x":566,"y":-406,"length":696.557248185675},{"x":574,"y":-503,"length":763.2070492336926},{"x":581,"y":-594,"length":830.9013178470714},{"x":588,"y":-686,"length":903.515356814703},{"x":595,"y":-773,"length":975.4762939200522},{"x":603,"y":-859,"length":1049.5189374184727},{"x":610,"y":-944,"length":1123.9377206945233},{"x":616,"y":-1023,"length":1194.1461384604481},{"x":623,"y":-1099,"length":1263.3012309025903},{"x":631,"y":-1189,"length":1346.0616627777495}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2236,"rotation":-150,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1116,"density":"1","height":1569,"action":0,"isStatic":true,"wireframe":false,"width":1323,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":824,"y":-984,"length":1283.4453630754992},{"x":737,"y":-1017,"length":1255.9689486607542},{"x":669,"y":-1043,"length":1239.1166208230766},{"x":583,"y":-1076,"length":1223.7912403674084},{"x":505,"y":-1106,"length":1215.8375713885468},{"x":420,"y":-1140,"length":1214.9074038789952},{"x":328,"y":-1175,"length":1219.921718800022},{"x":249,"y":-1195,"length":1220.6662115418776},{"x":185,"y":-1204,"length":1218.1301244120023},{"x":127,"y":-1207,"length":1213.6630504386299},{"x":61,"y":-1206,"length":1207.541717705852},{"x":-6,"y":-1197,"length":1197.0150374995294},{"x":-76,"y":-1179,"length":1181.4469941558953},{"x":-142,"y":-1151,"length":1159.726260804678},{"x":-199,"y":-1118,"length":1135.5725428170583},{"x":-250,"y":-1082,"length":1110.506190887741},{"x":-297,"y":-1040,"length":1081.5770892543906},{"x":-335,"y":-1002,"length":1056.5173921900198},{"x":-378,"y":-946,"length":1018.7246929372037},{"x":-407,"y":-898,"length":985.9274821202622},{"x":-434,"y":-842,"length":947.269760944579},{"x":-455,"y":-784,"length":906.4662155866594},{"x":-471,"y":-729,"length":867.9181989104734},{"x":-479,"y":-677,"length":829.3189977324769},{"x":-484,"y":-608,"length":777.1228989033846},{"x":-483,"y":-551,"length":732.727780284056},{"x":-477,"y":-497,"length":688.8671860380636},{"x":-464,"y":-445,"length":642.9004588581346},{"x":-439,"y":-373,"length":576.064232529672},{"x":-392,"y":-269,"length":475.4208661806926},{"x":-355,"y":-189,"length":402.17657813453036},{"x":-320,"y":-114,"length":339.69986753014786},{"x":-284,"y":-35,"length":286.1485628130954},{"x":-247,"y":43,"length":250.7149776140229},{"x":-211,"y":122,"length":243.73140954747709},{"x":-176,"y":199,"length":265.6633207652121},{"x":-141,"y":276,"length":309.9306374013386},{"x":-109,"y":347,"length":363.7169228947149}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1710,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":110,"density":"1","height":3002.95,"action":0,"isStatic":true,"wireframe":false,"width":2330.1,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-1187,"y":-2843,"length":3080.8469614701735},{"x":-1185,"y":-2807,"length":3046.8793871763287},{"x":-1176,"y":-1901,"length":2235.347176614854},{"x":-1174,"y":-1801,"length":2149.8551113970448},{"x":-1171,"y":-1699,"length":2063.453900623903},{"x":-1168,"y":-1624,"length":2000.399960007998},{"x":-1168,"y":-1534,"length":1928.0508292054958},{"x":-1168,"y":-1448,"length":1860.3569549954655},{"x":-1170,"y":-1371,"length":1802.370938514045},{"x":-1169,"y":-1281,"length":1734.2208625201117},{"x":-1171,"y":-1199,"length":1675.9600233895796},{"x":-1171,"y":-1126,"length":1624.5359337361547},{"x":-1170,"y":-1060,"length":1578.7653403846944},{"x":-1106,"y":-989,"length":1483.697071507523},{"x":-1062,"y":-940,"length":1418.253855979246},{"x":-1018,"y":-891,"length":1352.8506939052809},{"x":-959,"y":-826,"length":1265.6843998406555},{"x":-912,"y":-774,"length":1196.1688843971824},{"x":-861,"y":-716,"length":1119.811144791835},{"x":-811,"y":-659,"length":1044.9889951573653},{"x":-761,"y":-603,"length":970.942840748105},{"x":-718,"y":-553,"length":906.2742410551014},{"x":-686,"y":-518,"length":859.6045602484901},{"x":-644,"y":-471,"length":797.8577567461508},{"x":-596,"y":-418,"length":727.9697795925323},{"x":-548,"y":-364,"length":657.8753681359411},{"x":-499,"y":-310,"length":587.4529768415512},{"x":-448,"y":-253,"length":514.5026724906295},{"x":-398,"y":-201,"length":445.87554317320433},{"x":-342,"y":-156,"length":375.89892258425004},{"x":-276,"y":-111,"length":297.48445337529824},{"x":-216,"y":-77,"length":229.31419493786248},{"x":-155,"y":-50,"length":162.8649747490233},{"x":-83,"y":-27,"length":87.28115489611719},{"x":-14,"y":-12,"length":18.439088914585774},{"x":55,"y":-3,"length":55.08175741568164},{"x":123,"y":0,"length":123},{"x":194,"y":-4,"length":194.0412327316027},{"x":261,"y":-12,"length":261.27571643763605},{"x":330,"y":-28,"length":331.18574848564964},{"x":390,"y":-48,"length":392.9427439207906},{"x":447,"y":-71,"length":452.6035793053343},{"x":493,"y":-97,"length":502.4519877560442},{"x":550,"y":-133,"length":565.8524542670112},{"x":598,"y":-169,"length":621.4217569412903},{"x":649,"y":-214,"length":683.3717875358917},{"x":697,"y":-267,"length":746.3899784964962},{"x":739,"y":-317,"length":804.120637715511},{"x":772,"y":-366,"length":854.3652614660781},{"x":805,"y":-424,"length":909.8356994534782},{"x":838,"y":-497,"length":974.296156207136},{"x":859,"y":-570,"length":1030.9127024147099},{"x":875,"y":-648,"length":1088.8200034900167},{"x":889,"y":-760,"length":1169.581549102071},{"x":899,"y":-847,"length":1235.1558606103117},{"x":911,"y":-932,"length":1303.282394571491},{"x":922,"y":-1017,"length":1372.7246628512216},{"x":932,"y":-1099,"length":1440.9805689182626},{"x":943,"y":-1186,"length":1515.2046066455844},{"x":954,"y":-1272,"length":1590},{"x":964,"y":-1358,"length":1665.370829575203},{"x":974,"y":-1442,"length":1740.1264321881902},{"x":984,"y":-1527,"length":1816.586083839684},{"x":994,"y":-1613,"length":1894.6780729189854},{"x":1004,"y":-1699,"length":1973.478401199263},{"x":1015,"y":-1784,"length":2052.5303895435995},{"x":1025,"y":-1870,"length":2132.4926729065214},{"x":1036,"y":-1955,"length":2212.537231325159},{"x":1046,"y":-2040,"length":2292.5348416109186},{"x":1058,"y":-2125,"length":2373.813177147688},{"x":1068,"y":-2210,"length":2454.5313198246217},{"x":1078,"y":-2295,"length":2535.5687724847853},{"x":1088,"y":-2381,"length":2617.805378556626},{"x":1099,"y":-2466,"length":2699.8068449428006},{"x":1109,"y":-2552,"length":2782.5500893964154},{"x":1123,"y":-2656,"length":2883.6547990354184},{"x":1126,"y":-2708,"length":2932.770021668934},{"x":1111,"y":-2752,"length":2967.7980052557486},{"x":1085,"y":-2791,"length":2994.4792535597903},{"x":1045,"y":-2815,"length":3002.707111924172},{"x":948,"y":-2824,"length":2978.8722698363554},{"x":836,"y":-2835,"length":2955.6929813497204},{"x":708,"y":-2845,"length":2931.772330860635},{"x":596,"y":-2856,"length":2917.5249784706216},{"x":483,"y":-2863,"length":2903.4562163049745},{"x":355,"y":-2871,"length":2892.8646701842104},{"x":223,"y":-2881,"length":2889.6176217624366},{"x":86,"y":-2891,"length":2892.2788593080027},{"x":-47,"y":-2903,"length":2903.380443551964},{"x":-1088,"y":-2986,"length":3178.040276648488}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1570,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-560,"density":"1","height":1074,"action":0,"isStatic":true,"wireframe":false,"width":562,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":55,"y":89,"length":104.62313319720452},{"x":80,"y":114,"length":139.26952286842948},{"x":107,"y":134,"length":171.4788616710526},{"x":134,"y":150,"length":201.13676938839401},{"x":169,"y":166,"length":236.8902699563661},{"x":202,"y":175,"length":267.26204369494747},{"x":241,"y":182,"length":302.00165562460086},{"x":282,"y":181,"length":335.08954027244715},{"x":319,"y":177,"length":364.81502162054676},{"x":350,"y":169,"length":388.66566609362343},{"x":382,"y":157,"length":413.0048425866215},{"x":415,"y":139,"length":437.6596851436056},{"x":446,"y":116,"length":460.83836645834947},{"x":470,"y":94,"length":479.3078342777218},{"x":490,"y":68,"length":494.6958661642525},{"x":508,"y":35,"length":509.20428120745413},{"x":522,"y":6,"length":522.0344816197489},{"x":532,"y":-24,"length":532.5410782277739},{"x":539,"y":-61,"length":542.4407801778918},{"x":550,"y":-179,"length":578.395193617651},{"x":559,"y":-286,"length":627.9148031381327},{"x":568,"y":-413,"length":702.2770108724905},{"x":578,"y":-534,"length":786.9180389341701},{"x":587,"y":-658,"length":881.7783168121113},{"x":594,"y":-759,"length":963.8034031896754},{"x":602,"y":-877,"length":1063.7353994297641}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":2124,"rotation":0,"y":-1400,"vertices":[{"x":-1500,"y":-1470,"length":2100.2142747824564},{"x":530,"y":-1310,"length":1413.1525041551602},{"x":380,"y":35,"length":381.6084380618437},{"x":-1230,"y":-305,"length":1267.2509617277865},{"x":-1595,"y":-400,"length":1644.3919848989779},{"x":-1605,"y":-1330,"length":2084.448368273966}]},"className":"frg.game.editor.objects::FinishShaper"}],null,[{"params":{"x":2290,"rotation":0,"y":-110,"time":5,"safeId":-1,"force":4000,"width":64.1,"height":64.1},"className":"BoostE"}],null,[{"params":{"x":1840,"rotation":0,"y":-460,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":1840,"rotation":0,"y":-285,"id":0,"width":128,"height":128},"className":"SafePointE"},{"params":{"x":1840,"rotation":0,"y":-107,"id":0,"width":128,"height":128},"className":"SafePointE"},{"params":{"x":1840,"rotation":0,"y":40,"id":0,"width":128,"height":128},"className":"SafePointE"}]],"settings":{"prizes":"30,38,47","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map21.json b/motox3mspooky/assets/levels/map21.json deleted file mode 100644 index dc648f2b..00000000 --- a/motox3mspooky/assets/levels/map21.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":2630,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":2675,"y":45,"length":2675.378477898034},{"x":2635,"y":170,"length":2640.478176391541},{"x":2625,"y":275,"length":2639.3654540438315},{"x":2635,"y":375,"length":2661.5503001070633},{"x":2645,"y":475,"length":2687.312784176788},{"x":2690,"y":515,"length":2738.854687638612},{"x":2690,"y":550,"length":2745.6511067504553},{"x":600,"y":555,"length":817.3279635495167},{"x":520,"y":530,"length":742.4957912338629},{"x":565,"y":470,"length":734.9319696407281},{"x":550,"y":370,"length":662.872536767062},{"x":525,"y":305,"length":607.1655457945551},{"x":485,"y":250,"length":545.6418239101545},{"x":445,"y":240,"length":505.5937104039171},{"x":245,"y":225,"length":332.6409475695979},{"x":35,"y":245,"length":247.48737341529164},{"x":-15,"y":280,"length":280.40149785619906}],"y":-780},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":380,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":2245,"y":25,"length":2245.139193903131},{"x":2240,"y":55,"length":2240.675121475668},{"x":2205,"y":135,"length":2209.128787554044},{"x":2185,"y":195,"length":2193.6841158197776},{"x":2180,"y":275,"length":2197.276723583081},{"x":2225,"y":325,"length":2248.610682176886},{"x":2255,"y":350,"length":2282.0002191060366},{"x":2295,"y":375,"length":2325.4354430944754},{"x":2365,"y":395,"length":2397.759370745947},{"x":2450,"y":410,"length":2484.069242191127},{"x":2485,"y":425,"length":2521.081117298688},{"x":2595,"y":425,"length":2629.5722085540833},{"x":2660,"y":405,"length":2690.6551246861795},{"x":2705,"y":400,"length":2734.4149282799053},{"x":2745,"y":370,"length":2769.824001628984},{"x":2820,"y":420,"length":2851.1050489240133},{"x":2830,"y":1235,"length":3087.7378450898323},{"x":2170,"y":1240,"length":2499.2999019725503},{"x":2155,"y":455,"length":2202.50993187318},{"x":-5,"y":455,"length":455.02747169813824}],"y":-110},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":3075,"rotation":0,"physic":true,"line":true,"plr":true,"id":81,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":60,"y":0,"length":60},{"x":82,"y":20,"length":84.40379138403677},{"x":76,"y":36,"length":84.09518416651456},{"x":46,"y":38,"length":59.665735560705194},{"x":37,"y":46,"length":59.033888572581766},{"x":35,"y":77,"length":84.581321815162},{"x":18,"y":82,"length":83.95236744726142},{"x":-1,"y":59,"length":59.00847396772772},{"x":-13,"y":58,"length":59.43904440685432},{"x":-38,"y":75,"length":84.07734534343957},{"x":-52,"y":66,"length":84.02380615040002},{"x":-47,"y":36,"length":59.20304046246274},{"x":-54,"y":26,"length":59.93329625508679},{"x":-83,"y":17,"length":84.72307831990054},{"x":-85,"y":0,"length":85},{"x":-58,"y":-14,"length":59.665735560705194},{"x":-54,"y":-26,"length":59.93329625508679},{"x":-65,"y":-54,"length":84.50443775329198},{"x":-52,"y":-66,"length":84.02380615040002},{"x":-25,"y":-54,"length":59.50630218724736},{"x":-13,"y":-58,"length":59.43904440685432},{"x":1,"y":-84,"length":84.00595217006948},{"x":18,"y":-82,"length":83.95236744726142},{"x":26,"y":-53,"length":59.033888572581766},{"x":37,"y":-46,"length":59.033888572581766},{"x":67,"y":-51,"length":84.20213774008353},{"x":76,"y":-36,"length":84.09518416651456},{"x":58,"y":-12,"length":59.22837157984339}],"y":1146},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2640,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":90,"y":0,"length":90},{"x":185,"y":0,"length":185},{"x":285,"y":0,"length":285},{"x":370,"y":0,"length":370},{"x":470,"y":0,"length":470},{"x":470,"y":60,"length":473.8143096192853},{"x":470,"y":115,"length":483.86465049639656},{"x":470,"y":190,"length":506.951674225463},{"x":470,"y":260,"length":537.1219600798314},{"x":405,"y":260,"length":481.27435003332556},{"x":285,"y":120,"length":309.23292192132453},{"x":190,"y":120,"length":224.72205054244233},{"x":95,"y":120,"length":153.05227865013967},{"x":0,"y":120,"length":120},{"x":0,"y":60,"length":60}],"y":900},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4470,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":80,"y":-30,"length":85.44003745317531},{"x":160,"y":-60,"length":170.88007490635061},{"x":260,"y":-100,"length":278.5677655436824},{"x":260,"y":-5,"length":260.0480724789169},{"x":260,"y":95,"length":276.81221071332817},{"x":-10,"y":100,"length":100.4987562112089}],"y":-260},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5660,"rotation":0,"y":-2700,"vertices":[{"x":0,"y":0,"length":0},{"x":1290,"y":-5,"length":1290.0096898860877},{"x":5,"y":1280,"length":1280.0097655877473}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":5286,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.2,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":220,"y":0,"length":220},{"x":216,"y":38,"length":219.31712199461307},{"x":206,"y":75,"length":219.22819161777528},{"x":190,"y":109,"length":219.04565734111233},{"x":168,"y":141,"length":219.32852071721086},{"x":141,"y":168,"length":219.32852071721086},{"x":110,"y":190,"length":219.5449840010015},{"x":75,"y":206,"length":219.22819161777528},{"x":38,"y":216,"length":219.31712199461307},{"x":0,"y":220,"length":220},{"x":-38,"y":216,"length":219.31712199461307},{"x":-75,"y":206,"length":219.22819161777528},{"x":-109,"y":190,"length":219.04565734111233},{"x":-141,"y":168,"length":219.32852071721086},{"x":-168,"y":141,"length":219.32852071721086},{"x":-190,"y":109,"length":219.04565734111233},{"x":-206,"y":75,"length":219.22819161777528},{"x":-216,"y":38,"length":219.31712199461307},{"x":-220,"y":0,"length":220},{"x":-216,"y":-38,"length":219.31712199461307},{"x":-206,"y":-75,"length":219.22819161777528},{"x":-190,"y":-110,"length":219.5449840010015},{"x":-168,"y":-141,"length":219.32852071721086},{"x":-141,"y":-168,"length":219.32852071721086},{"x":-110,"y":-190,"length":219.5449840010015},{"x":-75,"y":-206,"length":219.22819161777528},{"x":-38,"y":-216,"length":219.31712199461307},{"x":0,"y":-220,"length":220},{"x":38,"y":-216,"length":219.31712199461307},{"x":75,"y":-206,"length":219.22819161777528},{"x":110,"y":-190,"length":219.5449840010015},{"x":141,"y":-168,"length":219.32852071721086},{"x":168,"y":-141,"length":219.32852071721086},{"x":190,"y":-110,"length":219.5449840010015},{"x":206,"y":-75,"length":219.22819161777528},{"x":216,"y":-38,"length":219.31712199461307}],"y":-481},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5310,"bg":true,"rotation":0,"y":-110,"vertices":[{"x":0,"y":0,"length":0},{"x":490,"y":0,"length":490},{"x":490,"y":420,"length":645.3681120105022},{"x":0,"y":420,"length":420}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":2370,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":80,"y":-45,"length":91.7877987534291},{"x":166,"y":-93,"length":190.2761151589973},{"x":260,"y":-145,"length":297.6995129320839},{"x":260,"y":-60,"length":266.8332812825267},{"x":260,"y":20,"length":260.76809620810593},{"x":-20,"y":95,"length":97.082439194738}],"y":300},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2530,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-1395,"y":-960,"length":1693.406330447598},{"x":1245,"y":-975,"length":1581.344364773214},{"x":1235,"y":-2540,"length":2824.3273535480976},{"x":3125,"y":-2550,"length":4033.3763771807858},{"x":3126,"y":-843,"length":3237.672775312539},{"x":3068,"y":-820,"length":3175.692680345502},{"x":3018,"y":-797,"length":3121.463278656342},{"x":2973,"y":-770,"length":3071.0957327963583},{"x":2934,"y":-740,"length":3025.8810287253527},{"x":2898,"y":-707,"length":2982.993965800132},{"x":2861,"y":-671,"length":2938.6326752420077},{"x":2829,"y":-632,"length":2898.735068956803},{"x":2800,"y":-595,"length":2862.520742282927},{"x":2780,"y":-560,"length":2835.842026629833},{"x":2765,"y":-550,"length":2819.1709774329047},{"x":100,"y":-565,"length":573.7813172280883},{"x":100,"y":100,"length":141.4213562373095},{"x":-2030,"y":95,"length":2032.221690662709},{"x":-2040,"y":460,"length":2091.219739769114},{"x":-2570,"y":465,"length":2611.7283549404597},{"x":-3000,"y":-710,"length":3082.872037564972}],"y":-160},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-60,"physic":false,"lineId":0,"y":300,"height":1156,"isRoad":false,"direction":90,"width":9720,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2422,"y":0,"length":2422},{"x":2525,"y":25,"length":2525.123759343292},{"x":2600,"y":59,"length":2600.669336920786},{"x":2752,"y":150,"length":2756.084904352549},{"x":2842,"y":222,"length":2850.657468023824},{"x":3022,"y":223,"length":3030.2166589206126},{"x":3180,"y":60,"length":3180.5659873676573},{"x":3185,"y":-284,"length":3197.636783626308},{"x":3618,"y":-554,"length":3660.1693949870682},{"x":5065,"y":-555,"length":5095.316476922704},{"x":5126,"y":-524,"length":5152.713071771026},{"x":5171,"y":-494,"length":5194.543002035886},{"x":5415,"y":-275,"length":5421.978421203832},{"x":5471,"y":-249,"length":5476.663400283059},{"x":5544,"y":-244,"length":5549.366810727148},{"x":5643,"y":-254,"length":5648.713570362725},{"x":5721,"y":-279,"length":5727.799053737832},{"x":5783,"y":-325,"length":5792.125171299391},{"x":6028,"y":-671,"length":6065.230828253777},{"x":6072,"y":-736,"length":6116.443411002835},{"x":6127,"y":-784,"length":6176.9559655221765},{"x":6179,"y":-813,"length":6232.25561093253},{"x":6250,"y":-835,"length":6305.531301960208},{"x":9707,"y":-920,"length":9750.499935900723}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":2553,"bg":true,"rotation":0,"y":330,"vertices":[{"x":0,"y":0,"length":0},{"x":600,"y":0,"length":600},{"x":600,"y":750,"length":960.4686356149273},{"x":0,"y":750,"length":750}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":6384,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1074,"density":"1","height":68.1,"action":0,"isStatic":true,"wireframe":false,"width":353.35,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":482,"y":49,"length":484.48426187029025},{"x":326,"y":51,"length":329.9651496749316},{"x":327,"y":0,"length":327},{"x":661,"y":0,"length":661},{"x":662,"y":48,"length":663.7379000780353},{"x":494,"y":50,"length":496.52391684590583}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":7894,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-594,"density":"1","height":1223.95,"action":0,"isStatic":true,"wireframe":false,"width":643,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":3,"length":3},{"x":55,"y":-3,"length":55.08175741568164},{"x":105,"y":-12,"length":105.68348972285122},{"x":154,"y":-20,"length":155.2932709424333},{"x":207,"y":-35,"length":209.9380861111199},{"x":250,"y":-52,"length":255.3507391804457},{"x":295,"y":-73,"length":303.8980092070364},{"x":331,"y":-94,"length":344.0886513676381},{"x":363,"y":-117,"length":381.3895646186455},{"x":389,"y":-138,"length":412.7529527453438},{"x":419,"y":-164,"length":449.95221968560173},{"x":445,"y":-189,"length":483.47285342612565},{"x":471,"y":-219,"length":519.4246817393259},{"x":499,"y":-253,"length":559.4729662816604},{"x":526,"y":-293,"length":602.100489951636},{"x":554,"y":-345,"length":652.641555526462},{"x":575,"y":-395,"length":697.6030389842063},{"x":593,"y":-451,"length":745.0167783345554},{"x":603,"y":-494,"length":779.515875399597},{"x":609,"y":-536,"length":811.2810856910199},{"x":613,"y":-575,"length":840.4724861647762},{"x":612,"y":-620,"length":871.1739206381238},{"x":610,"y":-665,"length":902.399578900611},{"x":604,"y":-711,"length":932.918538780316},{"x":592,"y":-761,"length":964.1498846133832},{"x":575,"y":-817,"length":999.0565549557242},{"x":553,"y":-868,"length":1029.1904585644},{"x":532,"y":-907,"length":1051.5098668105782},{"x":507,"y":-947,"length":1074.1778251295266},{"x":477,"y":-985,"length":1094.4194808207683},{"x":445,"y":-1022,"length":1114.6788775248233},{"x":403,"y":-1060,"length":1134.0233683659258},{"x":373,"y":-1085,"length":1147.3247142810094},{"x":327,"y":-1117,"length":1163.8805780663238},{"x":285,"y":-1141,"length":1176.0552708100074},{"x":237,"y":-1164,"length":1187.8825699537813},{"x":190,"y":-1180,"length":1195.198728245642},{"x":137,"y":-1192,"length":1199.8470735889637},{"x":83,"y":-1200,"length":1202.8669918158034},{"x":35,"y":-1204,"length":1204.5086135017882},{"x":-15,"y":-1203,"length":1203.0935125749786}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":7882,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1802,"density":"1","height":917,"action":0,"isStatic":true,"wireframe":false,"width":68,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-4,"y":-904,"length":904.0088495142069}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":7880,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-2700,"density":"1","height":67,"action":0,"isStatic":true,"wireframe":false,"width":2246,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-2233,"y":3,"length":2233.0020152252437}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":5662,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-2708,"density":"1","height":1712,"action":0,"isStatic":true,"wireframe":false,"width":68,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":4,"y":1699,"length":1699.0047086456234}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":-60,"physic":true,"lineId":0,"y":300,"height":1694,"isRoad":true,"direction":90,"width":10923,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2695,"y":0,"length":2695},{"x":2695,"y":730,"length":2792.118371416226},{"x":3175,"y":730,"length":3257.8405424452562},{"x":3175,"y":-560,"length":3224.0075992466273},{"x":5380,"y":-560,"length":5409.066462893574},{"x":5380,"y":-110,"length":5381.124417814552},{"x":5835,"y":-110,"length":5836.036754510718},{"x":5835,"y":-645,"length":5870.540860942882},{"x":6165,"y":-900,"length":6230.347101085139},{"x":10910,"y":-895,"length":10946.649030639468}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3588,"y":-322,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":6870,"y":-660,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":-90,"scaleY":1,"x":3050,"y":200,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":2960,"rotation":90.00000000000006,"y":200,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":-90,"scaleY":1,"x":3050,"y":60,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":2960,"rotation":90.00000000000006,"y":60,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":-90,"scaleY":1,"x":3050,"y":-80,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":2960,"rotation":90.00000000000006,"y":-80,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":90,"scaleY":1,"x":2690,"y":-320,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":90,"scaleY":1,"x":2690,"y":-397,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":2770,"rotation":42.00000000000006,"y":-320,"width":102,"height":90.05},"className":"Sign21"},{"params":{"x":2760,"rotation":-179.99999999999994,"y":-400,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3554,"y":-303,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":1480,"rotation":0,"y":210,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":1480,"y":200,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":2180,"y":200,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":2180,"rotation":0,"y":210,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"x":1070,"rotation":0,"y":270,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":1130,"rotation":0,"y":270,"width":51.6,"height":54.35},"className":"Dec28"},{"params":{"x":3910,"rotation":0,"y":-390,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3910,"y":-400,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4410,"y":-400,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":4410,"rotation":0,"y":-390,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"x":2760,"ag":true,"active":true,"y":-590,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":2992,"ag":true,"active":true,"y":-590,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":5530,"stones":false,"physic":false,"impulse":8500,"id":6,"radius":400,"y":44,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"},{"params":{"x":6764,"stones":false,"physic":false,"impulse":1000,"id":0,"radius":400,"y":-1074,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":25},"className":"Tnt1"},{"params":{"x":6884,"stones":false,"physic":false,"impulse":2000,"id":0,"radius":400,"y":-1074,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":25},"className":"Tnt1"},{"params":{"x":6944,"stones":false,"physic":false,"impulse":3000,"id":0,"radius":400,"y":-1074,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":25},"className":"Tnt1"},{"params":{"x":6824,"stones":false,"physic":false,"impulse":2000,"id":0,"radius":400,"y":-1074,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":25},"className":"Tnt1"},{"params":{"x":7004,"stones":false,"physic":false,"impulse":10000,"id":0,"radius":400,"y":-1074,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":25},"className":"Tnt1"}],null,[{"params":{"x":1260,"rotation":0,"y":230,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":3590,"rotation":0,"y":-400,"id":0,"width":128,"height":836},"className":"SafePointE"},{"params":{"x":6870,"rotation":0,"y":-730,"id":0,"width":128,"height":683},"className":"SafePointE"}],[{"params":{"x":3075,"rotation":0,"graphic":1,"id":1,"y":1146,"height":17,"width":17,"time":7.5,"safeId":-10,"snd":false,"rate":120,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2917,"active":0,"y":960,"cycle":0,"body":false,"id":1,"position":0,"width":13,"height":1373,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-1360,"length":1360}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":180},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":2510,"sndId":-1,"rotation":0,"y":10,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":1166},"className":"ToggleE"},{"params":{"x":6006,"sndId":-1,"rotation":0,"y":-600,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":6,"width":64,"height":1351},"className":"ToggleE"},{"params":{"x":6834,"sndId":-1,"rotation":-45,"y":-1204,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":83,"height":481},"className":"ToggleE"},{"params":{"x":2760,"rotation":0,"graphic":1,"id":1,"y":-591,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-100,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2992,"rotation":0,"graphic":1,"id":1,"y":-591,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":100,"useWeld":false},"className":"MotorJointE"}]],"settings":{"prizes":"31,37,44","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map22.json b/motox3mspooky/assets/levels/map22.json deleted file mode 100644 index 9b7655a3..00000000 --- a/motox3mspooky/assets/levels/map22.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":-90,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":2475,"y":-195,"length":2482.6699337608293},{"x":2460,"y":655,"length":2545.7071709055617},{"x":2499,"y":761,"length":2612.302049916893},{"x":2431,"y":786,"length":2554.9084132312846},{"x":2373,"y":806,"length":2506.145446696979},{"x":2326,"y":824,"length":2467.640978748732},{"x":2275,"y":844,"length":2426.5121058836694},{"x":2226,"y":868,"length":2389.2467432226417},{"x":2181,"y":891,"length":2355.9800508493277},{"x":2141,"y":911,"length":2326.7578301146855},{"x":2108,"y":931,"length":2304.4359396607233},{"x":2070,"y":956,"length":2280.0956120303376},{"x":2033,"y":981,"length":2257.310346407866},{"x":2003,"y":1005,"length":2240.989513585461},{"x":1971,"y":1031,"length":2224.3655275156552},{"x":1939,"y":1063,"length":2211.26434421577},{"x":1910,"y":1095,"length":2201.6187226674833},{"x":1885,"y":1125,"length":2195.187919062967},{"x":1864,"y":1156,"length":2193.3608914175525},{"x":1845,"y":1193,"length":2197.105823577918},{"x":1830,"y":1225,"length":2202.1637087192225},{"x":1817,"y":1263,"length":2212.839352506187},{"x":1810,"y":1295,"length":2225.561726845607},{"x":1805,"y":1340,"length":2248.0269126502913},{"x":4623,"y":1340,"length":4813.286714917365},{"x":4616,"y":1284,"length":4791.253698146238},{"x":4606,"y":1248,"length":4772.079211412987},{"x":4593,"y":1212,"length":4750.220310680337},{"x":4575,"y":1174,"length":4723.229933001357},{"x":4551,"y":1134,"length":4690.155327918255},{"x":4525,"y":1098,"length":4656.310664034349},{"x":4481,"y":1050,"length":4602.375582240111},{"x":4435,"y":1010,"length":4548.551967384785},{"x":4388,"y":975,"length":4495.016017769013},{"x":4336,"y":940,"length":4436.721311959993},{"x":4273,"y":904,"length":4367.5788487444615},{"x":4211,"y":872,"length":4300.337777430977},{"x":4132,"y":834,"length":4215.326796346874},{"x":4069,"y":808,"length":4148.4485051643105},{"x":3994,"y":782,"length":4069.835377506073},{"x":3912,"y":756,"length":3984.379499997459},{"x":3830,"y":736,"length":3900.0764095078957},{"x":3763,"y":721,"length":3831.4501171227585},{"x":3690,"y":707,"length":3757.119774508127},{"x":3608,"y":694,"length":3674.1393550054686},{"x":3518,"y":683,"length":3583.6870678115856},{"x":3434,"y":676,"length":3499.9045701275913},{"x":3356,"y":671,"length":3422.4226799155012},{"x":3265,"y":669,"length":3332.8345293458538},{"x":3193,"y":669,"length":3262.3319880110303},{"x":3108,"y":671,"length":3179.6076802020716},{"x":3017,"y":675,"length":3091.58761803705},{"x":2929,"y":682,"length":3007.3518251112555},{"x":2838,"y":692,"length":2921.1484043095106},{"x":2765,"y":703,"length":2852.969330364419},{"x":2692,"y":716,"length":2785.591499125455},{"x":2624,"y":731,"length":2723.9194187787566},{"x":2564,"y":745,"length":2670.0413854470494},{"x":2510,"y":760,"length":2622.5369396826427},{"x":2470,"y":650,"length":2554.094751570505},{"x":2485,"y":-190,"length":2492.2529967882474},{"x":10740,"y":240,"length":10742.681229562757},{"x":12617,"y":1000,"length":12656.5670305972},{"x":12472,"y":1452,"length":12556.23701592161},{"x":12417,"y":1428,"length":12498.842866441677},{"x":12365,"y":1407,"length":12444.793047696696},{"x":12302,"y":1386,"length":12379.83037040492},{"x":12220,"y":1371,"length":12296.667881991447},{"x":12144,"y":1366,"length":12220.584765059322},{"x":12052,"y":1367,"length":12129.278337972131},{"x":11980,"y":1375,"length":12058.649385399676},{"x":11910,"y":1390,"length":11990.838169202352},{"x":11836,"y":1415,"length":11920.281917807146},{"x":11777,"y":1438,"length":11864.466823250003},{"x":11688,"y":1488,"length":11782.33796833209},{"x":11640,"y":1524,"length":11739.343082131982},{"x":11581,"y":1574,"length":11687.473507991366},{"x":11528,"y":1626,"length":11642.107197582403},{"x":11482,"y":1685,"length":11604.979491580327},{"x":11444,"y":1741,"length":11575.673500924255},{"x":11406,"y":1813,"length":11549.190664284662},{"x":11373,"y":1896,"length":11529.958586222241},{"x":11352,"y":1977,"length":11522.865659201274},{"x":11340,"y":2065,"length":11526.48363552389},{"x":11333,"y":2226,"length":11549.543930389633},{"x":11191,"y":2230,"length":11411.020155972034},{"x":11147,"y":2156,"length":11353.587318552669},{"x":11098,"y":2068,"length":11289.031313624744},{"x":11050,"y":1976,"length":11225.287345988076},{"x":11000,"y":1910,"length":11164.591349440427},{"x":10956,"y":1850,"length":11111.095175544127},{"x":10878,"y":1772,"length":11021.382308948365},{"x":10783,"y":1703,"length":10916.652325690326},{"x":10688,"y":1642,"length":10813.39484158421},{"x":10600,"y":1598,"length":10719.77630363619},{"x":10506,"y":1566,"length":10622.070984511447},{"x":10408,"y":1542,"length":10521.607671834186},{"x":10304,"y":1531,"length":10417.119419494047},{"x":10190,"y":1526,"length":10303.629263516812},{"x":10070,"y":1543,"length":10187.529091983002},{"x":9961,"y":1569,"length":10083.812870139946},{"x":9889,"y":1594,"length":10016.643998865089},{"x":9815,"y":1626,"length":9948.773844047315},{"x":9761,"y":1655,"length":9900.310399174361},{"x":9706,"y":1689,"length":9851.860585696491},{"x":9660,"y":1726,"length":9812.98507081306},{"x":9603,"y":1773,"length":9765.302760283472},{"x":9558,"y":1817,"length":9729.175350460078},{"x":9506,"y":1873,"length":9688.764885164672},{"x":9462,"y":1932,"length":9657.228795052957},{"x":9422,"y":1990,"length":9629.858981314315},{"x":9388,"y":2045,"length":9608.151174913934},{"x":9357,"y":2104,"length":9590.634233459225},{"x":9335,"y":2176,"length":9585.25956873365},{"x":10071,"y":2331,"length":10337.243443007425},{"x":10097,"y":2291,"length":10353.651046852989},{"x":10132,"y":2237,"length":10376.010456818169},{"x":10165,"y":2202,"length":10400.770596451015},{"x":10198,"y":2172,"length":10426.734292193314},{"x":10240,"y":2144,"length":10462.042630385331},{"x":10274,"y":2124,"length":10491.255978194413},{"x":10308,"y":2111,"length":10521.938272010533},{"x":10345,"y":2099,"length":10555.795848726897},{"x":10378,"y":2091,"length":10586.55586109099},{"x":10417,"y":2087,"length":10624.003859186047},{"x":10461,"y":2085,"length":10666.758926684337},{"x":10501,"y":2086,"length":10706.18498812719},{"x":10552,"y":2093,"length":10757.57189146324},{"x":11190,"y":2318,"length":11427.564219902682},{"x":11336,"y":2317,"length":11570.366675261419},{"x":12790,"y":1781,"length":12913.406250869675},{"x":12762,"y":1731,"length":12878.858839198449},{"x":12727,"y":1680,"length":12837.403514729916},{"x":12695,"y":1640,"length":12800.493154562444},{"x":12663,"y":1602,"length":12763.932505305722},{"x":12622,"y":1562,"length":12718.283217478685},{"x":12572,"y":1518,"length":12663.31346844103},{"x":12518,"y":1480,"length":12605.186392909864},{"x":12480,"y":1455,"length":12564.53043292904},{"x":12612,"y":1030,"length":12653.989252405741},{"x":12635,"y":972,"length":12672.332421460542},{"x":12823,"y":680,"length":12841.01744411244},{"x":13409,"y":1289,"length":13470.812967300822},{"x":14465,"y":3380,"length":14854.649945387471},{"x":12235,"y":5180,"length":13286.369895498168},{"x":6946,"y":4046,"length":8038.471994104352},{"x":6666,"y":1860,"length":6920.632630041852},{"x":6643,"y":1191,"length":6748.92065444542},{"x":7083,"y":1191,"length":7182.434823929835},{"x":7078,"y":1148,"length":7170.494264693334},{"x":7066,"y":1102,"length":7151.416642875732},{"x":7050,"y":1054,"length":7128.352965447208},{"x":7018,"y":999,"length":7088.746363074362},{"x":6987,"y":953,"length":7051.69327183195},{"x":6946,"y":911,"length":7005.486207252142},{"x":6904,"y":877,"length":6959.478787955316},{"x":6846,"y":840,"length":6897.341226878659},{"x":6783,"y":810,"length":6831.192355657979},{"x":6718,"y":792,"length":6764.5242256939255},{"x":6667,"y":787,"length":6713.2896556010455},{"x":6614,"y":785,"length":6660.421983628365},{"x":6555,"y":792,"length":6602.672867861924},{"x":6502,"y":805,"length":6551.64322899225},{"x":6454,"y":822,"length":6506.135565756373},{"x":6410,"y":843,"length":6465.195202002798},{"x":6376,"y":867,"length":6434.676759558323},{"x":6339,"y":896,"length":6402.0103873705175},{"x":6310,"y":924,"length":6377.293783416286},{"x":6276,"y":962,"length":6349.30074890141},{"x":6249,"y":999,"length":6328.349073810641},{"x":6226,"y":1041,"length":6312.42877187537},{"x":6206,"y":1088,"length":6300.649172902741},{"x":6189,"y":1138,"length":6292.754961064351},{"x":6181,"y":1190,"length":6294.510386042746},{"x":6633,"y":1190,"length":6738.901171556086},{"x":6657,"y":1862,"length":6912.502658227337},{"x":6553,"y":4033,"length":7694.601874041307},{"x":5,"y":2760,"length":2760.0045289817913}],"y":-1130},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11110,"rotation":0,"y":3100,"width":966,"height":543},"className":"FinishZone"},{"params":{"stretchTexture":false,"x":450,"rotation":0,"y":300,"originOffsetRatio":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"height":484,"wireframe":false,"width":416,"vertices":[{"x":-106,"y":-6,"length":106.16967551989597},{"x":65,"y":-405,"length":410.18288603987367},{"x":95,"y":-405,"length":415.99278839902985},{"x":297,"y":66,"length":304.2449670906653}],"textureMode":true,"smoothing":true,"straightSides":true,"type":2},"className":"frg.game.editor.objects::PillarPather"},{"params":{"x":3640,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":30,"y":0,"length":30},{"x":625,"y":0,"length":625},{"x":625,"y":45,"length":626.6179059043876},{"x":30,"y":45,"length":54.08326913195984}],"y":620},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2949,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":200,"y":0,"length":200},{"x":625,"y":0,"length":625},{"x":625,"y":45,"length":626.6179059043876},{"x":200,"y":45,"length":205}],"y":660},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2370,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":235,"y":0,"length":235},{"x":625,"y":0,"length":625},{"x":625,"y":45,"length":626.6179059043876},{"x":235,"y":45,"length":239.26972228010797}],"y":650},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9813,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":3,"vertices":[{"x":18,"y":5,"length":18.681541692269406},{"x":99,"y":-52,"length":111.8257573191436},{"x":176,"y":-87,"length":196.32880583347927},{"x":255,"y":-110,"length":277.71388153997634},{"x":349,"y":-120,"length":369.0541965619684},{"x":446,"y":-116,"length":460.83836645834947},{"x":540,"y":-100,"length":549.1812087098392},{"x":634,"y":-61,"length":636.9277824055094},{"x":720,"y":-4,"length":720.0111110253786},{"x":800,"y":67,"length":802.8007224710252},{"x":859,"y":147,"length":871.4872345594054},{"x":906,"y":243,"length":938.0218547560605},{"x":930,"y":326,"length":985.4826228807893},{"x":941,"y":418,"length":1029.6625660865795},{"x":934,"y":506,"length":1062.2579724341917},{"x":918,"y":599,"length":1096.1409580888765},{"x":873,"y":703,"length":1120.8648446623706},{"x":820,"y":782,"length":1133.1037022267644},{"x":766,"y":843,"length":1139.0368738543982},{"x":697,"y":904,"length":1141.501204554774},{"x":583,"y":964,"length":1126.5811111500138},{"x":486,"y":994,"length":1106.4501796285272},{"x":378,"y":1002,"length":1070.9285690465074},{"x":266,"y":995,"length":1029.9422313897028},{"x":174,"y":966,"length":981.5457197706075},{"x":86,"y":923,"length":926.9978425001862},{"x":-4,"y":854,"length":854.0093676301215},{"x":-85,"y":760,"length":764.7385174031709},{"x":-125,"y":690,"length":701.2310603502957},{"x":-155,"y":616,"length":635.201542819285},{"x":-183,"y":505,"length":537.1349923436379},{"x":-183,"y":406,"length":445.3369510831096},{"x":-173,"y":321,"length":364.6505176192679},{"x":-156,"y":254,"length":298.0805260328155},{"x":-126,"y":183,"length":222.1823575354263},{"x":-87,"y":121,"length":149.03019828209315},{"x":-43,"y":68,"length":80.45495634204272}],"y":2009},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6419,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":1,"vertices":[{"x":0,"y":0,"length":0},{"x":33,"y":-40,"length":51.85556864985669},{"x":66,"y":-79,"length":102.9417310909429},{"x":109,"y":-124,"length":165.0969412193939},{"x":110,"y":-61,"length":125.78155667664477},{"x":117,"y":2,"length":117.01709276853532},{"x":134,"y":65,"length":148.93287078412206},{"x":173,"y":127,"length":214.61127649776466},{"x":217,"y":170,"length":275.6610237229776},{"x":263,"y":234,"length":352.02982828163863},{"x":287,"y":295,"length":411.57502353762914},{"x":299,"y":352,"length":461.8495426001849},{"x":307,"y":409,"length":511.4000391083286},{"x":306,"y":479,"length":568.3986277252964},{"x":298,"y":547,"length":622.9068951296013},{"x":273,"y":618,"length":675.6130549360337},{"x":235,"y":688,"length":727.0275097958811},{"x":209,"y":727,"length":756.4456358523063},{"x":185,"y":758,"length":780.2493191281874},{"x":156,"y":784,"length":799.3697517419582},{"x":125,"y":803,"length":812.6709051024283},{"x":128,"y":741,"length":751.9740687018402},{"x":123,"y":678,"length":689.0667601909121},{"x":115,"y":634,"length":644.3454042669972},{"x":95,"y":590,"length":597.599364122821},{"x":63,"y":544,"length":547.6358279002571},{"x":20,"y":503,"length":503.3974572840034},{"x":-14,"y":453,"length":453.21628390868744},{"x":-35,"y":396,"length":397.5437082887868},{"x":-48,"y":330,"length":333.47263755816607},{"x":-53,"y":232,"length":237.9768896342668},{"x":-49,"y":166,"length":173.08090593707902},{"x":-39,"y":102,"length":109.20164833920778},{"x":-27,"y":55,"length":61.26989472816156}],"y":-230},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":231,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":-1,"vertices":[{"x":-11,"y":14,"length":17.804493814764857},{"x":47,"y":-31,"length":56.302753041036986},{"x":115,"y":-65,"length":132.09844813622905},{"x":188,"y":-83,"length":205.50669088864237},{"x":271,"y":-82,"length":283.1342437784593},{"x":350,"y":-68,"length":356.5445273735105},{"x":411,"y":-41,"length":413.0399496416781},{"x":471,"y":0,"length":471},{"x":535,"y":65,"length":538.9341332667657},{"x":578,"y":140,"length":594.7133763419148},{"x":594,"y":211,"length":630.3625940678904},{"x":602,"y":285,"length":666.0548025500605},{"x":593,"y":357,"length":692.1690544946372},{"x":566,"y":433,"length":712.6324438306187},{"x":527,"y":497,"length":724.3880175706939},{"x":480,"y":549,"length":729.2468717793721},{"x":420,"y":592,"length":725.8539798058559},{"x":351,"y":624,"length":715.944830276747},{"x":272,"y":641,"length":696.3224827621179},{"x":187,"y":638,"length":664.8405823955093},{"x":108,"y":622,"length":631.3065816225901},{"x":42,"y":585,"length":586.5057544474735},{"x":-17,"y":533,"length":533.2710380285057},{"x":-68,"y":474,"length":478.85279575251514},{"x":-105,"y":395,"length":408.71750635371615},{"x":-125,"y":303,"length":327.77126170547655},{"x":-120,"y":220,"length":250.59928172283335},{"x":-97,"y":138,"length":168.6801707374047},{"x":-61,"y":67,"length":90.60905032059435}],"y":-989},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2780,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":385,"y":0,"length":385},{"x":385,"y":70,"length":391.3118960624632},{"x":0,"y":70,"length":70}],"y":640},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":3359,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":385,"y":0,"length":385},{"x":385,"y":70,"length":391.3118960624632},{"x":0,"y":70,"length":70}],"y":650},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4050,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":385,"y":0,"length":385},{"x":385,"y":70,"length":391.3118960624632},{"x":0,"y":70,"length":70}],"y":610},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-130,"physic":false,"lineId":-1,"y":450,"height":1328,"isRoad":false,"direction":90,"width":15793,"textureMode":true,"cameraOffsetY":120,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":-35,"y":-435,"length":436.4057744805859},{"x":710,"y":-125,"length":720.91955168382},{"x":1425,"y":-90,"length":1427.8392766694717},{"x":1925,"y":-95,"length":1927.342730289556},{"x":4675,"y":-5,"length":4675.002673796027},{"x":5170,"y":-5,"length":5170.002417794406},{"x":5895,"y":15,"length":5895.019083938575},{"x":6265,"y":-215,"length":6268.688060511546},{"x":7145,"y":-210,"length":7148.085407995626},{"x":8155,"y":510,"length":8170.9317094196795},{"x":8360,"y":625,"length":8383.330185552755},{"x":10375,"y":880,"length":10412.253598525152},{"x":11400,"y":820,"length":11429.453180270699},{"x":15745,"y":75,"length":15745.178627122654}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":100,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.4,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":75,"y":0,"length":75},{"x":155,"y":0,"length":155},{"x":240,"y":0,"length":240},{"x":315,"y":0,"length":315},{"x":395,"y":0,"length":395},{"x":475,"y":0,"length":475},{"x":565,"y":0,"length":565},{"x":650,"y":0,"length":650},{"x":740,"y":0,"length":740},{"x":740,"y":45,"length":741.3669806512831},{"x":670,"y":45,"length":671.5094936037763},{"x":600,"y":45,"length":601.6851336039474},{"x":535,"y":45,"length":536.8891878218446},{"x":485,"y":45,"length":487.08315511830216},{"x":460,"y":75,"length":466.074028454708},{"x":400,"y":75,"length":406.97051490249265},{"x":370,"y":45,"length":372.7264412407577},{"x":275,"y":45,"length":278.65749586185547},{"x":185,"y":45,"length":190.3943276465977},{"x":95,"y":45,"length":105.11898020814318},{"x":0,"y":45,"length":45}],"y":-170},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8583,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":310,"y":0,"length":310},{"x":460,"y":35,"length":461.3296001775737},{"x":600,"y":80,"length":605.3098380168623},{"x":715,"y":100,"length":721.959140118054},{"x":1085,"y":133,"length":1093.1212192616151},{"x":1205,"y":153,"length":1214.674441980237},{"x":1298,"y":187,"length":1311.4011590661341},{"x":1381,"y":221,"length":1398.571413979279},{"x":1441,"y":251,"length":1462.6968243624515},{"x":1520,"y":278,"length":1545.2132538908668},{"x":1611,"y":316,"length":1641.6994243770691},{"x":1670,"y":318,"length":1700.0070588088745},{"x":1710,"y":302,"length":1736.4630718791575},{"x":1745,"y":255,"length":1763.53338499729},{"x":1749,"y":195,"length":1759.8369242631545},{"x":1755,"y":143,"length":1760.8162879755514},{"x":1764,"y":100,"length":1766.8321935033898},{"x":1784,"y":60,"length":1785.0086834522683},{"x":1821,"y":36,"length":1821.3558136728802},{"x":1868,"y":13,"length":1868.045234998339},{"x":1921,"y":5,"length":1921.0065070165692},{"x":1968,"y":3,"length":1968.0022865840374},{"x":2037,"y":20,"length":2037.0981812372224},{"x":2113,"y":50,"length":2113.5914931698603},{"x":2191,"y":83,"length":2192.5715495736963},{"x":2257,"y":119,"length":2260.134951723016},{"x":2339,"y":148,"length":2343.6776655504486},{"x":2424,"y":170,"length":2429.953909027906},{"x":2518,"y":185,"length":2524.7869217025027},{"x":2605,"y":186,"length":2611.6318653286494},{"x":2672,"y":183,"length":2678.259322769175},{"x":2752,"y":172,"length":2757.3697612036003},{"x":2849,"y":147,"length":2852.789862573127},{"x":3552,"y":-129,"length":3554.3417112033558},{"x":3560,"y":-106,"length":3561.5777402718586},{"x":3557,"y":-75,"length":3557.790606542212},{"x":3546,"y":-38,"length":3546.2036038558194},{"x":3513,"y":0,"length":3513},{"x":3466,"y":40,"length":3466.2308059331535},{"x":3423,"y":56,"length":3423.4580470629403},{"x":3386,"y":70,"length":3386.7234903369363},{"x":3336,"y":106,"length":3337.6836279072345},{"x":3291,"y":151,"length":3294.4623233541465},{"x":3240,"y":183,"length":3245.1639403888366},{"x":3176,"y":196,"length":3182.042111600662},{"x":3118,"y":211,"length":3125.1311972459653},{"x":3066,"y":224,"length":3074.171758376555},{"x":2994,"y":253,"length":3004.6705310233265},{"x":2937,"y":296,"length":2951.878215645083},{"x":2889,"y":351,"length":2910.2443196405347},{"x":2770,"y":480,"length":2811.2808468738945},{"x":2732,"y":505,"length":2778.2816631867977},{"x":2687,"y":517,"length":2736.28543832693},{"x":2642,"y":520,"length":2692.687133701203},{"x":2600,"y":512,"length":2649.932829337378},{"x":2550,"y":490,"length":2596.6516901579234},{"x":2480,"y":444,"length":2519.4316819473397},{"x":2400,"y":412,"length":2435.1065685098874},{"x":2272,"y":390,"length":2305.229706558546},{"x":2120,"y":407,"length":2158.7146638682934},{"x":1967,"y":450,"length":2017.8178807811175},{"x":1888,"y":492,"length":1951.0530489968744},{"x":1804,"y":508,"length":1874.1611456862508},{"x":1728,"y":496,"length":1797.7764043395387},{"x":1628,"y":484,"length":1698.4227977744529},{"x":1540,"y":488,"length":1615.4702101864955},{"x":1448,"y":520,"length":1538.5395672520092},{"x":1372,"y":564,"length":1483.4014965611973},{"x":1252,"y":652,"length":1411.5976763936671},{"x":1172,"y":728,"length":1379.698517792927},{"x":1108,"y":800,"length":1366.6250400164633},{"x":1040,"y":912,"length":1383.236783779263},{"x":988,"y":1011,"length":1413.6000141482739},{"x":940,"y":1120,"length":1462.190138114739},{"x":905,"y":1247,"length":1540.7900570811066},{"x":892,"y":1372,"length":1636.4742588870745},{"x":900,"y":1504,"length":1752.7167483652343},{"x":925,"y":1600,"length":1848.140957827622},{"x":967,"y":1721,"length":1974.0643353244595},{"x":1024,"y":1808,"length":2077.845037532876},{"x":1104,"y":1898,"length":2195.7276698170017},{"x":1204,"y":1984,"length":2320.748155229257},{"x":1311,"y":2044,"length":2428.303317133179},{"x":1447,"y":2094,"length":2545.3182512212497},{"x":1571,"y":2105,"length":2626.6073174344124},{"x":1695,"y":2102,"length":2700.264616662597},{"x":4394,"y":2105,"length":4872.192627554867},{"x":6013,"y":3633,"length":7025.301274678546},{"x":-46,"y":3960,"length":3960.2671627050618}],"y":1064},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":20,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-554,"y":-1780,"length":1864.2199441053085},{"x":2135,"y":-2025,"length":2942.5923944712426},{"x":12285,"y":-1540,"length":12381.147967777462},{"x":15740,"y":-613,"length":15751.93223068205},{"x":17040,"y":4906,"length":17732.186441609505},{"x":13723,"y":3568,"length":14179.257843766012},{"x":11957,"y":3145,"length":12363.69176257642},{"x":10560,"y":3145,"length":11018.376695321322},{"x":10623,"y":3077,"length":11059.659036335614},{"x":10686,"y":3000,"length":11099.125911530151},{"x":10726,"y":2874,"length":11104.36634842349},{"x":10748,"y":2737,"length":11091.017671972217},{"x":10740,"y":2628,"length":11056.852354987834},{"x":10780,"y":2602,"length":11089.580875759011},{"x":11131,"y":2440,"length":11395.295564398495},{"x":11253,"y":2382,"length":11502.3446740219},{"x":11388,"y":2304,"length":11618.733149530546},{"x":11582,"y":2197,"length":11788.533963135535},{"x":11744,"y":2102,"length":11930.630327019608},{"x":11880,"y":2011,"length":12049.004979665333},{"x":12050,"y":1878,"length":12195.465714764649},{"x":12304,"y":1648,"length":12413.876107002196},{"x":12473,"y":1460,"length":12558.157866502555},{"x":12560,"y":1328,"length":12630.011243067047},{"x":12590,"y":1232,"length":12650.135335244442},{"x":12607,"y":1120,"length":12656.652361505392},{"x":12612,"y":1020,"length":12653.179205243241},{"x":13223,"y":751,"length":13244.309344016396},{"x":13211,"y":468,"length":13219.28685671054},{"x":13091,"y":385,"length":13096.660108592572},{"x":12900,"y":282,"length":12903.08195742397},{"x":12397,"y":154,"length":12397.956484840555},{"x":12246,"y":122,"length":12246.607693561511},{"x":12131,"y":71,"length":12131.207771693633},{"x":12046,"y":71,"length":12046.209237764384},{"x":11963,"y":91,"length":11963.346103828979},{"x":11820,"y":156,"length":11821.029396799586},{"x":11710,"y":255,"length":11712.776144023244},{"x":11604,"y":364,"length":11609.70766212483},{"x":11512,"y":460,"length":11521.186744428718},{"x":11428,"y":532,"length":11440.376217590048},{"x":11340,"y":600,"length":11355.861922372957},{"x":11220,"y":644,"length":11238.466799345897},{"x":11056,"y":664,"length":11075.92127093724},{"x":10900,"y":684,"length":10921.440198069118},{"x":10748,"y":632,"length":10766.565283320397},{"x":10444,"y":456,"length":10453.950066840764},{"x":10268,"y":388,"length":10275.328121281578},{"x":10092,"y":344,"length":10097.861159671389},{"x":9988,"y":353,"length":9994.235988808749},{"x":9880,"y":404,"length":9888.256469165835},{"x":9791,"y":473,"length":9802.418579105874},{"x":9733,"y":542,"length":9748.079451871532},{"x":9657,"y":637,"length":9677.98625748146},{"x":9588,"y":706,"length":9613.957561795247},{"x":9522,"y":757,"length":9552.043393955033},{"x":9462,"y":797,"length":9495.506990150658},{"x":9411,"y":822,"length":9446.830420834282},{"x":9352,"y":830,"length":9388.75944946935},{"x":9300,"y":800,"length":9334.345183246653},{"x":9265,"y":770,"length":9296.941701441394},{"x":9270,"y":702,"length":9296.542583132721},{"x":9293,"y":646,"length":9315.426184560747},{"x":9315,"y":587,"length":9333.47705841719},{"x":9328,"y":541,"length":9343.675133479332},{"x":9335,"y":488,"length":9347.746733839123},{"x":9337,"y":441,"length":9347.40873183579},{"x":9335,"y":393,"length":9343.268914036456},{"x":9324,"y":348,"length":9330.491948445162},{"x":9310,"y":304,"length":9314.96194302478},{"x":9286,"y":256,"length":9289.528082739187},{"x":9245,"y":193,"length":9247.014328960457},{"x":9200,"y":154,"length":9201.288822768254},{"x":9138,"y":113,"length":9138.69864915131},{"x":9064,"y":79,"length":9064.344267513232},{"x":8989,"y":65,"length":8989.235006384024},{"x":8898,"y":67,"length":8898.252244120753},{"x":8821,"y":83,"length":8821.39047996403},{"x":8748,"y":115,"length":8748.755854405814},{"x":8691,"y":156,"length":8692.39995628365},{"x":8646,"y":204,"length":8648.406327179591},{"x":8605,"y":261,"length":8608.957312009394},{"x":8578,"y":319,"length":8583.929461499552},{"x":8564,"y":375,"length":8572.206308763223},{"x":8555,"y":431,"length":8565.84998701238},{"x":8555,"y":494,"length":8569.250900749726},{"x":8565,"y":552,"length":8582.769308329334},{"x":8587,"y":617,"length":8609.138052093253},{"x":8620,"y":673,"length":8646.232069520225},{"x":8657,"y":716,"length":8686.55886988628},{"x":8706,"y":763,"length":8739.370972787458},{"x":8705,"y":791,"length":8740.864144922973},{"x":8691,"y":840,"length":8731.49935578077},{"x":8665,"y":874,"length":8708.96670105013},{"x":8622,"y":876,"length":8666.386790352713},{"x":8568,"y":871,"length":8612.15797579213},{"x":8500,"y":857,"length":8543.093643405766},{"x":8399,"y":793,"length":8436.352884985312},{"x":8334,"y":765,"length":8369.037041380567},{"x":8294,"y":757,"length":8328.474350083574},{"x":8257,"y":748,"length":8290.811359571511},{"x":8220,"y":736,"length":8252.884101936728},{"x":8200,"y":722,"length":8231.72424222289},{"x":8187,"y":686,"length":8215.690171860182},{"x":8174,"y":633,"length":8198.473333493255},{"x":8156,"y":593,"length":8177.529272341371},{"x":8135,"y":557,"length":8154.046480122614},{"x":8109,"y":522,"length":8125.783962178665},{"x":8013,"y":483,"length":8027.543709005888},{"x":7907,"y":463,"length":7920.544046970511},{"x":7820,"y":473,"length":7834.291863340298},{"x":7765,"y":464,"length":7778.850879146611},{"x":7711,"y":450,"length":7724.119432012946},{"x":7652,"y":415,"length":7663.245330798173},{"x":7601,"y":345,"length":7608.82553354984},{"x":7537,"y":277,"length":7542.088437561575},{"x":7494,"y":250,"length":7498.1688431243},{"x":7444,"y":227,"length":7447.46030536585},{"x":7374,"y":207,"length":7376.904838751819},{"x":7308,"y":192,"length":7310.521732407339},{"x":7222,"y":181,"length":7224.267782965966},{"x":7097,"y":142,"length":7098.420458101929},{"x":7011,"y":97,"length":7011.670984865163},{"x":6955,"y":50,"length":6955.179724493106},{"x":6867,"y":-38,"length":6867.105139722269},{"x":6782,"y":-97,"length":6782.693638960852},{"x":6691,"y":-135,"length":6692.3617654756235},{"x":6604,"y":-154,"length":6605.795334401452},{"x":6520,"y":-161,"length":6521.9875038212085},{"x":6435,"y":-152,"length":6436.7949322624845},{"x":6357,"y":-136,"length":6358.454607843009},{"x":6289,"y":-113,"length":6290.0151033205},{"x":6233,"y":-82,"length":6233.539363796462},{"x":6173,"y":-42,"length":6173.142878631597},{"x":6126,"y":1,"length":6126.000081619327},{"x":6080,"y":42,"length":6080.145064058916},{"x":6040,"y":95,"length":6040.747056449227},{"x":5989,"y":149,"length":5990.853194662677},{"x":5934,"y":178,"length":5936.669099756193},{"x":5832,"y":220,"length":5836.1480447295025},{"x":5748,"y":232,"length":5752.68007106253},{"x":5686,"y":266,"length":5692.218548158529},{"x":5636,"y":316,"length":5644.851813821157},{"x":5602,"y":382,"length":5615.009171853595},{"x":5565,"y":427,"length":5581.3577201250955},{"x":5538,"y":444,"length":5555.769973640017},{"x":5517,"y":451,"length":5535.403327671796},{"x":5482,"y":446,"length":5500.11272611753},{"x":5453,"y":434,"length":5470.24359603848},{"x":5423,"y":415,"length":5438.855945876853},{"x":5393,"y":398,"length":5407.666132445678},{"x":5357,"y":389,"length":5371.105100442553},{"x":5325,"y":385,"length":5338.899699376268},{"x":5297,"y":388,"length":5311.191297628056},{"x":5256,"y":398,"length":5271.047334259103},{"x":5215,"y":400,"length":5230.317867969403},{"x":5185,"y":400,"length":5200.406234132099},{"x":5156,"y":383,"length":5170.205508488033},{"x":5132,"y":362,"length":5144.751500315637},{"x":5119,"y":334,"length":5129.884696559953},{"x":5114,"y":299,"length":5122.733352420366},{"x":5119,"y":245,"length":5124.859607833175},{"x":5122,"y":187,"length":5125.412471206586},{"x":5115,"y":138,"length":5116.861244943037},{"x":5098,"y":107,"length":5099.122767692498},{"x":5075,"y":75,"length":5075.554156936954},{"x":5039,"y":27,"length":5039.07233526172},{"x":5000,"y":-10,"length":5000.00999999},{"x":4972,"y":-39,"length":4972.152954204043},{"x":4947,"y":-105,"length":4948.114186232973},{"x":4914,"y":-145,"length":4916.13883042373},{"x":4880,"y":-174,"length":4883.101063873243},{"x":4850,"y":-196,"length":4853.958796693684},{"x":4751,"y":-222,"length":4756.1838694482785},{"x":4648,"y":-222,"length":4653.298614961219},{"x":4553,"y":-224,"length":4558.5068827413215},{"x":4426,"y":-248,"length":4432.94258929664},{"x":4284,"y":-282,"length":4293.271479885706},{"x":4142,"y":-322,"length":4154.497322179905},{"x":4035,"y":-357,"length":4050.762150509457},{"x":3882,"y":-400,"length":3902.5535230154114},{"x":3771,"y":-417,"length":3793.9860305488737},{"x":3628,"y":-437,"length":3654.223994229144},{"x":3500,"y":-448,"length":3528.5555118206657},{"x":3366,"y":-457,"length":3396.881658227145},{"x":3237,"y":-453,"length":3268.5437124199516},{"x":3106,"y":-448,"length":3138.142762845566},{"x":2971,"y":-440,"length":3003.4049011080742},{"x":2860,"y":-431,"length":2892.2933806929063},{"x":2742,"y":-413,"length":2772.928596267852},{"x":2645,"y":-370,"length":2670.753638956615},{"x":2582,"y":-320,"length":2601.7540237309136},{"x":2541,"y":-272,"length":2555.5165818284177},{"x":2497,"y":-221,"length":2506.7608581593895},{"x":2438,"y":-171,"length":2443.9895662625077},{"x":2377,"y":-137,"length":2380.9447704640274},{"x":2321,"y":-120,"length":2324.100040876038},{"x":2242,"y":-101,"length":2244.273824647964},{"x":2152,"y":-77,"length":2153.377115137987},{"x":2050,"y":-52,"length":2050.6594061423266},{"x":1951,"y":-20,"length":1951.1025088395536},{"x":1880,"y":25,"length":1880.1662160564422},{"x":1817,"y":71,"length":1818.3866475532645},{"x":1768,"y":120,"length":1772.0677187963217},{"x":1708,"y":201,"length":1719.7863239367848},{"x":1655,"y":260,"length":1675.2984808684093},{"x":1590,"y":301,"length":1618.24009343484},{"x":1512,"y":324,"length":1546.324674833846},{"x":1417,"y":340,"length":1457.2196128243677},{"x":1317,"y":357,"length":1364.528489992056},{"x":1268,"y":375,"length":1322.2893026868212},{"x":1228,"y":396,"length":1290.271289303145},{"x":1188,"y":400,"length":1253.53260827152},{"x":1152,"y":392,"length":1216.868111177214},{"x":1111,"y":377,"length":1173.2220591175399},{"x":1089,"y":347,"length":1142.9479428215443},{"x":1064,"y":310,"length":1108.2400461993782},{"x":1039,"y":289,"length":1078.444249833991},{"x":1005,"y":273,"length":1041.4192239439408},{"x":967,"y":257,"length":1000.5688382115445},{"x":934,"y":242,"length":964.841955969992},{"x":900,"y":225,"length":927.6987657639736},{"x":867,"y":196,"length":888.8785068838148},{"x":845,"y":180,"length":863.958911060011},{"x":835,"y":145,"length":847.4963126763444},{"x":850,"y":120,"length":858.4287972802404},{"x":879,"y":106,"length":885.3682849526518},{"x":920,"y":100,"length":925.418824100742},{"x":964,"y":84,"length":967.6528303064069},{"x":1002,"y":61,"length":1003.855069220652},{"x":1039,"y":30,"length":1039.4330185250033},{"x":1081,"y":-10,"length":1081.0462524795134},{"x":1116,"y":-51,"length":1117.1647148026113},{"x":1142,"y":-93,"length":1145.7805199949944},{"x":1166,"y":-146,"length":1175.1051016823985},{"x":1175,"y":-191,"length":1190.4226140325125},{"x":1181,"y":-234,"length":1203.958886341224},{"x":1180,"y":-290,"length":1215.1131634543344},{"x":1175,"y":-344,"length":1224.3206279402466},{"x":1158,"y":-395,"length":1223.5150182976913},{"x":1141,"y":-432,"length":1220.043032027969},{"x":1122,"y":-464,"length":1214.1581445594309},{"x":1098,"y":-494,"length":1204.0099667361562},{"x":1064,"y":-528,"length":1187.8046977512759},{"x":1026,"y":-562,"length":1169.8375955661538},{"x":983,"y":-586,"length":1144.414697563781},{"x":932,"y":-607,"length":1112.2378342782627},{"x":881,"y":-619,"length":1076.718161823232},{"x":830,"y":-622,"length":1037.2000771307337},{"x":784,"y":-620,"length":999.5278885553919},{"x":764,"y":-654,"length":1005.6898130139332},{"x":737,"y":-686,"length":1006.8589772157767},{"x":704,"y":-722,"length":1008.4145972763386},{"x":668,"y":-750,"length":1004.352527751088},{"x":629,"y":-774,"length":997.3550019927709},{"x":582,"y":-797,"length":986.8804385537287},{"x":524,"y":-813,"length":967.2357520273948},{"x":461,"y":-820,"length":940.7023971480035},{"x":406,"y":-816,"length":911.4230631271079},{"x":351,"y":-807,"length":880.0284086323577},{"x":299,"y":-789,"length":843.7547036905928},{"x":259,"y":-769,"length":811.444391193876},{"x":217,"y":-743,"length":774.0400506433759},{"x":177,"y":-705,"length":726.8796324014039},{"x":148,"y":-668,"length":684.1988015189737},{"x":118,"y":-626,"length":637.0243323453194},{"x":96,"y":-583,"length":590.8510810686564},{"x":81,"y":-536,"length":542.0857865688788},{"x":72,"y":-488,"length":493.28288030297585},{"x":71,"y":-436,"length":441.74313803385786},{"x":74,"y":-391,"length":397.9409503933969},{"x":83,"y":-341,"length":350.9558376776201},{"x":99,"y":-294,"length":310.2208890452092},{"x":118,"y":-253,"length":279.1648258645777},{"x":152,"y":-204,"length":254.40125785852553},{"x":190,"y":-165,"length":251.6445906432324},{"x":165,"y":-135,"length":213.19005605327843},{"x":141,"y":-91,"length":167.8153747426022},{"x":120,"y":-53,"length":131.18307817702708},{"x":103,"y":1,"length":103.00485425454472},{"x":96,"y":50,"length":108.24047302187847},{"x":93,"y":100,"length":136.56134152826706},{"x":65,"y":100,"length":119.26860441876563},{"x":80,"y":265,"length":276.81221071332817},{"x":85,"y":1345,"length":1347.6831971943554},{"x":-550,"y":1345,"length":1453.1087364681282}],"y":-270},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8764,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":1,"vertices":[{"x":0,"y":0,"length":0},{"x":12,"y":-9,"length":15},{"x":23,"y":-12,"length":25.942243542145693},{"x":38,"y":-10,"length":39.293765408777},{"x":49,"y":-3,"length":49.09175083453431},{"x":55,"y":7,"length":55.44366510251645},{"x":58,"y":20,"length":61.35144660071187},{"x":55,"y":34,"length":64.66065264130884},{"x":46,"y":45,"length":64.35060217278468},{"x":35,"y":51,"length":61.85466837676846},{"x":22,"y":52,"length":56.462376853972415},{"x":10,"y":47,"length":48.05205510693585},{"x":0,"y":40,"length":40},{"x":-5,"y":27,"length":27.459060435491963},{"x":-5,"y":13,"length":13.92838827718412}],"y":983},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8694,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":1,"vertices":[{"x":0,"y":0,"length":0},{"x":12,"y":-9,"length":15},{"x":23,"y":-12,"length":25.942243542145693},{"x":38,"y":-10,"length":39.293765408777},{"x":49,"y":-3,"length":49.09175083453431},{"x":55,"y":7,"length":55.44366510251645},{"x":58,"y":20,"length":61.35144660071187},{"x":55,"y":34,"length":64.66065264130884},{"x":46,"y":45,"length":64.35060217278468},{"x":35,"y":51,"length":61.85466837676846},{"x":22,"y":52,"length":56.462376853972415},{"x":10,"y":47,"length":48.05205510693585},{"x":0,"y":40,"length":40},{"x":-5,"y":27,"length":27.459060435491963},{"x":-5,"y":13,"length":13.92838827718412}],"y":983},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8834,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":1,"vertices":[{"x":0,"y":0,"length":0},{"x":12,"y":-9,"length":15},{"x":23,"y":-12,"length":25.942243542145693},{"x":38,"y":-10,"length":39.293765408777},{"x":49,"y":-3,"length":49.09175083453431},{"x":55,"y":7,"length":55.44366510251645},{"x":58,"y":20,"length":61.35144660071187},{"x":55,"y":34,"length":64.66065264130884},{"x":46,"y":45,"length":64.35060217278468},{"x":35,"y":51,"length":61.85466837676846},{"x":22,"y":52,"length":56.462376853972415},{"x":10,"y":47,"length":48.05205510693585},{"x":0,"y":40,"length":40},{"x":-5,"y":27,"length":27.459060435491963},{"x":-5,"y":13,"length":13.92838827718412}],"y":983},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8904,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":1,"vertices":[{"x":0,"y":0,"length":0},{"x":12,"y":-9,"length":15},{"x":23,"y":-12,"length":25.942243542145693},{"x":38,"y":-10,"length":39.293765408777},{"x":49,"y":-3,"length":49.09175083453431},{"x":55,"y":7,"length":55.44366510251645},{"x":58,"y":20,"length":61.35144660071187},{"x":55,"y":34,"length":64.66065264130884},{"x":46,"y":45,"length":64.35060217278468},{"x":35,"y":51,"length":61.85466837676846},{"x":22,"y":52,"length":56.462376853972415},{"x":10,"y":47,"length":48.05205510693585},{"x":0,"y":40,"length":40},{"x":-5,"y":27,"length":27.459060435491963},{"x":-5,"y":13,"length":13.92838827718412}],"y":983},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1700,"bg":true,"rotation":0,"y":350,"vertices":[{"x":0,"y":0,"length":0},{"x":3235,"y":0,"length":3235},{"x":3255,"y":590,"length":3308.0394495833934},{"x":20,"y":590,"length":590.3388857258177}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":8624,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":true,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":1,"vertices":[{"x":0,"y":0,"length":0},{"x":12,"y":-9,"length":15},{"x":23,"y":-12,"length":25.942243542145693},{"x":38,"y":-10,"length":39.293765408777},{"x":49,"y":-3,"length":49.09175083453431},{"x":55,"y":7,"length":55.44366510251645},{"x":58,"y":20,"length":61.35144660071187},{"x":55,"y":34,"length":64.66065264130884},{"x":46,"y":45,"length":64.35060217278468},{"x":35,"y":51,"length":61.85466837676846},{"x":22,"y":52,"length":56.462376853972415},{"x":10,"y":47,"length":48.05205510693585},{"x":0,"y":40,"length":40},{"x":-5,"y":27,"length":27.459060435491963},{"x":-5,"y":13,"length":13.92838827718412}],"y":983},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8680,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":6,"rem":true,"safeId":1,"vertices":[{"x":-85,"y":0,"length":85},{"x":11,"y":1,"length":11.045361017187261},{"x":47,"y":-4,"length":47.16990566028302},{"x":79,"y":-13,"length":80.06247560499239},{"x":106,"y":-28,"length":109.63576058932597},{"x":125,"y":-42,"length":131.86735759845953},{"x":147,"y":-60,"length":158.7734234687909},{"x":169,"y":-81,"length":187.40864441108366},{"x":187,"y":-107,"length":215.44836968517538},{"x":202,"y":-142,"length":246.9169900999119},{"x":222,"y":-142,"length":263.52988445335757},{"x":248,"y":-123,"length":276.82666056577716},{"x":263,"y":-101,"length":281.7268180347764},{"x":273,"y":-81,"length":284.76305940202286},{"x":281,"y":-59,"length":287.1271495348359},{"x":283,"y":-38,"length":285.53983960211224},{"x":280,"y":-18,"length":280.5779749018087},{"x":277,"y":-7,"length":277.0884335370208},{"x":289,"y":0,"length":289},{"x":289,"y":34,"length":290.9931270666027},{"x":265,"y":35,"length":267.30132809247317},{"x":255,"y":70,"length":264.43335644354704},{"x":245,"y":70,"length":254.80384612481814},{"x":235,"y":35,"length":237.59208741033444},{"x":195,"y":35,"length":198.11612756158948},{"x":185,"y":70,"length":197.80040444852483},{"x":175,"y":70,"length":188.48076824970764},{"x":165,"y":35,"length":168.67127793433},{"x":125,"y":35,"length":129.80754985747168},{"x":115,"y":70,"length":134.6291201783626},{"x":105,"y":70,"length":126.19429464123962},{"x":95,"y":35,"length":101.24228365658294},{"x":55,"y":35,"length":65.19202405202648},{"x":45,"y":70,"length":83.21658488546619},{"x":35,"y":70,"length":78.26237921249263},{"x":25,"y":35,"length":43.01162633521314},{"x":-15,"y":35,"length":38.07886552931954},{"x":-25,"y":70,"length":74.33034373659252},{"x":-35,"y":70,"length":78.26237921249263},{"x":-45,"y":35,"length":57.0087712549569},{"x":-85,"y":35,"length":91.92388155425118}],"y":943},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":8586,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":1053,"density":"1","height":384,"action":0,"isStatic":true,"wireframe":false,"width":2109.8,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":-1,"y":-7,"length":7.0710678118654755},{"x":304,"y":-8,"length":304.1052449399714},{"x":345,"y":-2,"length":345.0057970527452},{"x":390,"y":9,"length":390.10383233185496},{"x":602,"y":75,"length":606.6539375953971},{"x":720,"y":94,"length":726.1101844761579},{"x":851,"y":105,"length":857.4532057202889},{"x":956,"y":112,"length":962.5383109258561},{"x":1048,"y":122,"length":1055.0772483567257},{"x":1113,"y":131,"length":1120.6828275654088},{"x":1176,"y":145,"length":1184.905481462551},{"x":1237,"y":160,"length":1247.3046941305079},{"x":1373,"y":212,"length":1389.2706719714486},{"x":1453,"y":250,"length":1474.3503654152225},{"x":1508,"y":268,"length":1531.6291979457692},{"x":1569,"y":290,"length":1595.5754447847335},{"x":1611,"y":312,"length":1640.9341851518604},{"x":1656,"y":312,"length":1685.135009428028},{"x":1697,"y":299,"length":1723.1395764708093},{"x":1722,"y":262,"length":1741.8174416396225},{"x":1728,"y":215,"length":1741.323921618261},{"x":1734,"y":168,"length":1742.1193988931986},{"x":1741,"y":128,"length":1745.699000400699},{"x":1759,"y":88,"length":1761.1998750851649},{"x":1801,"y":35,"length":1801.3400567355404},{"x":1861,"y":10,"length":1861.0268670817195},{"x":1923,"y":-2,"length":1923.0010400413205},{"x":1978,"y":5,"length":1978.0063195045661},{"x":2030,"y":22,"length":2030.1192083225064},{"x":2090,"y":47,"length":2090.528402103162}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":12933,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":3,"vertices":[{"x":3,"y":3,"length":4.242640687119285},{"x":40,"y":-25,"length":47.16990566028302},{"x":90,"y":-40,"length":98.48857801796105},{"x":141,"y":-39,"length":146.2942240828393},{"x":196,"y":-22,"length":197.2308292331602},{"x":237,"y":5,"length":237.05273674859777},{"x":269,"y":41,"length":272.10659675943174},{"x":289,"y":90,"length":302.6896099967754},{"x":296,"y":141,"length":327.8673512260713},{"x":285,"y":199,"length":347.60034522422444},{"x":256,"y":242,"length":352.27829907617075},{"x":221,"y":280,"length":356.70856451731015},{"x":175,"y":304,"length":350.7720057245162},{"x":127,"y":310,"length":335.00597009605667},{"x":76,"y":308,"length":317.23808094237364},{"x":29,"y":286,"length":287.4665197896966},{"x":-6,"y":258,"length":258.0697580112788},{"x":-32,"y":228,"length":230.23466289853056},{"x":-50,"y":192,"length":198.40362899906847},{"x":-57,"y":150,"length":160.46494944379597},{"x":-56,"y":109,"length":122.54386969571347},{"x":-44,"y":65,"length":78.49203781276162},{"x":-24,"y":32,"length":40}],"y":209},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9360,"physic":false,"lineId":-1,"y":3400,"height":2538.5,"isRoad":false,"direction":90,"width":3938,"textureMode":true,"cameraOffsetY":120,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":-120,"y":-150,"length":192.09372712298546},{"x":870,"y":-190,"length":890.5054744357275},{"x":1380,"y":-380,"length":1431.3629868066312},{"x":2885,"y":-1895,"length":3451.702478487971},{"x":3345,"y":-2410,"length":4122.75696591492},{"x":3805,"y":-2500,"length":4552.804081003267}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":11620,"rotation":0,"y":130,"originOffsetRatio":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"height":859.05,"wireframe":false,"width":965,"vertices":[{"x":-54,"y":18,"length":56.92099788303083},{"x":633,"y":615,"length":882.5610460472409},{"x":898,"y":-227,"length":926.2467273896302}],"textureMode":true,"smoothing":true,"straightSides":true,"type":2},"className":"frg.game.editor.objects::PillarPather"},{"params":{"x":-160,"physic":true,"lineId":0,"y":350,"height":1245,"isRoad":true,"direction":90,"width":8561,"textureMode":true,"cameraOffsetY":170,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":false,"line":true,"wireframe":false,"vertices":[{"x":248,"y":-518,"length":574.306538357348},{"x":249,"y":-470,"length":531.884385933635},{"x":250,"y":-415,"length":484.48426187029025},{"x":257,"y":-345,"length":430.20227800419656},{"x":274,"y":-286,"length":396.0707007593468},{"x":309,"y":-221,"length":379.8973545577805},{"x":345,"y":-164,"length":381.9960732782472},{"x":410,"y":-129,"length":429.81507651547076},{"x":483,"y":-115,"length":496.5017623332268},{"x":541,"y":-62,"length":544.5410911951457},{"x":590,"y":-33,"length":590.9221606946214},{"x":638,"y":-20,"length":638.3134026479469},{"x":688,"y":-7,"length":688.0356095435759},{"x":747,"y":1,"length":747.000669343743},{"x":1435,"y":0,"length":1435},{"x":1504,"y":-2,"length":1504.0013297866462},{"x":1570,"y":-10,"length":1570.0318468107582},{"x":1627,"y":-19,"length":1627.1109365989769},{"x":1690,"y":-40,"length":1690.4733065032408},{"x":1780,"y":-90,"length":1782.2738285684386},{"x":1810,"y":-100,"length":1812.7603261324978},{"x":1840,"y":-90,"length":1842.199772011711},{"x":2750,"y":415,"length":2781.137357269504},{"x":2790,"y":420,"length":2821.4358046923558},{"x":4575,"y":400,"length":4592.45304820855},{"x":4645,"y":365,"length":4659.318619712543},{"x":4680,"y":305,"length":4689.928037827446},{"x":4720,"y":-10,"length":4720.010593208452},{"x":4730,"y":-70,"length":4730.517942043979},{"x":4760,"y":-130,"length":4761.774879181081},{"x":4800,"y":-160,"length":4802.665926337163},{"x":4865,"y":-170,"length":4867.969289138952},{"x":4935,"y":-155,"length":4937.433543856565},{"x":5040,"y":-95,"length":5040.895257789037},{"x":5170,"y":-10,"length":5170.009671170838},{"x":5285,"y":40,"length":5285.151369639284},{"x":5410,"y":80,"length":5410.591464895497},{"x":5515,"y":95,"length":5515.818162340017},{"x":5622,"y":99,"length":5622.871597324627},{"x":5708,"y":93,"length":5708.757570610263},{"x":5775,"y":79,"length":5775.540321043564},{"x":5849,"y":58,"length":5849.287563455912},{"x":5913,"y":34,"length":5913.097749910786},{"x":5980,"y":2,"length":5980.000334448151},{"x":6038,"y":-35,"length":6038.101440022352},{"x":6078,"y":-63,"length":6078.32649666008},{"x":6116,"y":-96,"length":6116.753387214495},{"x":6156,"y":-132,"length":6157.415042044835},{"x":6191,"y":-169,"length":6193.306225272572},{"x":6224,"y":-206,"length":6227.408128587687},{"x":6254,"y":-246,"length":6258.836313565006},{"x":7162,"y":-245,"length":7166.189294178601},{"x":8126,"y":515,"length":8142.303175392083},{"x":8174,"y":546,"length":8192.215329201254},{"x":8210,"y":566,"length":8229.486982795464},{"x":8252,"y":580,"length":8272.35782591638},{"x":8292,"y":591,"length":8313.03464446047},{"x":8341,"y":594,"length":8362.123952680922},{"x":8744,"y":594,"length":8764.15266868395},{"x":8745,"y":714,"length":8774.099440968286}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"}],[{"params":{"x":12260,"rotation":-15,"y":750,"width":70.65,"height":70.65},"className":"Sign2"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4740,"y":122,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":11178,"y":1187,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":-90,"scaleY":1,"x":1140,"y":-540,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":1070,"rotation":-90,"y":-540,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":-30,"scaleY":1,"x":11280,"y":2030,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":11244,"rotation":60,"y":1970,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":-27,"scaleY":1,"x":11200,"y":2073,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":11170,"rotation":-117,"y":2011,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":180,"scaleY":1,"x":10380,"y":1630,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":10380,"rotation":0,"y":1690,"width":68.8,"height":69.8},"className":"Sign1"}],[{"params":{"x":12563,"rotation":-21,"y":779,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":12200,"rotation":-21,"y":919,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":12321,"rotation":-21,"y":873,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"x":12442,"rotation":-21,"y":826,"safeId":-1,"width":132,"ttl":0.5,"height":18},"className":"GlassCrashed0"},{"params":{"speed":1700,"x":11010,"rotation":-114,"y":2000,"safeId":-1,"id":-1,"rate":1,"width":433,"height":128},"className":"GeyserE"},{"params":{"speed":1700,"x":10890,"rotation":-114,"y":2050,"safeId":-1,"id":-1,"rate":1,"width":433,"height":128},"className":"GeyserE"},{"params":{"speed":1700,"x":10772,"rotation":-114,"y":2104,"safeId":-1,"id":-1,"rate":1,"width":433,"height":128},"className":"GeyserE"}],null,[{"params":{"x":760,"rotation":0,"y":-220,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":4740,"rotation":0,"y":50,"id":1,"width":128,"height":1323},"className":"SafePointE"},{"params":{"x":11180,"rotation":0,"y":1120,"id":3,"width":128,"height":1203},"className":"SafePointE"}],[{"params":{"x":2980,"rotation":0,"graphic":0,"id":1,"y":670,"height":17,"width":17,"time":0.78,"safeId":-1,"snd":false,"rate":343,"useWeld":false},"className":"MotorJointE"},{"params":{"x":1840,"sndId":-1,"rotation":0,"y":70,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":584},"className":"ToggleE"},{"params":{"x":2800,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":680,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2630,"rotation":0,"graphic":0,"id":1,"y":673,"height":17,"width":17,"time":0.8,"safeId":-1,"snd":false,"rate":-110,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2760,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":680,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3329,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":690,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3379,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":690,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3559,"rotation":0,"graphic":0,"id":2,"y":680,"height":17,"width":17,"time":0.7,"safeId":-1,"snd":false,"rate":334,"useWeld":false},"className":"MotorJointE"},{"params":{"x":3179,"rotation":0,"graphic":0,"id":2,"y":680,"height":17,"width":17,"time":0.85,"safeId":-1,"snd":false,"rate":-110,"useWeld":false},"className":"MotorJointE"},{"params":{"x":4030,"rotation":0,"graphic":0,"safeId":-1,"id":3,"y":650,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4070,"rotation":0,"graphic":0,"safeId":-1,"id":3,"y":650,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4250,"rotation":0,"graphic":0,"id":3,"y":640,"height":17,"width":17,"time":0.6,"safeId":-1,"snd":false,"rate":337,"useWeld":false},"className":"MotorJointE"},{"params":{"x":3700,"rotation":0,"graphic":0,"id":3,"y":640,"height":17,"width":17,"time":0.8,"safeId":-1,"snd":false,"rate":-110,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2440,"sndId":-1,"rotation":0,"y":60,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":64,"height":584},"className":"ToggleE"},{"params":{"x":3060,"sndId":-1,"rotation":0,"y":60,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":3,"width":64,"height":584},"className":"ToggleE"},{"params":{"x":530,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-120,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":470,"rotation":0,"graphic":0,"id":11,"y":-710,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":790,"sndId":-1,"rotation":0,"y":-150,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":354,"height":64},"className":"ToggleE"},{"params":{"x":6528,"rotation":0,"graphic":1,"id":12,"y":110,"height":17,"width":17,"time":0,"safeId":1,"snd":false,"rate":80,"useWeld":false},"className":"MotorJointE"},{"params":{"x":5630,"sndId":-1,"rotation":0,"y":370,"fnl":false,"safeId":1,"id_off":-1,"off":false,"id":12,"width":64,"height":1113},"className":"ToggleE"},{"params":{"x":8720,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1003,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8790,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1003,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8860,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1003,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8930,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1003,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8840,"rotation":0,"graphic":0,"safeId":1,"id":15,"y":930,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8530,"sndId":-1,"rotation":0,"y":830,"fnl":false,"safeId":1,"id_off":-1,"off":false,"id":15,"width":64,"height":614},"className":"ToggleE"},{"params":{"x":8650,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1003,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":6480,"rotation":0,"graphic":0,"safeId":1,"id":12,"y":-160,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":11961,"sndId":-1,"rotation":0,"y":920,"fnl":false,"safeId":3,"id_off":-1,"off":false,"id":17,"width":64,"height":1221},"className":"ToggleE"},{"params":{"x":13081,"rotation":0,"graphic":0,"safeId":3,"id":17,"y":210,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":10190,"rotation":0,"graphic":0,"id":19,"y":2450,"height":17,"width":17,"time":0,"safeId":3,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":11500,"sndId":-1,"rotation":0,"y":2030,"fnl":false,"safeId":3,"id_off":-1,"off":false,"id":19,"width":64,"height":1418},"className":"ToggleE"},{"params":{"x":3920,"sndId":0,"rotation":0,"y":-50,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":2108},"className":"ToggleE"},{"params":{"x":6450,"sndId":0,"rotation":0,"y":-40,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":2108},"className":"ToggleE"},{"params":{"x":8960,"sndId":0,"rotation":0,"y":-910,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":2108},"className":"ToggleE"},{"params":{"x":9550,"sndId":0,"rotation":0,"y":2440,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":508},"className":"ToggleE"}]],"settings":{"prizes":"34,42,53","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map3.json b/motox3mspooky/assets/levels/map3.json deleted file mode 100644 index 87a0aca0..00000000 --- a/motox3mspooky/assets/levels/map3.json +++ /dev/null @@ -1 +0,0 @@ -{"settings":{"gravityY":500,"theme":6,"countdown":0,"prizes":"29,37,46"},"layers":[[{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":8,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":2,"y":-1,"length":2.23606797749979},{"x":194,"y":187,"length":269.45314991664134},{"x":279,"y":188,"length":336.42978465052704},{"x":357,"y":262,"length":442.82389276099366},{"x":350,"y":300,"length":460.9772228646444},{"x":315,"y":320,"length":449.02672526253934},{"x":295,"y":360,"length":465.4299087940095},{"x":265,"y":385,"length":467.38634982207174},{"x":250,"y":425,"length":493.0770730829005},{"x":205,"y":440,"length":485.41219597368996},{"x":125,"y":380,"length":400.03124877939223},{"x":106,"y":296,"length":314.40737904826597},{"x":-121,"y":146,"length":189.62331080328704},{"x":-75,"y":125,"length":145.7737973711325},{"x":-55,"y":75,"length":93.00537618869137},{"x":-15,"y":45,"length":47.43416490252569}],"safeId":-1,"rotation":57,"line":true,"x":10841,"isStatic":false,"y":-1571,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::FinishShaper","params":{"x":8760,"vertices":[{"x":0,"y":0,"length":0},{"x":2185,"y":0,"length":2185},{"x":2185,"y":335,"length":2210.5316102693487},{"x":0,"y":335,"length":335}],"y":70,"rotation":0}},{"className":"frg.game.editor.objects::WaterShaper","params":{"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":2220,"y":0,"length":2220},{"x":2220,"y":390,"length":2253.9964507514205},{"x":0,"y":390,"length":390}],"id":-1,"density":1.5,"x":8760,"sf":true,"y":120,"rotation":0,"bg":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":2,"density":1,"physic":false,"isWheel":false,"vertices":[{"x":0,"y":-250,"length":250},{"x":2720,"y":5,"length":2720.004595584353},{"x":2720,"y":1860,"length":3295.147948120084},{"x":0,"y":1855,"length":1855}],"safeId":-1,"rotation":0,"line":true,"x":10950,"isStatic":true,"y":-1410,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":8,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":-50,"y":10,"length":50.99019513592785},{"x":35,"y":-40,"length":53.150729063673246},{"x":100,"y":-80,"length":128.06248474865697},{"x":165,"y":-120,"length":204.02205763103166},{"x":230,"y":-80,"length":243.51591323771842},{"x":300,"y":-35,"length":302.03476621077914},{"x":360,"y":10,"length":360.1388621073821}],"safeId":-1,"rotation":0,"line":true,"x":6977,"isStatic":true,"y":-780,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":8,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":-50,"y":10,"length":50.99019513592785},{"x":35,"y":-40,"length":53.150729063673246},{"x":100,"y":-80,"length":128.06248474865697},{"x":165,"y":-120,"length":204.02205763103166},{"x":166,"y":-49,"length":173.08090593707902},{"x":165,"y":10,"length":165.3027525481654}],"safeId":-1,"rotation":0,"line":true,"x":3627,"isStatic":true,"y":-440,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":2,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":160,"y":-170,"length":233.45235059857504},{"x":1485,"y":-170,"length":1494.6989663474046},{"x":1485,"y":-70,"length":1486.648916187006},{"x":1493,"y":-8,"length":1493.0214332018145},{"x":1502,"y":24,"length":1502.1917321034623},{"x":1517,"y":62,"length":1518.266445654385},{"x":1537,"y":98,"length":1540.12109913474},{"x":1566,"y":139,"length":1572.1567987958454},{"x":1602,"y":171,"length":1611.1005555209767},{"x":1642,"y":202,"length":1654.3784331282852},{"x":1685,"y":224,"length":1699.8238143995984},{"x":1737,"y":240,"length":1753.5019247209282},{"x":1785,"y":248,"length":1802.1456655886616},{"x":1831,"y":248,"length":1847.718863896778},{"x":1882,"y":241,"length":1897.367913716262},{"x":1931,"y":224,"length":1943.9488161986158},{"x":1977,"y":201,"length":1987.1914854890053},{"x":2014,"y":175,"length":2021.5887316662606},{"x":2050,"y":139,"length":2054.707035078237},{"x":2085,"y":95,"length":2087.16314647418},{"x":2107,"y":72,"length":2108.229826181197},{"x":2145,"y":68,"length":2146.0775848044264},{"x":2183,"y":82,"length":2184.5395395826554},{"x":2883,"y":385,"length":2908.5931307076967},{"x":2947,"y":409,"length":2975.2462082994075},{"x":3023,"y":421,"length":3052.174634584332},{"x":3090,"y":423,"length":3118.818526301266},{"x":3156,"y":417,"length":3183.429754211643},{"x":3215,"y":401,"length":3239.91141854218},{"x":3275,"y":379,"length":3296.8569881024564},{"x":3334,"y":343,"length":3351.597380354627},{"x":3384,"y":299,"length":3397.183686526238},{"x":3428,"y":252,"length":3437.2500636409914},{"x":3467,"y":195,"length":3472.4795175781815},{"x":3503,"y":125,"length":3505.2295217289266},{"x":3521,"y":68,"length":3521.656570422505},{"x":3531,"y":-2,"length":3531.000566411736},{"x":3529,"y":-79,"length":3529.8841340757913},{"x":3516,"y":-155,"length":3519.4148661389722},{"x":3491,"y":-232,"length":3498.700473032809},{"x":3462,"y":-288,"length":3473.9585489755054},{"x":3416,"y":-346,"length":3433.4781199244594},{"x":3353,"y":-404,"length":3377.251101117594},{"x":3285,"y":-453,"length":3316.087152051345},{"x":3272,"y":-480,"length":3307.020411185876},{"x":3289,"y":-516,"length":3329.2306919166776},{"x":5035,"y":-520,"length":5061.780813113109},{"x":5035,"y":5,"length":5035.0024826210365},{"x":5034,"y":65,"length":5034.419628914538},{"x":5044,"y":137,"length":5045.860184349146},{"x":5060,"y":201,"length":5063.990620054504},{"x":5082,"y":260,"length":5088.646578413557},{"x":5109,"y":309,"length":5118.335862367768},{"x":5137,"y":357,"length":5149.390060968386},{"x":5170,"y":403,"length":5185.683079402365},{"x":5213,"y":450,"length":5232.386549176198},{"x":5271,"y":504,"length":5295.040793043997},{"x":5322,"y":543,"length":5349.629239489406},{"x":5382,"y":580,"length":5413.162107308444},{"x":5447,"y":606,"length":5480.606262084515},{"x":5518,"y":629,"length":5553.734329259908},{"x":5609,"y":644,"length":5645.849537492121},{"x":5695,"y":646,"length":5731.521700211908},{"x":5768,"y":643,"length":5803.729232140314},{"x":5846,"y":628,"length":5879.634342371981},{"x":5929,"y":598,"length":5959.08088550575},{"x":6007,"y":558,"length":6032.8610956991215},{"x":6083,"y":509,"length":6104.258349709652},{"x":6360,"y":278,"length":6366.072886796066},{"x":6469,"y":278,"length":6474.9706563041655},{"x":6468,"y":696,"length":6505.339345491517},{"x":160,"y":680,"length":698.5699678629193}],"safeId":-1,"rotation":0,"line":true,"x":2310,"isStatic":true,"y":-270,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":8,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":95,"y":0,"length":95},{"x":145,"y":0,"length":145},{"x":200,"y":0,"length":200},{"x":255,"y":0,"length":255},{"x":310,"y":0,"length":310},{"x":380,"y":-55,"length":383.9596332949598},{"x":400,"y":-55,"length":403.7635446644484},{"x":392,"y":2,"length":392.0051020076142},{"x":385,"y":55,"length":388.90872965260115},{"x":306,"y":56,"length":311.0819827633867},{"x":240,"y":55,"length":246.22144504490262},{"x":165,"y":55,"length":173.92527130926086},{"x":105,"y":55,"length":118.53269591129698},{"x":50,"y":55,"length":74.33034373659252},{"x":0,"y":55,"length":55},{"x":0,"y":25,"length":25}],"safeId":-1,"rotation":9,"line":true,"x":2011,"isStatic":false,"y":404,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":true,"layer":2,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":-1320,"y":-1405,"length":1927.8031538515545},{"x":75,"y":-1390,"length":1392.0219107470973},{"x":75,"y":70,"length":102.59142264341595},{"x":90,"y":71,"length":114.63420083029322},{"x":105,"y":83,"length":133.843191832831},{"x":109,"y":100,"length":147.92227688891217},{"x":107,"y":116,"length":157.8131806916013},{"x":93,"y":129,"length":159.02829936838285},{"x":74,"y":135,"length":153.95129099815955},{"x":70,"y":710,"length":713.4423592694787},{"x":-1325,"y":1880,"length":2300.0054347761875}],"safeId":-1,"rotation":0,"line":true,"x":766,"isStatic":true,"y":-1130,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::GroundPather","params":{"camera":false,"shape":true,"repeatTexture":true,"vertices":[{"x":0,"y":0,"length":0},{"x":6900,"y":0,"length":6900},{"x":11000,"y":-5,"length":11000.001136363579},{"x":14185,"y":-5,"length":14185.000881212522}],"textureOffset":0,"rotation":0,"height":69,"wireframe":false,"lineId":0,"physic":true,"width":14198,"direction":90,"cameraOffsetY":100,"isRoad":true,"line":true,"x":-70,"textureMode":true,"smoothing":true,"y":400,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"snapToGrid":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":9,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":1000,"y":0,"length":1000},{"x":982,"y":183,"length":998.9059014742079},{"x":932,"y":361,"length":999.4723607984365},{"x":850,"y":526,"length":999.5879150930148},{"x":739,"y":673,"length":999.5248871338822},{"x":602,"y":798,"length":999.6039215609351},{"x":445,"y":895,"length":999.5248871338822},{"x":273,"y":961,"length":999.0245242235047},{"x":92,"y":995,"length":999.2442143940589},{"x":-92,"y":995,"length":999.2442143940589},{"x":-273,"y":961,"length":999.0245242235047},{"x":-445,"y":895,"length":999.5248871338822},{"x":-602,"y":798,"length":999.6039215609351},{"x":-739,"y":673,"length":999.5248871338822},{"x":-850,"y":526,"length":999.5879150930148},{"x":-932,"y":361,"length":999.4723607984365},{"x":-982,"y":183,"length":998.9059014742079},{"x":-997,"y":27,"length":997.3655297833387},{"x":-1000,"y":0,"length":1000},{"x":-974,"y":0,"length":974},{"x":973,"y":2,"length":973.0020554962872}],"safeId":-1,"rotation":162,"line":true,"x":927,"isStatic":false,"y":93,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":8,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":5,"y":80,"length":80.15609770940699},{"x":-13,"y":78,"length":79.07591289387686},{"x":-39,"y":69,"length":79.25906888173743},{"x":-61,"y":51,"length":79.51100552753688},{"x":-75,"y":27,"length":79.71198153351854},{"x":-80,"y":0,"length":80},{"x":-75,"y":-27,"length":79.71198153351854},{"x":-61,"y":-51,"length":79.51100552753688},{"x":-40,"y":-69,"length":79.75587752636166},{"x":-13,"y":-78,"length":79.07591289387686},{"x":13,"y":-78,"length":79.07591289387686},{"x":40,"y":-69,"length":79.75587752636166},{"x":61,"y":-51,"length":79.51100552753688},{"x":85,"y":0,"length":85},{"x":5,"y":0,"length":5}],"safeId":-1,"rotation":0,"line":true,"x":1115,"isStatic":false,"y":-975,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::DynamicPather","params":{"type":5,"repeatTexture":true,"density":"1","textureOffset":0,"y":400,"shapeH":64,"action":0,"originOffsetRatio":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-840,"length":840}],"safeId":-1,"rotation":0,"height":853,"x":2461,"isStatic":true,"smoothing":true,"id":-1,"wireframe":false,"snapToGrid":false,"textureMode":true,"graphic":true,"stretchTexture":false,"physic":true,"straightSides":true,"width":64}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":8,"density":0.1,"physic":true,"isWheel":false,"vertices":[{"x":10,"y":0,"length":10},{"x":100,"y":0,"length":100},{"x":100,"y":60,"length":116.61903789690601},{"x":100,"y":115,"length":152.3975065412817},{"x":100,"y":180,"length":205.91260281974002},{"x":100,"y":260,"length":278.5677655436824},{"x":100,"y":335,"length":349.6069221282668},{"x":100,"y":405,"length":417.163037672323},{"x":100,"y":480,"length":490.3060268852505},{"x":100,"y":560,"length":568.8585061331157},{"x":100,"y":655,"length":662.5896165802782},{"x":100,"y":765,"length":771.5082630795343},{"x":100,"y":880,"length":885.6635930193811},{"x":111,"y":942,"length":948.5172639440992},{"x":129,"y":983,"length":991.4282626594826},{"x":147,"y":1013,"length":1023.6102774005349},{"x":173,"y":1040,"length":1054.2907568597952},{"x":203,"y":1069,"length":1088.1038553373478},{"x":243,"y":1092,"length":1118.710418294207},{"x":290,"y":1110,"length":1147.2575996697517},{"x":328,"y":1117,"length":1164.161930317256},{"x":369,"y":1119,"length":1178.2707668443616},{"x":410,"y":1115,"length":1187.99200334009},{"x":459,"y":1102,"length":1193.769240682637},{"x":498,"y":1082,"length":1191.1036898607947},{"x":525,"y":1060,"length":1182.8884140103833},{"x":552,"y":1032,"length":1170.3537926627143},{"x":580,"y":1000,"length":1156.027681329474},{"x":628,"y":986,"length":1169.008126575688},{"x":653,"y":1016,"length":1207.7520440885207},{"x":653,"y":1049,"length":1235.6415337791134},{"x":625,"y":1102,"length":1266.8973912673434},{"x":578,"y":1146,"length":1283.5108102388542},{"x":539,"y":1173,"length":1290.9105313692348},{"x":498,"y":1191,"length":1290.924087620957},{"x":451,"y":1209,"length":1290.380564019778},{"x":382,"y":1222,"length":1280.3155860958657},{"x":313,"y":1218,"length":1257.5742522809537},{"x":250,"y":1204,"length":1229.6812595140254},{"x":201,"y":1184,"length":1200.940048462037},{"x":160,"y":1159,"length":1169.9918803137055},{"x":123,"y":1128,"length":1134.6863002610016},{"x":85,"y":1093,"length":1096.3001413846484},{"x":85,"y":1130,"length":1133.192393197201},{"x":85,"y":1190,"length":1193.0318520475469},{"x":85,"y":1260,"length":1262.8638089675387},{"x":10,"y":1260,"length":1260.0396819148198},{"x":10,"y":1195,"length":1195.041840271712},{"x":10,"y":1135,"length":1135.0440520085554},{"x":10,"y":1070,"length":1070.046727951635},{"x":10,"y":995,"length":995.0502499874065},{"x":10,"y":930,"length":930.0537618869137},{"x":10,"y":840,"length":840.0595217006947},{"x":10,"y":765,"length":765.0653566852965},{"x":10,"y":685,"length":685.0729888121411},{"x":10,"y":600,"length":600.0833275470999},{"x":10,"y":515,"length":515.097078228949},{"x":10,"y":435,"length":435.1149273467873},{"x":10,"y":345,"length":345.14489710844634},{"x":10,"y":245,"length":245.20399670478457},{"x":10,"y":150,"length":150.33296378372907},{"x":10,"y":85,"length":85.58621384311844}],"safeId":-1,"rotation":0,"line":true,"x":4410,"isStatic":false,"y":-1570,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":9,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":300,"y":0,"length":300},{"x":295,"y":52,"length":299.54799281584246},{"x":281,"y":102,"length":298.93979326948096},{"x":259,"y":149,"length":298.8009370801906},{"x":229,"y":192,"length":298.8394217635953},{"x":192,"y":229,"length":298.8394217635953},{"x":150,"y":259,"length":299.3008519867593},{"x":102,"y":281,"length":298.93979326948096},{"x":52,"y":295,"length":299.54799281584246},{"x":0,"y":300,"length":300},{"x":-52,"y":295,"length":299.54799281584246},{"x":-102,"y":281,"length":298.93979326948096},{"x":-149,"y":259,"length":298.8009370801906},{"x":-192,"y":229,"length":298.8394217635953},{"x":-229,"y":192,"length":298.8394217635953},{"x":-259,"y":149,"length":298.8009370801906},{"x":-281,"y":102,"length":298.93979326948096},{"x":-295,"y":52,"length":299.54799281584246},{"x":-300,"y":0,"length":300},{"x":-295,"y":-52,"length":299.54799281584246},{"x":-281,"y":-102,"length":298.93979326948096},{"x":-259,"y":-150,"length":299.3008519867593},{"x":-229,"y":-192,"length":298.8394217635953},{"x":-192,"y":-229,"length":298.8394217635953},{"x":-150,"y":-259,"length":299.3008519867593},{"x":-102,"y":-281,"length":298.93979326948096},{"x":-52,"y":-295,"length":299.54799281584246},{"x":0,"y":-300,"length":300},{"x":52,"y":-295,"length":299.54799281584246},{"x":102,"y":-281,"length":298.93979326948096},{"x":150,"y":-259,"length":299.3008519867593},{"x":192,"y":-229,"length":298.8394217635953},{"x":229,"y":-192,"length":298.8394217635953},{"x":259,"y":-150,"length":299.3008519867593},{"x":281,"y":-102,"length":298.93979326948096},{"x":295,"y":-52,"length":299.54799281584246}],"safeId":-1,"rotation":0,"line":true,"x":4118,"isStatic":false,"y":-337,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":2,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":10,"y":-1000,"length":1000.0499987500625},{"x":435,"y":-1000,"length":1090.5159329418345},{"x":425,"y":100,"length":436.6062299143245},{"x":0,"y":100,"length":100}],"safeId":-1,"rotation":0,"line":true,"x":7780,"isStatic":true,"y":-1490,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"plr":false,"layer":9,"density":1,"physic":true,"isWheel":false,"vertices":[{"x":350,"y":0,"length":350},{"x":344,"y":60,"length":349.19335617963867},{"x":328,"y":119,"length":348.919761549844},{"x":303,"y":174,"length":349.40663989111596},{"x":268,"y":224,"length":349.28498393145964},{"x":224,"y":268,"length":349.28498393145964},{"x":175,"y":303,"length":349.90570158258356},{"x":119,"y":328,"length":348.919761549844},{"x":60,"y":344,"length":349.19335617963867},{"x":0,"y":350,"length":350},{"x":-60,"y":344,"length":349.19335617963867},{"x":-119,"y":328,"length":348.919761549844},{"x":-174,"y":303,"length":349.40663989111596},{"x":-224,"y":268,"length":349.28498393145964},{"x":-268,"y":224,"length":349.28498393145964},{"x":-303,"y":174,"length":349.40663989111596},{"x":-328,"y":119,"length":348.919761549844},{"x":-344,"y":60,"length":349.19335617963867},{"x":-350,"y":0,"length":350},{"x":-344,"y":-60,"length":349.19335617963867},{"x":-328,"y":-119,"length":348.919761549844},{"x":-303,"y":-175,"length":349.90570158258356},{"x":-268,"y":-224,"length":349.28498393145964},{"x":-224,"y":-268,"length":349.28498393145964},{"x":-175,"y":-303,"length":349.90570158258356},{"x":-119,"y":-328,"length":348.919761549844},{"x":-60,"y":-344,"length":349.19335617963867},{"x":0,"y":-350,"length":350},{"x":60,"y":-344,"length":349.19335617963867},{"x":119,"y":-328,"length":348.919761549844},{"x":175,"y":-303,"length":349.90570158258356},{"x":224,"y":-268,"length":349.28498393145964},{"x":268,"y":-224,"length":349.28498393145964},{"x":303,"y":-175,"length":349.90570158258356},{"x":328,"y":-119,"length":348.919761549844},{"x":344,"y":-60,"length":349.19335617963867}],"safeId":-1,"rotation":0,"line":true,"x":8005,"isStatic":false,"y":-231,"rem":true,"ignore":false,"graphic":true,"id":-1}},{"className":"frg.game.editor.objects::DynamicPather","params":{"type":5,"repeatTexture":true,"density":"1","textureOffset":0,"y":400,"shapeH":64,"action":0,"originOffsetRatio":0,"vertices":[{"x":0,"y":0,"length":0},{"x":1,"y":-2056,"length":2056.000243190647}],"safeId":-1,"rotation":0,"height":2069,"x":10940,"isStatic":true,"smoothing":true,"id":-1,"wireframe":false,"snapToGrid":false,"textureMode":true,"graphic":true,"stretchTexture":false,"physic":true,"straightSides":true,"width":65}},{"className":"frg.game.editor.objects::DynamicPather","params":{"type":5,"repeatTexture":true,"density":"1","textureOffset":0,"y":-1640,"shapeH":64,"action":0,"originOffsetRatio":0,"vertices":[{"x":0,"y":0,"length":0},{"x":-2717,"y":0,"length":2717}],"safeId":-1,"rotation":0,"height":64,"x":10930,"isStatic":true,"smoothing":true,"id":-1,"wireframe":false,"snapToGrid":false,"textureMode":true,"graphic":true,"stretchTexture":false,"physic":true,"straightSides":true,"width":2730}},{"className":"frg.game.editor.objects::DynamicPather","params":{"type":5,"repeatTexture":true,"density":"1","textureOffset":0,"y":-447,"shapeH":64,"action":0,"originOffsetRatio":0,"vertices":[{"x":0,"y":0,"length":0},{"x":86,"y":0,"length":86}],"safeId":-1,"rotation":0,"height":64,"x":2459,"isStatic":true,"smoothing":true,"id":-1,"wireframe":false,"snapToGrid":false,"textureMode":true,"graphic":true,"stretchTexture":false,"physic":true,"straightSides":true,"width":99}},{"className":"frg.game.editor.objects::GroundPather","params":{"camera":true,"shape":false,"repeatTexture":true,"vertices":[{"x":0,"y":0,"length":0},{"x":2095,"y":10,"length":2095.023866212507},{"x":2300,"y":-30,"length":2300.195643852931},{"x":2435,"y":-105,"length":2437.262808972393},{"x":2550,"y":-250,"length":2562.2255950637914},{"x":2680,"y":-640,"length":2755.3584158871236},{"x":2740,"y":-720,"length":2833.0195904723287},{"x":2810,"y":-750,"length":2908.367239534925},{"x":2885,"y":-760,"length":2983.4250451452604},{"x":3795,"y":-760,"length":3870.352051170539},{"x":5340,"y":-240,"length":5345.3905376501725},{"x":5495,"y":-230,"length":5499.811360401372},{"x":5640,"y":-255,"length":5645.761684662221},{"x":5770,"y":-330,"length":5779.429037543415},{"x":6275,"y":-920,"length":6342.083648139624},{"x":6335,"y":-960,"length":6407.325885266021},{"x":6405,"y":-975,"length":6478.784608242506},{"x":6870,"y":-975,"length":6938.8417621386925},{"x":6950,"y":-960,"length":7015.988882545354},{"x":7005,"y":-910,"length":7063.860488429822},{"x":7390,"y":-320,"length":7396.9250367973855},{"x":7560,"y":-185,"length":7562.263219433717},{"x":7780,"y":-60,"length":7780.231359027828},{"x":7905,"y":-30,"length":7905.056925791237},{"x":8065,"y":-5,"length":8065.001549906857},{"x":11320,"y":-230,"length":11322.336331340806},{"x":14185,"y":-5,"length":14185.000881212522}],"textureOffset":0,"rotation":0,"height":1053,"wireframe":false,"lineId":0,"physic":false,"width":14198,"direction":90,"cameraOffsetY":100,"isRoad":false,"line":false,"x":-70,"textureMode":true,"smoothing":true,"y":400,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"snapToGrid":true}}],[{"className":"PlankBone","params":{"height":17.05,"x":1024,"id":2,"width":85.95,"safeId":-1,"y":-997,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":1008,"id":2,"width":85.95,"safeId":-1,"y":-1004,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":987,"id":2,"width":85.95,"safeId":-1,"y":-1013,"active":false,"rotation":-66}},{"className":"PlankBone","params":{"height":17.05,"x":1043,"id":2,"width":85.95,"safeId":-1,"y":-990,"active":false,"rotation":135}},{"className":"PlankBone","params":{"height":17.05,"x":1001,"id":2,"width":85.95,"safeId":-1,"y":-1008,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":994,"id":2,"width":85.95,"safeId":-1,"y":-1010,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":1016,"id":2,"width":85.95,"safeId":-1,"y":-1001,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":929,"id":2,"width":85.95,"safeId":-1,"y":-1039,"active":false,"rotation":-66}},{"className":"PlankBone","params":{"height":17.05,"x":981,"id":2,"width":85.95,"safeId":-1,"y":-1016,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":973,"id":2,"width":85.95,"safeId":-1,"y":-1020,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":965,"id":2,"width":85.95,"safeId":-1,"y":-1023,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":943,"id":2,"width":85.95,"safeId":-1,"y":-1034,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":958,"id":2,"width":85.95,"safeId":-1,"y":-1027,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":950,"id":2,"width":85.95,"safeId":-1,"y":-1030,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":935,"id":2,"width":85.95,"safeId":-1,"y":-1036,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":914,"id":2,"width":85.95,"safeId":-1,"y":-1047,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":884,"id":2,"width":85.95,"safeId":-1,"y":-1060,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":890,"id":2,"width":85.95,"safeId":-1,"y":-1056,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":906,"id":2,"width":85.95,"safeId":-1,"y":-1049,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":898,"id":2,"width":85.95,"safeId":-1,"y":-1054,"active":false,"rotation":114}},{"className":"PlankBone","params":{"height":17.05,"x":922,"id":2,"width":85.95,"safeId":-1,"y":-1042,"active":false,"rotation":104}},{"className":"PlankBone","params":{"height":17.05,"x":7799,"id":11,"width":85.95,"safeId":-1,"y":-1358,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7799,"id":11,"width":85.95,"safeId":-1,"y":-1146,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-937,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7799,"id":11,"width":85.95,"safeId":-1,"y":-1217,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-1286,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-1077,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-868,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-797,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-1007,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-727,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-586,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7799,"id":11,"width":85.95,"safeId":-1,"y":-517,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":7798,"id":11,"width":85.95,"safeId":-1,"y":-657,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8189,"id":11,"width":85.95,"safeId":-1,"y":-1358,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8189,"id":11,"width":85.95,"safeId":-1,"y":-1146,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-937,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8189,"id":11,"width":85.95,"safeId":-1,"y":-1217,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-1286,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-1077,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-868,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-797,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-1007,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-727,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-586,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8189,"id":11,"width":85.95,"safeId":-1,"y":-517,"active":false,"rotation":90}},{"className":"PlankBone","params":{"height":17.05,"x":8188,"id":11,"width":85.95,"safeId":-1,"y":-657,"active":false,"rotation":90}},{"className":"SignPillar","params":{"height":128.35,"x":2933,"y":-503,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3}},{"className":"SignPillar","params":{"height":128.35,"x":5990,"y":-851,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3}},{"className":"Dec28","params":{"height":72.35,"x":290,"y":363,"rotation":0,"width":71.6}},{"className":"Dec27","params":{"height":85.5,"x":650,"y":360,"rotation":9,"width":92.7}},{"className":"Dec23","params":{"height":79.6,"x":2900,"y":-480,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3}},{"className":"Dec26","params":{"height":72.35,"x":5110,"y":40,"rotation":15,"width":95}},{"className":"Dec28","params":{"height":72.35,"x":5180,"y":70,"rotation":45,"width":71.6}},{"className":"Dec24","params":{"height":95.5,"x":5956,"y":-833,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2}},{"className":"Dec26","params":{"height":72.35,"x":6620,"y":-820,"rotation":-3,"width":95}},{"className":"Dec27","params":{"height":85.5,"x":6710,"y":-820,"rotation":15,"width":92.7}}],[{"className":"Tnt1","params":{"stones":false,"y":430,"safeId":-1,"width":53.2,"count":1,"height":53.2,"x":2371,"id":1,"impulse":1,"radius":1,"physic":false,"rotation":0}},{"className":"Removed0","params":{"type":0,"x":1060,"y":368,"active":true,"safeId":-1,"height":72,"id":-1,"width":12.3,"rotation":0}},{"className":"Removed0","params":{"type":0,"x":1060,"y":299,"active":true,"safeId":-1,"height":72,"id":-1,"width":12.3,"rotation":0}},{"className":"Removed0","params":{"type":0,"x":1060,"y":161,"active":true,"safeId":-1,"height":72,"id":-1,"width":12.3,"rotation":0}},{"className":"Removed0","params":{"type":0,"x":1060,"y":230,"active":true,"safeId":-1,"height":72,"id":-1,"width":12.3,"rotation":0}},{"className":"Removed0","params":{"type":0,"x":1060,"y":91,"active":true,"safeId":-1,"height":72,"id":-1,"width":12.3,"rotation":0}},{"className":"Tnt1","params":{"stones":false,"y":-1003,"safeId":-1,"width":53.2,"count":1,"height":53.2,"x":1006,"id":2,"impulse":1,"radius":1,"physic":false,"rotation":114}},{"className":"BoostE","params":{"height":64.1,"x":8020,"y":330,"rotation":0,"force":5000,"time":1,"safeId":-1,"width":64.1}},{"className":"Tnt1","params":{"stones":false,"y":-1600,"safeId":-1,"width":53.2,"count":100,"height":53.2,"x":10710,"id":13,"impulse":7000,"radius":100,"physic":true,"rotation":0}},{"className":"Tnt1","params":{"stones":false,"y":-1590,"safeId":-1,"width":53.2,"count":100,"height":53.2,"x":10790,"id":13,"impulse":7000,"radius":100,"physic":true,"rotation":0}}],null,[{"className":"PlayerWP","params":{"height":32,"x":440,"y":340,"rotation":0,"width":64}},{"className":"SafePointE","params":{"height":2680,"x":2931,"y":-578,"width":128,"id":0,"rotation":0}},{"className":"SafePointE","params":{"height":3482,"x":5990,"y":-930,"width":128,"id":0,"rotation":0}}],[{"className":"ToggleE","params":{"height":573,"x":2087,"sndId":-1,"width":64,"y":220,"fnl":false,"id_off":-1,"off":false,"id":1,"safeId":-1,"rotation":0}},{"className":"MotorJointE","params":{"snd":false,"safeId":-1,"width":17,"useWeld":false,"height":17,"x":2016,"id":1,"rotation":0,"rate":-140,"graphic":0,"time":0.4,"y":410}},{"className":"ToggleE","params":{"height":772,"x":1246,"sndId":-1,"width":64,"y":180,"fnl":false,"id_off":-1,"off":false,"id":3,"safeId":-1,"rotation":0}},{"className":"PivotJointE","params":{"height":17,"x":1840,"y":-220,"id":3,"graphic":0,"safeId":-1,"rotation":0,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":986,"y":-976,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":1003,"y":-1045,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":1032,"y":-1032,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":1018,"y":-1039,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":1016,"y":-963,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":1001,"y":-970,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":928,"y":-1002,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":1069,"y":-1018,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":942,"y":-996,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":974,"y":-1058,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":944,"y":-1071,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":958,"y":-989,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":915,"y":-1008,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":959,"y":-1065,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":973,"y":-982,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":989,"y":-1051,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":914,"y":-1085,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":899,"y":-1015,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":883,"y":-1022,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":930,"y":-1078,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":900,"y":-1091,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":868,"y":-1029,"id":1,"graphic":0,"safeId":-1,"rotation":114,"width":17}},{"className":"frg.game.editor.objects::MoverPather","params":{"stopOnEnd":true,"accelDist":0,"vertices":[{"x":0,"y":0,"length":0},{"x":1328,"y":512,"length":1423.2807172163896}],"snapToGrid":true,"sideWait":0,"speed":1200,"startTime":"0","safeId":-1,"active":0,"cycle":0,"height":525,"x":1112,"y":-976,"width":1341,"position":0,"id":2,"body":false,"rotation":0}},{"className":"ToggleE","params":{"height":64,"x":1530,"sndId":-1,"width":1984,"y":-1090,"fnl":false,"id_off":-1,"off":false,"id":2,"safeId":-1,"rotation":15}},{"className":"PivotJointE","params":{"height":17,"x":4460,"y":-1540,"id":-1,"graphic":0,"safeId":-1,"rotation":0,"width":17}},{"className":"MotorJointE","params":{"snd":false,"safeId":-1,"width":17,"useWeld":false,"height":17,"x":4117,"id":4,"rotation":0,"rate":100,"graphic":1,"time":0,"y":-337}},{"className":"ToggleE","params":{"height":1464,"x":3020,"sndId":-1,"width":64,"y":-840,"fnl":false,"id_off":-1,"off":false,"id":4,"safeId":-1,"rotation":0}},{"className":"PivotJointE","params":{"height":17,"x":7799,"y":-1253,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-1182,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-1112,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7799,"y":-1042,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7799,"y":-832,"id":22,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-972,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-903,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-761,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7799,"y":-622,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-695,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-482,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-1321,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7799,"y":-1394,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":7798,"y":-552,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8189,"y":-1253,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-1182,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-1112,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8189,"y":-1042,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8189,"y":-832,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-972,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-903,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-761,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8189,"y":-622,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-695,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-482,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-1321,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8189,"y":-1394,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":8188,"y":-552,"id":12,"graphic":0,"safeId":-1,"rotation":90,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":10630,"y":-1210,"id":13,"graphic":0,"safeId":-1,"rotation":0,"width":17}},{"className":"PivotJointE","params":{"height":17,"x":10760,"y":-1200,"id":13,"graphic":0,"safeId":-1,"rotation":0,"width":17}},{"className":"ToggleE","params":{"height":2001,"x":10590,"sndId":-1,"width":64,"y":-800,"fnl":false,"id_off":-1,"off":false,"id":13,"safeId":-1,"rotation":9}},{"className":"ToggleE","params":{"height":803,"x":7510,"sndId":-1,"width":97,"y":-220,"fnl":false,"id_off":-1,"off":false,"id":22,"safeId":-1,"rotation":90}},{"className":"ToggleE","params":{"height":1779,"x":3160,"sndId":-1,"width":64,"y":-900,"fnl":false,"id_off":1,"off":false,"id":0,"safeId":-1,"rotation":0}},{"className":"ToggleE","params":{"height":1779,"x":3180,"sndId":-1,"width":64,"y":-920,"fnl":false,"id_off":2,"off":false,"id":0,"safeId":-1,"rotation":0}},{"className":"ToggleE","params":{"height":2999,"x":6280,"sndId":-1,"width":64,"y":-1230,"fnl":false,"id_off":-1,"off":false,"id":11,"safeId":-1,"rotation":0}},{"className":"ToggleE","params":{"height":2999,"x":6267,"sndId":-1,"width":64,"y":-1240,"fnl":false,"id_off":-1,"off":false,"id":12,"safeId":-1,"rotation":0}},{"className":"PivotJointE","params":{"height":17,"x":8000,"y":-550,"id":11,"graphic":0,"safeId":-1,"rotation":0,"width":17}},{"className":"ToggleE","params":{"height":2543,"x":9050,"sndId":1,"width":64,"y":-770,"fnl":false,"id_off":11,"off":false,"id":0,"safeId":-1,"rotation":0}},{"className":"ToggleE","params":{"height":2543,"x":9090,"sndId":-1,"width":64,"y":-770,"fnl":false,"id_off":12,"off":false,"id":0,"safeId":-1,"rotation":0}},{"className":"ToggleE","params":{"height":990,"x":5120,"sndId":0,"width":64,"y":-40,"fnl":false,"id_off":-1,"off":false,"id":0,"safeId":-1,"rotation":0}}]]} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map4.json b/motox3mspooky/assets/levels/map4.json deleted file mode 100644 index 22aa03d2..00000000 --- a/motox3mspooky/assets/levels/map4.json +++ /dev/null @@ -1 +0,0 @@ -{"settings":{"theme":6,"countdown":0,"prizes":"30,38,49","gravityY":500},"layers":[[{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":18100,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":260,"rem":true,"density":1,"ignore":false,"layer":9,"vertices":[{"x":0,"y":-345,"length":345},{"x":20,"y":-347,"length":347.57589099360735},{"x":860,"y":-345,"length":926.6202026720548},{"x":880,"y":-345,"length":945.2116165176981},{"x":880,"y":-285,"length":925},{"x":860,"y":-275,"length":902.8981116382955},{"x":585,"y":-135,"length":600.374882885685},{"x":565,"y":-125,"length":578.6622503671723},{"x":565,"y":-93,"length":572.6028291931502},{"x":566,"y":339,"length":659.7552576524116},{"x":565,"y":365,"length":672.6440366196671},{"x":280,"y":370,"length":464.0043103248072},{"x":280,"y":340,"length":440.45431091090484},{"x":280,"y":-95,"length":295.67718883945037},{"x":280,"y":-125,"length":306.6349621292393},{"x":262,"y":-136,"length":295.1948509036023},{"x":17,"y":-275,"length":275.5249534978638},{"x":0,"y":-285,"length":285}],"isStatic":false,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":16610,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":260,"rem":true,"density":1,"ignore":false,"layer":8,"vertices":[{"x":0,"y":-345,"length":345},{"x":70,"y":-345,"length":352.02982828163863},{"x":140,"y":-345,"length":372.3237838226293},{"x":215,"y":-345,"length":406.5095324835569},{"x":290,"y":-345,"length":450.6939094329987},{"x":355,"y":-345,"length":495.025251881154},{"x":435,"y":-345,"length":555.2026656996525},{"x":520,"y":-345,"length":624.0392615853589},{"x":599,"y":-345,"length":691.2495931282708},{"x":690,"y":-344,"length":770.9967574510284},{"x":785,"y":-345,"length":857.4672005388894},{"x":880,"y":-345,"length":945.2116165176981},{"x":880,"y":-285,"length":925},{"x":815,"y":-250,"length":852.4816713572204},{"x":750,"y":-220,"length":781.6009211867653},{"x":685,"y":-185,"length":709.5421058682846},{"x":627,"y":-156,"length":646.1153147852169},{"x":565,"y":-125,"length":578.6622503671723},{"x":565,"y":-60,"length":568.1769090697017},{"x":565,"y":-15,"length":565.1990799709426},{"x":565,"y":35,"length":566.0830327787612},{"x":565,"y":125,"length":578.6622503671723},{"x":280,"y":130,"length":308.70698080866265},{"x":280,"y":45,"length":283.59301824974466},{"x":280,"y":-5,"length":280.04463929880893},{"x":280,"y":-65,"length":287.4456470360962},{"x":280,"y":-125,"length":306.6349621292393},{"x":218,"y":-160,"length":270.4144966528237},{"x":152,"y":-197,"length":248.82323042674292},{"x":100,"y":-229,"length":249.88197213884797},{"x":50,"y":-256,"length":260.83711392361323},{"x":0,"y":-285,"length":285}],"isStatic":false,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":15150,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":250,"rem":true,"density":1,"ignore":false,"layer":8,"vertices":[{"x":0,"y":-345,"length":345},{"x":70,"y":-345,"length":352.02982828163863},{"x":155,"y":-345,"length":378.21951298154886},{"x":235,"y":-345,"length":417.43262929483603},{"x":330,"y":-345,"length":477.4149138851865},{"x":420,"y":-345,"length":543.5301279598032},{"x":500,"y":-345,"length":607.4742792909013},{"x":580,"y":-345,"length":674.8518355905984},{"x":665,"y":-345,"length":749.1662031885849},{"x":730,"y":-345,"length":807.4187265601412},{"x":800,"y":-345,"length":871.2204083927327},{"x":880,"y":-345,"length":945.2116165176981},{"x":880,"y":-285,"length":925},{"x":815,"y":-250,"length":852.4816713572204},{"x":750,"y":-215,"length":780.2083055184686},{"x":695,"y":-185,"length":719.200945494373},{"x":630,"y":-155,"length":648.7873303325213},{"x":565,"y":-125,"length":578.6622503671723},{"x":565,"y":-70,"length":569.3197695495916},{"x":565,"y":35,"length":566.0830327787612},{"x":565,"y":125,"length":578.6622503671723},{"x":280,"y":130,"length":308.70698080866265},{"x":280,"y":30,"length":281.60255680657446},{"x":280,"y":-65,"length":287.4456470360962},{"x":280,"y":-125,"length":306.6349621292393},{"x":205,"y":-165,"length":263.1539473388153},{"x":145,"y":-200,"length":247.0323865407125},{"x":100,"y":-225,"length":246.22144504490262},{"x":44,"y":-258,"length":261.72504656604804},{"x":0,"y":-285,"length":285}],"isStatic":false,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":14763,"rotation":0,"y":-171,"bg":true,"sf":true,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":5480,"y":0,"length":5480},{"x":5480,"y":100,"length":5480.912332814674},{"x":0,"y":100,"length":100}]}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":10950,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":-180,"rem":true,"density":1,"ignore":false,"layer":8,"vertices":[{"x":-65,"y":0,"length":65},{"x":19,"y":-53,"length":56.302753041036986},{"x":115,"y":-115,"length":162.63455967290594},{"x":200,"y":-55,"length":207.4246851269154},{"x":285,"y":5,"length":285.0438562747845},{"x":285,"y":75,"length":294.7032405658275},{"x":-65,"y":80,"length":103.07764064044152}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":8210,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":190,"rem":true,"density":1,"ignore":false,"layer":2,"vertices":[{"x":0,"y":-345,"length":345},{"x":880,"y":-345,"length":945.2116165176981},{"x":880,"y":-285,"length":925},{"x":565,"y":-125,"length":578.6622503671723},{"x":565,"y":125,"length":578.6622503671723},{"x":280,"y":130,"length":308.70698080866265},{"x":280,"y":-125,"length":306.6349621292393},{"x":0,"y":-285,"length":285}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":7910,"rotation":0,"y":30,"bg":true,"sf":true,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":-265,"y":0,"length":265},{"x":1840,"y":0,"length":1840},{"x":1840,"y":395,"length":1881.9205615540736},{"x":-265,"y":395,"length":475.6574397610112}]}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":6418,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":-520,"rem":true,"density":1,"ignore":false,"layer":9,"vertices":[{"x":0,"y":0,"length":0},{"x":33,"y":-18,"length":37.589892258425},{"x":77,"y":-32,"length":83.38465086573187},{"x":114,"y":-40,"length":120.81390648431164},{"x":155,"y":-47,"length":161.96913286178943},{"x":189,"y":-48,"length":195},{"x":214,"y":-47,"length":219.10043359153812},{"x":239,"y":-41,"length":242.4912369550702},{"x":270,"y":-54,"length":275.3470537340104},{"x":305,"y":-67,"length":312.27231705676377},{"x":337,"y":-76,"length":345.46345682285994},{"x":366,"y":-81,"length":374.85597234137805},{"x":405,"y":-82,"length":413.2178602141974},{"x":440,"y":-82,"length":447.57569192260655},{"x":475,"y":-77,"length":481.20058187828494},{"x":503,"y":-73,"length":508.2696134926817},{"x":534,"y":-81,"length":540.1083224687433},{"x":569,"y":-89,"length":575.9183969973524},{"x":588,"y":-114,"length":598.9490796386617},{"x":594,"y":-148,"length":612.1601097752123},{"x":583,"y":-176,"length":608.9868635693219},{"x":562,"y":-195,"length":594.8688931184753},{"x":543,"y":-203,"length":579.7050974417941},{"x":531,"y":-211,"length":571.3860341310417},{"x":528,"y":-264,"length":590.3219460599445},{"x":550,"y":-265,"length":610.5120801425636},{"x":580,"y":-261,"length":636.019653784378},{"x":603,"y":-250,"length":652.770250547618},{"x":631,"y":-235,"length":673.3394389162127},{"x":650,"y":-209,"length":682.7744869281511},{"x":662,"y":-177,"length":685.2539675186127},{"x":667,"y":-134,"length":680.3271271969096},{"x":665,"y":-91,"length":671.1974374206147},{"x":695,"y":-85,"length":700.1785486574121},{"x":730,"y":-76,"length":733.9455020640156},{"x":755,"y":-67,"length":757.9670177520919},{"x":783,"y":-75,"length":786.5837526926169},{"x":820,"y":-82,"length":824.089800931913},{"x":857,"y":-82,"length":860.9140491361493},{"x":897,"y":-82,"length":900.7402511268162},{"x":933,"y":-77,"length":936.1719927449229},{"x":967,"y":-70,"length":969.5302986498152},{"x":1003,"y":-58,"length":1004.6755695248094},{"x":1030,"y":-44,"length":1030.939377461158},{"x":1064,"y":-49,"length":1065.1276918754859},{"x":1108,"y":-54,"length":1109.3151040168884},{"x":1149,"y":-57,"length":1150.4129693288405},{"x":1192,"y":-52,"length":1193.1336890726034},{"x":1228,"y":-47,"length":1228.8991008215442},{"x":1268,"y":-33,"length":1268.429343716078},{"x":1310,"y":-13,"length":1310.0645022288024},{"x":1346,"y":8,"length":1346.0237739356612},{"x":1379,"y":35,"length":1379.444090929386},{"x":1411,"y":65,"length":1412.4963716767559},{"x":1440,"y":101,"length":1443.5376683689276},{"x":1468,"y":147,"length":1475.3416553463132},{"x":1490,"y":187,"length":1501.6887160793344},{"x":1506,"y":225,"length":1522.7150094485835},{"x":1523,"y":273,"length":1547.274377736541},{"x":1533,"y":322,"length":1566.4523612290288},{"x":1538,"y":359,"length":1579.3432179231972},{"x":1537,"y":415,"length":1592.0408286221807},{"x":1531,"y":469,"length":1601.225155935292},{"x":1523,"y":511,"length":1606.4401638405334},{"x":1506,"y":560,"length":1606.7470242698444},{"x":1485,"y":610,"length":1605.4049333423638},{"x":1457,"y":651,"length":1595.822671852985},{"x":1427,"y":693,"length":1586.3725917955087},{"x":1386,"y":738,"length":1570.235651104636},{"x":1344,"y":767,"length":1547.4575923106906},{"x":1293,"y":796,"length":1518.3757769406097},{"x":1255,"y":811,"length":1494.237598241993},{"x":1166,"y":826,"length":1428.9268700671844},{"x":180,"y":836,"length":855.1584648473054},{"x":114,"y":821,"length":828.8769510608918},{"x":60,"y":807,"length":809.2274093232384},{"x":8,"y":784,"length":784.0408152641035},{"x":-33,"y":758,"length":758.7179976776615},{"x":-73,"y":725,"length":728.6659042386984},{"x":-113,"y":685,"length":694.2578771609293},{"x":-140,"y":652,"length":666.861304920296},{"x":-165,"y":608,"length":629.9912697807804},{"x":-185,"y":561,"length":590.7165140742215},{"x":-201,"y":508,"length":546.3195035874154},{"x":-211,"y":454,"length":500.6365947471279},{"x":-216,"y":402,"length":456.3551248753541},{"x":-215,"y":347,"length":408.20828017079714},{"x":-206,"y":292,"length":357.35136770411276},{"x":-193,"y":241,"length":308.75556675143525},{"x":-175,"y":195,"length":262.01145013147806},{"x":-157,"y":163,"length":226.31394124092313},{"x":-135,"y":124,"length":183.3057555015663},{"x":-107,"y":89,"length":139.17614738165446},{"x":-73,"y":52,"length":89.62700485902673},{"x":-42,"y":26,"length":49.39635614091387}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-10,"lineId":0,"wireframe":false,"physic":true,"y":290,"height":1303.05,"isRoad":true,"width":20351,"textureMode":true,"cameraOffsetY":100,"direction":90,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"line":true,"repeatTexture":true,"rotation":0,"textureOffset":0,"snapToGrid":false,"shape":true,"smoothing":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1840,"y":0,"length":1840},{"x":1900,"y":-1,"length":1900.0002631578766},{"x":1963,"y":-8,"length":1963.0163015115284},{"x":2024,"y":-23,"length":2024.1306775996454},{"x":2083,"y":-47,"length":2083.530177367249},{"x":2138,"y":-76,"length":2139.350368686719},{"x":2185,"y":-107,"length":2187.618339656166},{"x":2236,"y":-147,"length":2240.8268563188903},{"x":2275,"y":-184,"length":2282.428750257059},{"x":2312,"y":-226,"length":2323.019586658709},{"x":2347,"y":-275,"length":2363.0560721235543},{"x":2383,"y":-337,"length":2406.7110337554027},{"x":2411,"y":-404,"length":2444.613875441273},{"x":2428,"y":-463,"length":2471.750998786083},{"x":2439,"y":-521,"length":2494.025260497576},{"x":2630,"y":-521,"length":2681.108166411792},{"x":2645,"y":-463,"length":2685.2176820511218},{"x":2666,"y":-392,"length":2694.6650997851293},{"x":2692,"y":-314,"length":2710.250910893676},{"x":2722,"y":-239,"length":2732.4723237390713},{"x":2762,"y":-153,"length":2766.234444149664},{"x":2805,"y":-77,"length":2806.0566637186785},{"x":2853,"y":-3,"length":2853.0015772866304},{"x":2903,"y":67,"length":2903.7730627581764},{"x":2968,"y":150,"length":2971.7880139740787},{"x":3043,"y":231,"length":3051.7552326489094},{"x":3125,"y":312,"length":3140.536419148805},{"x":3203,"y":376,"length":3224.9937984436497},{"x":3281,"y":436,"length":3309.842443380047},{"x":3354,"y":485,"length":3388.884919851956},{"x":3436,"y":533,"length":3477.0943329164943},{"x":3515,"y":574,"length":3561.5587879466484},{"x":3604,"y":611,"length":3655.425693404258},{"x":3686,"y":640,"length":3741.1490213569414},{"x":3768,"y":664,"length":3826.0580236060196},{"x":3852,"y":685,"length":3912.4326192280937},{"x":3946,"y":701,"length":4007.7820549525895},{"x":4034,"y":711,"length":4096.178340844061},{"x":4119,"y":718,"length":4181.110498420247},{"x":4209,"y":716,"length":4269.465657433024},{"x":4305,"y":711,"length":4363.3182327215145},{"x":4392,"y":703,"length":4447.906586249311},{"x":4489,"y":689,"length":4541.568231349167},{"x":4580,"y":669,"length":4628.602488872856},{"x":4670,"y":647,"length":4714.605922025721},{"x":4767,"y":614,"length":4806.379614637196},{"x":4861,"y":574,"length":4894.772415547019},{"x":4947,"y":529,"length":4975.203513425356},{"x":5036,"y":475,"length":5058.351608973026},{"x":5123,"y":416,"length":5139.862352242519},{"x":5202,"y":353,"length":5213.963271830748},{"x":5271,"y":293,"length":5279.137240117934},{"x":5347,"y":218,"length":5351.442142077218},{"x":5409,"y":149,"length":5411.051838598481},{"x":5464,"y":81,"length":5464.600351352329},{"x":5522,"y":0,"length":5522},{"x":9278,"y":-3,"length":9278.00048501831},{"x":9845,"y":-465,"length":9855.975344936694},{"x":11244,"y":-469,"length":11253.77701040855},{"x":12357,"y":248,"length":12359.488379378816},{"x":12414,"y":286,"length":12417.294069160156},{"x":12476,"y":325,"length":12480.232409694941},{"x":12544,"y":362,"length":12549.222286659839},{"x":12607,"y":387,"length":12612.938515667156},{"x":12681,"y":409,"length":12687.594019356073},{"x":12754,"y":424,"length":12761.045881901688},{"x":12814,"y":430,"length":12821.21273515107},{"x":12877,"y":433,"length":12884.277938635134},{"x":12940,"y":429,"length":12947.109368503843},{"x":13012,"y":419,"length":13018.744371098159},{"x":13093,"y":399,"length":13099.078211843764},{"x":13175,"y":370,"length":13180.194421934753},{"x":13263,"y":324,"length":13266.956885435333},{"x":13310,"y":296,"length":13313.290953028856},{"x":13370,"y":259,"length":13372.508403437256},{"x":14597,"y":-471,"length":14604.596879065166},{"x":14781,"y":-471,"length":14788.502358251157},{"x":14908,"y":-389,"length":14913.074297407627},{"x":16308,"y":-389,"length":16312.638811669925},{"x":20338,"y":-392,"length":20341.777405133504}]}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":2731,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":75,"y":0,"length":75},{"x":150,"y":0,"length":150},{"x":230,"y":0,"length":230},{"x":310,"y":0,"length":310},{"x":400,"y":0,"length":400},{"x":475,"y":0,"length":475},{"x":550,"y":0,"length":550},{"x":630,"y":0,"length":630},{"x":715,"y":0,"length":715},{"x":790,"y":0,"length":790},{"x":875,"y":0,"length":875},{"x":950,"y":0,"length":950},{"x":1030,"y":0,"length":1030},{"x":1120,"y":0,"length":1120},{"x":1217,"y":0,"length":1217},{"x":1305,"y":0,"length":1305},{"x":1390,"y":-1,"length":1390.0003597121836},{"x":1495,"y":0,"length":1495}],"physic":true,"repeatTexture":true,"id":-1,"rotation":10,"y":-856,"height":18,"isStatic":false,"textureOffset":0,"action":0,"width":1508,"wireframe":false,"snapToGrid":true,"density":"1","textureMode":true,"shapeH":17,"type":4,"smoothing":true}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":7053,"rotation":0,"y":-262,"bg":false,"sf":false,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":0,"length":10},{"x":95,"y":195,"length":216.91011963483862},{"x":85,"y":205,"length":221.92341021172146},{"x":-90,"y":205,"length":223.8861317723811},{"x":-100,"y":195,"length":219.14607000811125}]}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":7050,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":-2,"y":3,"length":3.605551275463989},{"x":-87,"y":3,"length":87.05170877128145},{"x":-97,"y":-7,"length":97.25224933131366},{"x":-3,"y":-201,"length":201.02238681301145},{"x":11,"y":-202,"length":202.2992832414391},{"x":97,"y":-8,"length":97.32933781753577},{"x":88,"y":2,"length":88.02272433866155},{"x":-2,"y":3,"length":3.605551275463989}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":-60,"height":270.5,"isStatic":true,"textureOffset":0,"action":0,"width":270.35,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":6685,"rotation":0,"y":-450,"bg":false,"sf":false,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":0,"length":10},{"x":155,"y":185,"length":241.3503677229434},{"x":145,"y":195,"length":243.00205760445732},{"x":-145,"y":220,"length":263.48624252510797},{"x":-155,"y":210,"length":261.00766272276377}]}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":6690,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":-10,"y":19,"length":21.470910553583888},{"x":-151,"y":30,"length":153.95129099815955},{"x":-160,"y":20,"length":161.24515496597098},{"x":-5,"y":-189,"length":189.06612599828665},{"x":7,"y":-190,"length":190.12890364171355},{"x":149,"y":-6,"length":149.12075643584967},{"x":139,"y":5,"length":139.0898989862312},{"x":-10,"y":19,"length":21.470910553583888}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":-260,"height":286.5,"isStatic":true,"textureOffset":0,"action":0,"width":392,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":7425,"rotation":0,"y":-450,"bg":false,"sf":false,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":0,"length":10},{"x":160,"y":210,"length":264.0075756488817},{"x":155,"y":220,"length":269.1189328159578},{"x":-160,"y":195,"length":252.23996511258878},{"x":-165,"y":185,"length":247.8911051248108}]}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":6494,"rotation":0,"y":-133,"bg":false,"sf":false,"density":1.5,"id":-1,"viscosity":1.5,"vertices":[{"x":0,"y":0,"length":0},{"x":30,"y":40,"length":50},{"x":75,"y":85,"length":113.35784048754634},{"x":120,"y":120,"length":169.7056274847714},{"x":168,"y":149,"length":224.5551157288562},{"x":213,"y":170,"length":272.5233934912744},{"x":276,"y":195,"length":337.9363845459675},{"x":270,"y":270,"length":381.8376618407357},{"x":370,"y":287,"length":468.26167897875223},{"x":384,"y":224,"length":444.5582076623937},{"x":449,"y":232,"length":505.3958844312051},{"x":504,"y":238,"length":557.3688186470428},{"x":585,"y":239,"length":631.9382881263011},{"x":646,"y":234,"length":687.0749595204296},{"x":722,"y":225,"length":756.246652885155},{"x":728,"y":285,"length":781.7985674072319},{"x":837,"y":273,"length":880.3965015832355},{"x":833,"y":201,"length":856.907229517875},{"x":891,"y":182,"length":909.3981526262301},{"x":933,"y":164,"length":947.3040694518313},{"x":986,"y":131,"length":994.6642649658226},{"x":1035,"y":103,"length":1040.1124939159226},{"x":1070,"y":72,"length":1072.4196939631424},{"x":1101,"y":41,"length":1101.7631324381844},{"x":1125,"y":13,"length":1125.0751086038656},{"x":1108,"y":88,"length":1111.4890912645071},{"x":1075,"y":139,"length":1083.9492608051357},{"x":1035,"y":191,"length":1052.47612799531},{"x":987,"y":233,"length":1014.1291830925684},{"x":935,"y":271,"length":973.481381434694},{"x":881,"y":303,"length":931.6490755643994},{"x":825,"y":326,"length":887.0744049965595},{"x":746,"y":351,"length":824.4495133117613},{"x":681,"y":362,"length":771.2360209430055},{"x":625,"y":368,"length":725.2923548473401},{"x":618,"y":300,"length":686.9672481275945},{"x":492,"y":298,"length":575.2112655364114},{"x":490,"y":365,"length":611.0032733136542},{"x":445,"y":363,"length":574.276936677767},{"x":395,"y":353,"length":529.7489971675265},{"x":344,"y":339,"length":482.96687256995176},{"x":298,"y":323,"length":439.46899776889836},{"x":248,"y":298,"length":387.6957570054127},{"x":185,"y":261,"length":319.9156138734088},{"x":140,"y":230,"length":269.2582403567252},{"x":95,"y":190,"length":212.42645786248002},{"x":60,"y":150,"length":161.55494421403512},{"x":30,"y":105,"length":109.20164833920778},{"x":10,"y":55,"length":55.90169943749474}]}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":7410,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":5,"y":-4,"length":6.4031242374328485},{"x":-144,"y":-14,"length":144.6789549312546},{"x":-150,"y":-25,"length":152.0690632574555},{"x":13,"y":-210,"length":210.40199618824911},{"x":25,"y":-211,"length":212.47588098417194},{"x":175,"y":0,"length":175},{"x":169,"y":8,"length":169.1892431568863},{"x":11,"y":-3,"length":11.40175425099138}],"physic":false,"repeatTexture":true,"id":-1,"rotation":0,"y":-240,"height":285.55,"isStatic":true,"textureOffset":0,"action":0,"width":403.4,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":7630,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":2,"y":35,"length":35.05709628591621},{"x":-13,"y":100,"length":100.84145972763385},{"x":-34,"y":148,"length":151.85519418182574},{"x":-63,"y":189,"length":199.2234925906079},{"x":-92,"y":224,"length":242.15697388264496},{"x":-126,"y":255,"length":284.43101096751036},{"x":-159,"y":282,"length":323.736003558455},{"x":-206,"y":313,"length":374.70655185091175},{"x":-248,"y":337,"length":418.4172558583119},{"x":-302,"y":360,"length":469.89786124220655},{"x":-354,"y":379,"length":518.6106439324207},{"x":-400,"y":391,"length":559.3576673292322},{"x":-453,"y":400,"length":604.3252435568119},{"x":-522,"y":406,"length":661.3017465575},{"x":-527,"y":338,"length":626.0774712445736},{"x":-633,"y":336,"length":716.6484493808663},{"x":-637,"y":405,"length":754.8470043657853},{"x":-684,"y":403,"length":793.8923100773807},{"x":-752,"y":389,"length":846.6551836491642},{"x":-789,"y":379,"length":875.3068033552578},{"x":-840,"y":361,"length":914.2871540167235},{"x":-897,"y":336,"length":957.8648130085999},{"x":-950,"y":305,"length":997.7599911802437},{"x":-995,"y":273,"length":1031.7722616934418},{"x":-1029,"y":245,"length":1057.7646241012224},{"x":-1062,"y":212,"length":1082.9533692638847},{"x":-1091,"y":171,"length":1104.3197000868906},{"x":-1117,"y":130,"length":1124.5394612907098},{"x":-1137,"y":83,"length":1140.0254383126721},{"x":-1146,"y":34,"length":1146.504252063637},{"x":-1145,"y":-16,"length":1145.1117849363004}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":-160,"height":463.2,"isStatic":true,"textureOffset":0,"action":0,"width":1212.25,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":7050,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":-564,"y":-355,"length":666.4240391822611},{"x":-545,"y":-316,"length":629.9849204544503},{"x":-523,"y":-283,"length":594.6578848379966},{"x":-493,"y":-250,"length":552.7648686376514},{"x":-460,"y":-222,"length":510.7680491181883},{"x":-423,"y":-194,"length":465.3654477934519},{"x":-376,"y":-168,"length":411.82520563948003},{"x":-323,"y":-144,"length":353.6453025278294},{"x":-266,"y":-122,"length":292.64312737530673},{"x":-275,"y":-49,"length":279.3313444638822},{"x":-194,"y":-34,"length":196.95684806576287},{"x":-180,"y":-100,"length":205.91260281974002},{"x":-123,"y":-91,"length":153.00326793895613},{"x":-68,"y":-86,"length":109.63576058932597},{"x":-19,"y":-84,"length":86.12200647918046},{"x":23,"y":-84,"length":87.09190547921202},{"x":67,"y":-85,"length":108.23123393919151},{"x":126,"y":-91,"length":155.42522317822161},{"x":175,"y":-98,"length":200.57168294652163},{"x":182,"y":-36,"length":185.52627846210896},{"x":267,"y":-48,"length":271.28029784707917},{"x":264,"y":-118,"length":289.1712295509358},{"x":310,"y":-132,"length":336.93322780634145},{"x":353,"y":-148,"length":382.7701660265596},{"x":389,"y":-166,"length":422.93852981254855},{"x":422,"y":-186,"length":461.17241894978935},{"x":459,"y":-208,"length":503.9295585694493},{"x":500,"y":-240,"length":554.616984954482},{"x":532,"y":-271,"length":597.0468993303625},{"x":552,"y":-298,"length":627.3021600472933},{"x":580,"y":-347,"length":675.8764680028445}],"physic":true,"repeatTexture":true,"id":-1,"rotation":0,"y":178,"height":372.15,"isStatic":true,"textureOffset":0,"action":0,"width":1200.55,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"originOffsetRatio":0,"x":8210,"safeId":-1,"stretchTexture":false,"graphic":true,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":879,"y":2,"length":879.0022753099107}],"physic":false,"repeatTexture":true,"id":-1,"rotation":0,"y":-165,"height":66,"isStatic":true,"textureOffset":0,"action":0,"width":892,"wireframe":false,"snapToGrid":false,"density":"1","textureMode":true,"shapeH":64,"type":5,"smoothing":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":8210,"rotation":0,"graphic":false,"id":-1,"line":true,"physic":true,"plr":false,"y":-169,"rem":true,"density":1,"ignore":false,"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":880,"y":0,"length":880},{"x":880,"y":50,"length":881.4193099768123},{"x":0,"y":50,"length":50}],"isStatic":true,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":11230,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":-640,"rem":true,"density":1,"ignore":false,"layer":8,"vertices":[{"x":225,"y":-1190,"length":1211.084224981896},{"x":3045,"y":-1160,"length":3258.469732865414},{"x":3100,"y":-1045,"length":3271.3949623975395},{"x":3100,"y":-855,"length":3215.7464141315622},{"x":3100,"y":-680,"length":3173.704460090763},{"x":3100,"y":-520,"length":3143.31035693264},{"x":3100,"y":-415,"length":3127.6548722645216},{"x":3100,"y":-320,"length":3116.472364709817},{"x":3100,"y":-225,"length":3108.154597184638},{"x":3100,"y":-135,"length":3102.938123778816},{"x":3100,"y":-30,"length":3100.145157891804},{"x":3100,"y":40,"length":3100.258053775524},{"x":3100,"y":130,"length":3102.724609113738},{"x":3100,"y":210,"length":3107.104761671225},{"x":3100,"y":280,"length":3112.6194756185664},{"x":2995,"y":340,"length":3014.237051062839},{"x":2905,"y":390,"length":2931.0620941904317},{"x":2839,"y":427,"length":2870.9319044519325},{"x":2769,"y":468,"length":2808.2708202735716},{"x":2690,"y":510,"length":2737.918917718346},{"x":2606,"y":555,"length":2664.443844407309},{"x":2515,"y":605,"length":2586.745058949567},{"x":2435,"y":650,"length":2520.262883113585},{"x":2363,"y":692,"length":2462.2414585088927},{"x":2290,"y":730,"length":2403.539057306954},{"x":2219,"y":769,"length":2348.472269370026},{"x":2145,"y":810,"length":2292.8421227812437},{"x":2085,"y":810,"length":2236.811346537745},{"x":2015,"y":810,"length":2171.7101556146945},{"x":1945,"y":810,"length":2106.9231120285335},{"x":1865,"y":810,"length":2033.303961536494},{"x":1780,"y":810,"length":1955.632889885011},{"x":1715,"y":810,"length":1896.6615407077775},{"x":1635,"y":810,"length":1824.643800855389},{"x":1545,"y":810,"length":1744.455502441951},{"x":1455,"y":810,"length":1665.2702483380888},{"x":1370,"y":810,"length":1591.5401345866212},{"x":1280,"y":810,"length":1514.7607071745688},{"x":1195,"y":810,"length":1443.6498883039474},{"x":1120,"y":810,"length":1382.208377922808},{"x":1059,"y":770,"length":1309.3437287435258},{"x":1004,"y":733,"length":1243.1029724041368},{"x":955,"y":702,"length":1185.2548249216284},{"x":893,"y":661,"length":1111.022051986368},{"x":840,"y":625,"length":1047.00764085082},{"x":773,"y":582,"length":967.6016742441076},{"x":725,"y":550,"length":910.0137361600648},{"x":657,"y":506,"length":829.2677492824619},{"x":590,"y":460,"length":748.1310045707236},{"x":520,"y":412,"length":663.4334932757013},{"x":455,"y":370,"length":586.4511914899654},{"x":395,"y":330,"length":514.7086554547145},{"x":330,"y":285,"length":436.033255612459},{"x":275,"y":250,"length":371.6517186829626},{"x":220,"y":215,"length":307.6117683054405},{"x":220,"y":145,"length":263.48624252510797},{"x":220,"y":85,"length":235.8495283014151},{"x":220,"y":10,"length":220.22715545545242},{"x":220,"y":-65,"length":229.40139493908924},{"x":220,"y":-150,"length":266.27053911388697},{"x":220,"y":-235,"length":321.90837205639747},{"x":220,"y":-310,"length":380.13155617496426},{"x":220,"y":-380,"length":439.089968002003},{"x":220,"y":-475,"length":523.4739726099092},{"x":220,"y":-560,"length":601.6643582596529},{"x":220,"y":-635,"length":672.0305052599919},{"x":220,"y":-740,"length":772.0103626247513},{"x":220,"y":-840,"length":868.3317338436964},{"x":220,"y":-925,"length":950.8022928032935},{"x":220,"y":-1035,"length":1058.1233387464808}],"isStatic":false,"safeId":-1,"isWheel":false}},{"className":"frg.game.editor.objects::FinishShaper","params":{"x":18120,"rotation":0,"y":-710,"vertices":[{"x":0,"y":-705,"length":705},{"x":890,"y":-705,"length":1135.3964065470702},{"x":890,"y":100,"length":895.6003573022958},{"x":0,"y":100,"length":100}]}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":0,"rotation":0,"graphic":true,"id":-1,"line":true,"physic":true,"plr":false,"y":-510,"rem":true,"density":1,"ignore":false,"layer":2,"vertices":[{"x":-400,"y":0,"length":400},{"x":290,"y":0,"length":290},{"x":290,"y":805,"length":855.6430330459075},{"x":-400,"y":805,"length":898.9021081296895}],"isStatic":true,"safeId":-1,"isWheel":false}}],[{"className":"SpikeBall200E","params":{"x":8520,"active":true,"y":-270,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SpikeBall200E","params":{"x":8843,"active":true,"y":-270,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SpikeBall137E","params":{"x":2525,"active":true,"y":-227,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":301.8,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SpikeBall200E","params":{"x":2743,"active":true,"y":-854,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"PlankBone","params":{"x":8641,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":80,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8614,"id":-1,"active":true,"y":-218,"safeId":-1,"rotation":90,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8624,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":80,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8603,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":74,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8632,"id":-1,"active":true,"y":-218,"safeId":-1,"rotation":90,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8655,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":80,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8672,"id":-1,"active":true,"y":-218,"safeId":-1,"rotation":80,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8680,"id":-1,"active":true,"y":-218,"safeId":-1,"rotation":90,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8664,"id":-1,"active":true,"y":-218,"safeId":-1,"rotation":90,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8688,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":80,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8649,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":-90,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8748,"id":-1,"active":true,"y":-211,"safeId":-1,"rotation":122,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8698,"id":-1,"active":true,"y":-218,"safeId":-1,"rotation":90,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8706,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":80,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8716,"id":-1,"active":true,"y":-218,"safeId":-1,"rotation":90,"width":85.95,"height":17.05}},{"className":"PlankBone","params":{"x":8724,"id":-1,"active":true,"y":-217,"safeId":-1,"rotation":80,"width":85.95,"height":17.05}},{"className":"SpikeBall200E","params":{"x":11770,"active":true,"y":50,"ag":true,"sgos":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"btg":true,"scaleY":1,"safeId":-1,"rotation":0}},{"className":"SignPillar","params":{"scaleX":1,"rotation":0,"scaleY":1,"x":10110,"y":-240,"width":9.3,"height":128.35}},{"className":"Dec26","params":{"x":830,"rotation":0,"y":260,"width":95,"height":72.35}},{"className":"Dec28","params":{"x":760,"rotation":-18,"y":260,"width":71.6,"height":72.35}},{"className":"Dec27","params":{"x":410,"rotation":0,"y":250,"width":92.7,"height":85.5}},{"className":"Dec28","params":{"x":1600,"rotation":0,"y":258,"width":71.6,"height":72.35}},{"className":"Dec26","params":{"x":3130,"rotation":36,"y":560,"width":95,"height":72.35}},{"className":"Dec28","params":{"x":4080,"rotation":0,"y":970,"width":71.6,"height":72.35}},{"className":"Dec26","params":{"x":4160,"rotation":0,"y":970,"width":95,"height":72.35}},{"className":"Dec26","params":{"x":5970,"rotation":-9,"y":250,"width":95,"height":72.35}},{"className":"Dec28","params":{"x":6050,"rotation":6,"y":250,"width":71.6,"height":72.35}},{"className":"Dec24","params":{"scaleX":1,"rotation":0,"scaleY":1,"x":10073,"y":-230,"width":80.2,"height":95.5}},{"className":"Dec28","params":{"x":10580,"rotation":0,"y":-210,"width":71.6,"height":72.35}},{"className":"Dec26","params":{"x":12870,"rotation":0,"y":690,"width":95,"height":72.35}},{"className":"Dec28","params":{"x":12800,"rotation":-9,"y":690,"width":71.6,"height":72.35}}],[{"className":"BoostE","params":{"x":3390,"rotation":0,"y":720,"time":0.7,"safeId":-1,"width":64.1,"force":8500,"height":64.1}},{"className":"Tnt1","params":{"x":8683,"count":50,"rotation":0,"y":-288,"stones":false,"physic":false,"impulse":4200,"id":3,"width":53.2,"radius":250,"height":53.2,"safeId":-1}},{"className":"Tnt1","params":{"x":11870,"count":40,"rotation":0,"y":140,"stones":false,"physic":false,"impulse":9000,"id":21,"width":53.2,"radius":150,"height":53.2,"safeId":-1}}],null,[{"className":"PlayerWP","params":{"x":640,"rotation":0,"y":210,"width":64,"height":32}},{"className":"SafePointE","params":{"x":10110,"rotation":0,"y":-320,"id":0,"width":128,"height":1584}}],[{"className":"frg.game.editor.objects::MoverPather","params":{"cycle":0,"rotation":0,"y":274,"x":18540,"id":9,"active":0,"width":13,"height":701,"body":false,"accelDist":10,"snapToGrid":true,"sideWait":0,"safeId":-1,"stopOnEnd":true,"position":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-688,"length":688}],"startTime":"0","speed":400}},{"className":"frg.game.editor.objects::MoverPather","params":{"cycle":0,"rotation":0,"y":120,"x":17050,"id":8,"active":0,"width":13,"height":317,"body":false,"accelDist":10,"snapToGrid":true,"sideWait":0,"safeId":-1,"stopOnEnd":true,"position":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-304,"length":304}],"startTime":"0","speed":200}},{"className":"MotorJointE","params":{"x":2525,"useWeld":false,"rotation":0,"y":-227,"id":1,"graphic":1,"height":17,"width":17,"time":0,"safeId":-1,"rate":180,"snd":false}},{"className":"ToggleE","params":{"x":1630,"safeId":-1,"rotation":0,"y":70,"sndId":-1,"fnl":false,"off":false,"id":1,"id_off":-1,"width":64,"height":1344}},{"className":"PivotJointE","params":{"x":2920,"safeId":-1,"rotation":0,"graphic":0,"id":2,"y":-821,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":4180,"safeId":-1,"rotation":0,"graphic":0,"id":-1,"y":-600,"width":17,"height":17}},{"className":"ToggleE","params":{"x":2624,"safeId":-1,"rotation":25,"y":-550,"sndId":-1,"fnl":false,"off":false,"id":2,"id_off":-1,"width":69,"height":753}},{"className":"MotorJointE","params":{"x":2743,"useWeld":false,"rotation":0,"y":-854,"id":1,"graphic":1,"height":17,"width":17,"time":0,"safeId":-1,"rate":-180,"snd":false}},{"className":"PivotJointE","params":{"x":8594,"safeId":-1,"rotation":84,"graphic":0,"id":-1,"y":-252,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8634,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-253,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8631,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8616,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-253,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8614,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8649,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8696,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8666,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-253,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8649,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-253,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8682,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-253,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8678,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8663,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8768,"safeId":-1,"rotation":132,"graphic":0,"id":-1,"y":-242,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8520,"safeId":-1,"rotation":0,"graphic":0,"id":3,"y":-290,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8843,"safeId":-1,"rotation":0,"graphic":0,"id":3,"y":-290,"width":17,"height":17}},{"className":"ToggleE","params":{"x":7908,"safeId":-1,"rotation":36,"y":-923,"sndId":-1,"fnl":false,"off":false,"id":3,"id_off":-1,"width":148,"height":1311}},{"className":"PivotJointE","params":{"x":8700,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-253,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8714,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8718,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-253,"width":17,"height":17}},{"className":"PivotJointE","params":{"x":8732,"safeId":-1,"rotation":90,"graphic":0,"id":-1,"y":-183,"width":17,"height":17}},{"className":"frg.game.editor.objects::MoverPather","params":{"cycle":0,"rotation":0,"y":-940,"x":12860,"id":5,"active":0,"width":13,"height":397,"body":false,"accelDist":10,"snapToGrid":true,"sideWait":0,"safeId":-1,"stopOnEnd":false,"position":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":384,"length":384}],"startTime":"0","speed":260}},{"className":"ToggleE","params":{"x":11740,"safeId":-1,"rotation":-45,"y":-40,"sndId":-1,"fnl":false,"off":false,"id":5,"id_off":-1,"width":465,"height":64}},{"className":"frg.game.editor.objects::MoverPather","params":{"cycle":0,"rotation":0,"y":110,"x":15590,"id":7,"active":0,"width":13,"height":317,"body":false,"accelDist":10,"snapToGrid":true,"sideWait":0,"safeId":-1,"stopOnEnd":true,"position":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-304,"length":304}],"startTime":"0","speed":200}},{"className":"ToggleE","params":{"x":15060,"safeId":-1,"rotation":0,"y":-590,"sndId":-1,"fnl":false,"off":false,"id":7,"id_off":-1,"width":64,"height":1149}},{"className":"ToggleE","params":{"x":16270,"safeId":-1,"rotation":0,"y":-520,"sndId":-1,"fnl":false,"off":false,"id":8,"id_off":-1,"width":64,"height":1149}},{"className":"ToggleE","params":{"x":17870,"safeId":-1,"rotation":0,"y":-530,"sndId":-1,"fnl":false,"off":false,"id":9,"id_off":-1,"width":64,"height":1149}},{"className":"PivotJointE","params":{"x":11790,"safeId":-1,"rotation":0,"graphic":0,"id":21,"y":30,"width":17,"height":17}},{"className":"ToggleE","params":{"x":11330,"safeId":-1,"rotation":39,"y":-570,"sndId":-1,"fnl":false,"off":false,"id":21,"id_off":-1,"width":820,"height":64}}]]} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map5.json b/motox3mspooky/assets/levels/map5.json deleted file mode 100644 index b72803be..00000000 --- a/motox3mspooky/assets/levels/map5.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":6210,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":10,"y":-25,"length":26.92582403567252},{"x":45,"y":-25,"length":51.478150704935004},{"x":85,"y":0,"length":85},{"x":130,"y":15,"length":130.86252328302402},{"x":275,"y":15,"length":275.40878707840824},{"x":325,"y":-5,"length":325.0384592629002},{"x":360,"y":-30,"length":361.24783736376884},{"x":405,"y":-30,"length":406.1095911204265},{"x":425,"y":-5,"length":425.0294107470682},{"x":430,"y":30,"length":431.0452412450461},{"x":415,"y":60,"length":419.3149174546501},{"x":390,"y":85,"length":399.15535822534065},{"x":340,"y":100,"length":354.400902933387},{"x":45,"y":100,"length":109.65856099730654},{"x":0,"y":85,"length":85},{"x":-15,"y":55,"length":57.0087712549569},{"x":-20,"y":25,"length":32.01562118716424},{"x":-15,"y":0,"length":15}],"y":1240},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5120,"bg":true,"rotation":0,"y":1260,"vertices":[{"x":0,"y":0,"length":0},{"x":2120,"y":0,"length":2120},{"x":2130,"y":680,"length":2235.9114472626147},{"x":10,"y":680,"length":680.0735254367721}],"viscosity":1.5,"id":-1,"sf":true,"density":2.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":730,"bg":true,"rotation":0,"y":310,"vertices":[{"x":0,"y":0,"length":0},{"x":4355,"y":0,"length":4355},{"x":4315,"y":575,"length":4353.142543037156},{"x":4205,"y":1080,"length":4341.4772831376185},{"x":3855,"y":1235,"length":4047.9933300340304},{"x":-70,"y":645,"length":648.7873303325213}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":5090,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":90,"y":-975,"length":979.1450352220553},{"x":140,"y":-935,"length":945.4231856687247},{"x":195,"y":-880,"length":901.3462153911781},{"x":232,"y":-836,"length":867.5943752699184},{"x":251,"y":-786,"length":825.1042358393272},{"x":270,"y":-700,"length":750.2666192761077},{"x":270,"y":-625,"length":680.8267033540915},{"x":264,"y":-571,"length":629.0763069771425},{"x":252,"y":-515,"length":573.3489338962793},{"x":193,"y":-321,"length":374.55306700119274},{"x":173,"y":-255,"length":308.14606925936926},{"x":160,"y":-200,"length":256.12496949731394},{"x":135,"y":-64,"length":149.40214188558343},{"x":114,"y":16,"length":115.11733144926528},{"x":80,"y":80,"length":113.13708498984761},{"x":55,"y":160,"length":169.1892431568863},{"x":55,"y":245,"length":251.09759058979438},{"x":71,"y":345,"length":352.23003846918},{"x":185,"y":635,"length":661.4000302388865},{"x":-595,"y":590,"length":837.9289946051515},{"x":-490,"y":120,"length":504.47993022517755},{"x":-205,"y":-25,"length":206.51876428063383},{"x":-145,"y":-135,"length":198.11612756158948},{"x":-120,"y":-255,"length":281.82441342083905},{"x":-100,"y":-385,"length":397.77506206397607},{"x":-95,"y":-485,"length":494.2165517260627},{"x":-105,"y":-575,"length":584.5083404024274},{"x":-120,"y":-675,"length":685.5836929215864},{"x":-120,"y":-760,"length":769.4153624668538},{"x":-105,"y":-830,"length":836.6152042605968},{"x":-75,"y":-885,"length":888.1722805852477},{"x":-45,"y":-920,"length":921.0998860058555},{"x":-35,"y":-955,"length":955.6411460375699},{"x":-20,"y":-970,"length":970.2061636580135},{"x":35,"y":-1000,"length":1000.6123125366787}],"y":1270},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":4870,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-280,"density":"1","height":396,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":383,"length":383}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":6760,"rotation":0,"y":-660,"vertices":[{"x":0,"y":0,"length":0},{"x":1530,"y":0,"length":1530},{"x":1525,"y":515,"length":1609.6117544302415},{"x":-5,"y":515,"length":515.0242712727236}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"stretchTexture":false,"x":2510,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-140,"density":"1","height":259,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":137,"length":137},{"x":0,"y":383,"length":383}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1558,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-146,"density":"1","height":270,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":126,"length":126},{"x":0,"y":383,"length":383}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":8219,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":150,"y":0,"length":150},{"x":144,"y":38,"length":148.92951352905172},{"x":129,"y":74,"length":148.71785366928881},{"x":106,"y":106,"length":149.90663761154806},{"x":75,"y":129,"length":149.21796138535066},{"x":38,"y":144,"length":148.92951352905172},{"x":0,"y":150,"length":150},{"x":-38,"y":144,"length":148.92951352905172},{"x":-74,"y":129,"length":148.71785366928881},{"x":-106,"y":106,"length":149.90663761154806},{"x":-129,"y":74,"length":148.71785366928881},{"x":-144,"y":38,"length":148.92951352905172},{"x":-150,"y":0,"length":150},{"x":-144,"y":-38,"length":148.92951352905172},{"x":-129,"y":-75,"length":149.21796138535066},{"x":-106,"y":-106,"length":149.90663761154806},{"x":-75,"y":-129,"length":149.21796138535066},{"x":-38,"y":-144,"length":148.92951352905172},{"x":0,"y":-150,"length":150},{"x":38,"y":-144,"length":148.92951352905172},{"x":75,"y":-129,"length":149.21796138535066},{"x":106,"y":-106,"length":149.90663761154806},{"x":129,"y":-75,"length":149.21796138535066},{"x":144,"y":-38,"length":148.92951352905172}],"y":1433},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":2070,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-140,"density":"1","height":259,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":137,"length":137},{"x":0,"y":383,"length":383}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1570,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":240,"density":"1","height":289.05,"action":0,"isStatic":true,"wireframe":false,"width":1392.35,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":32,"y":7,"length":32.7566787083184},{"x":56,"y":25,"length":61.326992425847855},{"x":70,"y":42,"length":81.6333265278342},{"x":78,"y":64,"length":100.89598604503551},{"x":79,"y":85,"length":116.04309544302927},{"x":74,"y":106,"length":129.2749008895385},{"x":63,"y":125,"length":139.97856978837868},{"x":48,"y":140,"length":148},{"x":28,"y":152,"length":154.55743269089325},{"x":5,"y":156,"length":156.08010763707205},{"x":-19,"y":154,"length":155.16765126791086},{"x":-41,"y":145,"length":150.68510211696443},{"x":-56,"y":133,"length":144.30869689661813},{"x":-68,"y":117,"length":135.32553343696821},{"x":-76,"y":95,"length":121.65936051122412},{"x":-77,"y":74,"length":106.7941945987702},{"x":-73,"y":55,"length":91.40021881811882},{"x":-64,"y":36,"length":73.43023900274328},{"x":-50,"y":19,"length":53.48831648126533},{"x":-29,"y":6,"length":29.614185789921695},{"x":-1,"y":0,"length":1},{"x":70,"y":0,"length":70},{"x":145,"y":0,"length":145},{"x":210,"y":0,"length":210},{"x":265,"y":0,"length":265},{"x":325,"y":0,"length":325},{"x":400,"y":0,"length":400},{"x":470,"y":0,"length":470},{"x":535,"y":0,"length":535},{"x":600,"y":0,"length":600},{"x":670,"y":0,"length":670},{"x":745,"y":0,"length":745},{"x":820,"y":0,"length":820},{"x":885,"y":0,"length":885},{"x":970,"y":0,"length":970},{"x":1045,"y":0,"length":1045},{"x":1100,"y":0,"length":1100},{"x":1140,"y":-5,"length":1140.010964859549},{"x":1173,"y":-13,"length":1173.0720352987705},{"x":1211,"y":-29,"length":1211.3471839237502},{"x":1242,"y":-52,"length":1243.0880902011731},{"x":1275,"y":-85,"length":1277.8301921616971},{"x":1300,"y":-118,"length":1305.344398999743}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":5050,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-140,"density":"1","height":396,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":383,"length":383}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":4500,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-140,"density":"1","height":396,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":383,"length":383}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":3900,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-140,"density":"1","height":396,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":383,"length":383}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":130,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":155,"y":-150,"length":215.6965461012299},{"x":165,"y":-90,"length":187.94946129212502},{"x":185,"y":-40,"length":189.274932307477},{"x":215,"y":-15,"length":215.52262062252305},{"x":240,"y":0,"length":240},{"x":570,"y":-1,"length":570.0008771923075},{"x":664,"y":-31,"length":664.7232506840722},{"x":695,"y":-15,"length":695.1618516575834},{"x":720,"y":16,"length":720.1777558353216},{"x":715,"y":56,"length":717.1896541361984},{"x":690,"y":95,"length":696.5091528472544},{"x":655,"y":110,"length":664.1724173736817},{"x":625,"y":130,"length":638.3768479511142},{"x":600,"y":170,"length":623.6184731067545},{"x":598,"y":218,"length":636.4966614209378},{"x":601,"y":296,"length":669.9380568380931},{"x":609,"y":350,"length":702.4108484355862},{"x":735,"y":770,"length":1064.4834428021884},{"x":0,"y":770,"length":770},{"x":-135,"y":115,"length":177.341478509682},{"x":-145,"y":60,"length":156.92354826475216},{"x":-160,"y":20,"length":161.24515496597098},{"x":55,"y":-455,"length":458.31212072123947},{"x":95,"y":-410,"length":420.86221023037933},{"x":155,"y":-300,"length":337.6758800980609},{"x":150,"y":-225,"length":270.4163456597992}],"y":200},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":146,"physic":false,"lineId":0,"y":310,"height":1520.5,"isRoad":false,"direction":90,"width":10453,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":4455,"y":0,"length":4455},{"x":5135,"y":900,"length":5213.273923361404},{"x":5225,"y":935,"length":5307.9986812357065},{"x":5460,"y":980,"length":5547.251571724506},{"x":7840,"y":935,"length":7895.557295086902},{"x":8310,"y":1245,"length":8402.745087172405},{"x":8555,"y":1425,"length":8672.868614247538},{"x":8790,"y":1480,"length":8913.725371582861},{"x":9000,"y":1450,"length":9116.057261777154},{"x":9200,"y":1365,"length":9300.71099432726},{"x":9390,"y":1160,"length":9461.379392033701},{"x":9665,"y":775,"length":9696.022380337206},{"x":10440,"y":335,"length":10445.373377720874}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"stretchTexture":false,"x":3710,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":127,"density":"1","height":1115,"action":0,"isStatic":true,"wireframe":false,"width":1828.3,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-28,"y":5,"length":28.442925306655784},{"x":-4,"y":37,"length":37.21558813185679},{"x":24,"y":63,"length":67.4166151627327},{"x":56,"y":84,"length":100.9554357129917},{"x":93,"y":99,"length":135.83077707206124},{"x":128,"y":108,"length":167.47537132366656},{"x":172,"y":112,"length":205.25106577068},{"x":225,"y":115,"length":252.68557536986555},{"x":300,"y":115,"length":321.2864765283469},{"x":380,"y":115,"length":397.0201506221063},{"x":465,"y":115,"length":479.0093944798995},{"x":550,"y":115,"length":561.8941181397079},{"x":625,"y":115,"length":635.4919354327009},{"x":705,"y":115,"length":714.3178564196754},{"x":795,"y":115,"length":803.2745483332582},{"x":875,"y":115,"length":882.5247871873062},{"x":960,"y":115,"length":966.8634857103665},{"x":1040,"y":115,"length":1046.33885524719},{"x":1125,"y":115,"length":1130.862502694293},{"x":1205,"y":115,"length":1210.4751133336033},{"x":1270,"y":115,"length":1275.1960633565334},{"x":1321,"y":115,"length":1325.9962292555738},{"x":1365,"y":121,"length":1370.3525093931123},{"x":1410,"y":133,"length":1416.2588040326527},{"x":1452,"y":152,"length":1459.9342450946208},{"x":1491,"y":177,"length":1501.4692804050305},{"x":1528,"y":206,"length":1541.8235956165672},{"x":1559,"y":235,"length":1576.612190743177},{"x":1587,"y":267,"length":1609.3035760850096},{"x":1611,"y":305,"length":1639.6176383535278},{"x":1633,"y":353,"length":1670.717809805115},{"x":1648,"y":402,"length":1696.3219034133822},{"x":1655,"y":454,"length":1716.1413111978861},{"x":1655,"y":512,"length":1732.3882359332738},{"x":1648,"y":567,"length":1742.811808543883},{"x":1636,"y":616,"length":1748.1281417562043},{"x":1617,"y":684,"length":1755.7178019260384},{"x":1596,"y":755,"length":1765.5710124489472},{"x":1575,"y":825,"length":1777.9904386694548},{"x":1551,"y":902,"length":1794.2143127285547},{"x":1545,"y":934,"length":1805.37558419294},{"x":1544,"y":962,"length":1819.170140476146},{"x":1550,"y":991,"length":1839.7230769874036},{"x":1558,"y":1014,"length":1858.913661254874},{"x":1569,"y":1033,"length":1878.5233562561846},{"x":1584,"y":1053,"length":1902.0686107498857},{"x":1602,"y":1070,"length":1926.4745002205455},{"x":1625,"y":1086,"length":1954.487400829179},{"x":1653,"y":1099,"length":1984.9962216588726},{"x":1681,"y":1105,"length":2011.6624965435926},{"x":1708,"y":1105,"length":2034.278496174995},{"x":1737,"y":1100,"length":2056.008025276166},{"x":1764,"y":1091,"length":2074.1207775826365},{"x":1787,"y":1077,"length":2086.455846645215}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1580,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-605,"length":605},{"x":995,"y":-600,"length":1161.9057620994915},{"x":1010,"y":-350,"length":1068.9246933250256},{"x":1008,"y":-230,"length":1033.9071525045176},{"x":990,"y":-160,"length":1002.8459502834919},{"x":970,"y":-120,"length":977.3944955850734},{"x":957,"y":-66,"length":959.2731623474098},{"x":960,"y":-25,"length":960.3254656625534},{"x":978,"y":5,"length":978.0127811025784},{"x":1015,"y":40,"length":1015.7878715558677},{"x":1012,"y":72,"length":1014.5580318542651},{"x":995,"y":105,"length":1000.5248622598041},{"x":968,"y":117,"length":975.0451271607894},{"x":936,"y":120,"length":943.6609560642},{"x":906,"y":97,"length":911.1778092117916},{"x":880,"y":55,"length":881.7170748034769},{"x":831,"y":25,"length":831.3759678990006},{"x":780,"y":20,"length":780.2563681252464},{"x":743,"y":25,"length":743.4204732182186},{"x":696,"y":46,"length":697.51845853712},{"x":613,"y":92,"length":619.8653079500417},{"x":570,"y":109,"length":580.3283553299804},{"x":495,"y":120,"length":509.33780539048934},{"x":447,"y":111,"length":460.575726672607},{"x":403,"y":91,"length":413.14646313383827},{"x":361,"y":73,"length":368.30693721405794},{"x":278,"y":53,"length":283.0070670495703},{"x":190,"y":41,"length":194.3733520830466},{"x":110,"y":53,"length":122.10241602851272},{"x":45,"y":70,"length":83.21658488546619},{"x":-30,"y":95,"length":99.62429422585637},{"x":-74,"y":103,"length":126.82665335015349},{"x":-142,"y":83,"length":164.47796204963143},{"x":-165,"y":50,"length":172.40939649566667},{"x":-157,"y":-10,"length":157.31814898478814},{"x":-125,"y":-60,"length":138.6542462386205},{"x":-95,"y":-98,"length":136.48809471891678},{"x":-70,"y":-170,"length":183.84776310850236},{"x":-10,"y":-295,"length":295.16944286290885}],"y":-100},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":3840,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-20,"y":-1185,"length":1185.1687643538367},{"x":730,"y":-1680,"length":1831.7477992343815},{"x":2470,"y":-740,"length":2578.4685377176893},{"x":4405,"y":-695,"length":4459.489881141116},{"x":4400,"y":-125,"length":4401.775210071501},{"x":2955,"y":-125,"length":2957.64264237585},{"x":2950,"y":500,"length":2992.072860075436},{"x":2840,"y":498,"length":2883.3321001924146},{"x":2767,"y":510,"length":2813.6078262615065},{"x":2712,"y":546,"length":2766.4164545490976},{"x":2641,"y":563,"length":2700.342570860223},{"x":2576,"y":550,"length":2634.0607434150033},{"x":2523,"y":556,"length":2583.537303775581},{"x":2486,"y":592,"length":2555.5156035524415},{"x":2480,"y":652,"length":2564.2745562829264},{"x":2495,"y":720,"length":2596.810543724744},{"x":2505,"y":768,"length":2620.0856856217506},{"x":2484,"y":820,"length":2615.8470903323077},{"x":2435,"y":851,"length":2579.4235790191574},{"x":2377,"y":864,"length":2529.1549972273347},{"x":2335,"y":901,"length":2502.8036279340813},{"x":2312,"y":935,"length":2493.9063735433215},{"x":2260,"y":954,"length":2453.103340668713},{"x":2151,"y":970,"length":2359.5976351912204},{"x":2048,"y":1000,"length":2279.101577376489},{"x":1964,"y":1032,"length":2218.630208033777},{"x":1875,"y":1061,"length":2154.3783326054872},{"x":1797,"y":1102,"length":2107.9879031910978},{"x":1746,"y":1131,"length":2080.306948505436},{"x":1702,"y":1134,"length":2045.1796987062041},{"x":1654,"y":1115,"length":1994.7283023008422},{"x":1641,"y":1087,"length":1968.362263405799},{"x":1664,"y":1022,"length":1952.7877508833365},{"x":1680,"y":965,"length":1937.4274179953168},{"x":1718,"y":923,"length":1950.2443436656854},{"x":1755,"y":875,"length":1961.032891106113},{"x":1760,"y":815,"length":1939.5424718216407},{"x":1760,"y":690,"length":1890.4232330353962},{"x":1780,"y":605,"length":1880.0066489244127},{"x":1778,"y":544,"length":1859.3601049823565},{"x":1772,"y":492,"length":1839.034529311508},{"x":1757,"y":438,"length":1810.7713825880946},{"x":1725,"y":370,"length":1764.2349616760234},{"x":1645,"y":270,"length":1667.0107978054612},{"x":1562,"y":225,"length":1578.121985145635},{"x":1508,"y":181,"length":1518.8235578894607},{"x":1470,"y":125,"length":1475.3050532008626},{"x":1443,"y":88,"length":1445.6808084774455},{"x":1397,"y":52,"length":1397.9674531261448},{"x":1336,"y":27,"length":1336.2728014892768},{"x":1282,"y":27,"length":1282.2842898515134},{"x":1235,"y":45,"length":1235.8195661179668},{"x":1192,"y":49,"length":1193.006705764892},{"x":1134,"y":30,"length":1134.3967559897198},{"x":1075,"y":20,"length":1075.1860304152021},{"x":1035,"y":35,"length":1035.5916183515585},{"x":970,"y":75,"length":972.8951639308318},{"x":902,"y":89,"length":906.3801630662489},{"x":830,"y":85,"length":834.3410573620358},{"x":780,"y":70,"length":783.1347265956223},{"x":738,"y":45,"length":739.3706783474714},{"x":688,"y":43,"length":689.3424403009001},{"x":620,"y":60,"length":622.8964600958975},{"x":570,"y":70,"length":574.2821606144491},{"x":510,"y":55,"length":512.9571132170797},{"x":440,"y":40,"length":441.81444068749045},{"x":375,"y":45,"length":377.69034936042516},{"x":290,"y":60,"length":296.1418578992169},{"x":210,"y":70,"length":221.35943621178654},{"x":155,"y":70,"length":170.07351351694948},{"x":90,"y":60,"length":108.16653826391968},{"x":45,"y":30,"length":54.08326913195984},{"x":30,"y":-20,"length":36.05551275463989},{"x":40,"y":-70,"length":80.62257748298549},{"x":25,"y":-115,"length":117.6860229593982},{"x":0,"y":-170,"length":170},{"x":0,"y":-220,"length":220},{"x":25,"y":-270,"length":271.15493725912495},{"x":65,"y":-325,"length":331.436268383531},{"x":85,"y":-370,"length":379.63798545456433},{"x":90,"y":-430,"length":439.31765272977594},{"x":80,"y":-490,"length":496.4876634922564}],"y":-140},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":8051,"rotation":0,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":1313,"density":"1","height":129.9,"action":0,"isStatic":true,"wireframe":false,"width":177,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":164,"y":116,"length":200.8780724718355}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":7150,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":120,"y":0,"length":120},{"x":920,"y":0,"length":920},{"x":920,"y":108,"length":926.3174401899167},{"x":880,"y":140,"length":891.0667763978186},{"x":875,"y":168,"length":890.9820424677481},{"x":873,"y":208,"length":897.4369058602393},{"x":890,"y":260,"length":927.200086281273},{"x":930,"y":320,"length":983.5141076771598},{"x":987,"y":362,"length":1051.2911109678423},{"x":1057,"y":375,"length":1121.5498205608167},{"x":1147,"y":357,"length":1201.2734909253595},{"x":1197,"y":322,"length":1239.5535486617753},{"x":1240,"y":240,"length":1263.0122723077554},{"x":1447,"y":431,"length":1509.8244931116994},{"x":1517,"y":474,"length":1589.3284745451458},{"x":1593,"y":511,"length":1672.952479898936},{"x":1649,"y":531,"length":1732.3862155997433},{"x":1722,"y":545,"length":1806.1863137561418},{"x":1798,"y":553,"length":1881.1201450199826},{"x":1868,"y":551,"length":1947.5689974940553},{"x":1944,"y":545,"length":2018.9504699224299},{"x":2015,"y":527,"length":2082.7755519978623},{"x":2072,"y":507,"length":2133.1275161133713},{"x":2145,"y":470,"length":2195.8882029830206},{"x":2207,"y":424,"length":2247.35956179691},{"x":2263,"y":370,"length":2293.0479715871625},{"x":2317,"y":320,"length":2338.993159459856},{"x":2369,"y":239,"length":2381.0254093562294},{"x":2402,"y":174,"length":2408.294001985638},{"x":2428,"y":92,"length":2429.7423731745716},{"x":2442,"y":15,"length":2442.046068361529},{"x":2444,"y":-55,"length":2444.618784187015},{"x":2441,"y":-121,"length":2443.997135841202},{"x":2433,"y":-184,"length":2439.9477453421005},{"x":2419,"y":-247,"length":2431.5776771470823},{"x":2392,"y":-318,"length":2413.045378769326},{"x":2358,"y":-380,"length":2388.4229106253356},{"x":2313,"y":-439,"length":2354.291825581527},{"x":2277,"y":-484,"length":2327.871345242258},{"x":2222,"y":-534,"length":2285.2658488674792},{"x":2145,"y":-587,"length":2223.8691508269994},{"x":2100,"y":-616,"length":2188.4825793229425},{"x":2085,"y":-653,"length":2184.8647555398024},{"x":2051,"y":-713,"length":2171.3981670803723},{"x":2005,"y":-772,"length":2148.489934814683},{"x":1948,"y":-829,"length":2117.0604620558197},{"x":1886,"y":-875,"length":2079.0913880827848},{"x":1835,"y":-903,"length":2045.14889433508},{"x":1782,"y":-926,"length":2008.2330542046159},{"x":1714,"y":-946,"length":1957.731340097512},{"x":1653,"y":-955,"length":1909.0400729162288},{"x":1592,"y":-957,"length":1857.5018169573887},{"x":1527,"y":-953,"length":1799.9827776953866},{"x":1466,"y":-942,"length":1742.561333210398},{"x":1403,"y":-922,"length":1678.8367996919771},{"x":1348,"y":-901,"length":1621.3898359123878},{"x":1312,"y":-915,"length":1599.5527499898215},{"x":1267,"y":-918,"length":1564.61273163681},{"x":1230,"y":-920,"length":1536.0013020827814},{"x":1184,"y":-912,"length":1494.5233353815524},{"x":1152,"y":-923,"length":1476.1548021803133},{"x":1116,"y":-943,"length":1461.0629692111152},{"x":1092,"y":-984,"length":1469.938774235172},{"x":1080,"y":-2107,"length":2367.667417522993},{"x":1897,"y":-2100,"length":2829.9485861054086},{"x":2860,"y":-2100,"length":3548.1826334054454},{"x":4363,"y":-430,"length":4384.138341795341},{"x":3816,"y":906,"length":3922.0775107078134},{"x":-176,"y":1073,"length":1087.33849375436},{"x":30,"y":330,"length":331.3608305156178},{"x":25,"y":285,"length":286.09439001839934},{"x":20,"y":228,"length":228.87551201471948},{"x":9,"y":168,"length":168.24089871371942},{"x":-14,"y":140,"length":140.69825869569246},{"x":-37,"y":104,"length":110.38568747804219},{"x":-44,"y":61,"length":75.21303078589507},{"x":-25,"y":25,"length":35.35533905932738}],"y":1220},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8859,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":150,"y":0,"length":150},{"x":144,"y":38,"length":148.92951352905172},{"x":129,"y":74,"length":148.71785366928881},{"x":106,"y":106,"length":149.90663761154806},{"x":75,"y":129,"length":149.21796138535066},{"x":38,"y":144,"length":148.92951352905172},{"x":0,"y":150,"length":150},{"x":-38,"y":144,"length":148.92951352905172},{"x":-74,"y":129,"length":148.71785366928881},{"x":-106,"y":106,"length":149.90663761154806},{"x":-129,"y":74,"length":148.71785366928881},{"x":-144,"y":38,"length":148.92951352905172},{"x":-150,"y":0,"length":150},{"x":-144,"y":-38,"length":148.92951352905172},{"x":-129,"y":-75,"length":149.21796138535066},{"x":-106,"y":-106,"length":149.90663761154806},{"x":-75,"y":-129,"length":149.21796138535066},{"x":-38,"y":-144,"length":148.92951352905172},{"x":0,"y":-150,"length":150},{"x":38,"y":-144,"length":148.92951352905172},{"x":75,"y":-129,"length":149.21796138535066},{"x":106,"y":-106,"length":149.90663761154806},{"x":129,"y":-75,"length":149.21796138535066},{"x":144,"y":-38,"length":148.92951352905172}],"y":1433},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7150,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":1105,"y":-640,"length":1276.9592789122134},{"x":1075,"y":-547,"length":1206.1649970049702},{"x":1063,"y":-475,"length":1164.299789573115},{"x":1060,"y":-411,"length":1136.8909358421326},{"x":1062,"y":-349,"length":1117.8752166498728},{"x":1076,"y":-283,"length":1112.5938162689922},{"x":1095,"y":-229,"length":1118.6894117671804},{"x":1060,"y":-205,"length":1079.6411440844593},{"x":1015,"y":-210,"length":1036.4965026472594},{"x":970,"y":-225,"length":995.7534835490158},{"x":915,"y":-255,"length":949.8684119392539},{"x":855,"y":-295,"length":904.4611655565981},{"x":795,"y":-305,"length":851.4986788010889},{"x":738,"y":-312,"length":801.2415366167683},{"x":670,"y":-320,"length":742.4957912338629},{"x":615,"y":-320,"length":693.2712311931024},{"x":540,"y":-315,"length":625.1599795252412},{"x":485,"y":-320,"length":581.0550748423078},{"x":430,"y":-340,"length":548.1788029466298},{"x":380,"y":-375,"length":533.8773267333986},{"x":345,"y":-430,"length":551.2939324897382},{"x":315,"y":-470,"length":565.795899596312},{"x":305,"y":-515,"length":598.5398900658167},{"x":325,"y":-725,"length":794.5124291035352},{"x":390,"y":-585,"length":703.0824987154779},{"x":445,"y":-555,"length":711.3719139803032},{"x":590,"y":-555,"length":810.0154319517623},{"x":990,"y":-640,"length":1178.8553770501283}],"y":1220},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7590,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":165,"y":0,"length":165},{"x":165,"y":60,"length":175.57049866079439},{"x":-5,"y":60,"length":60.207972893961475},{"x":-95,"y":5,"length":95.13148795220224},{"x":-80,"y":-50,"length":94.33981132056604}],"y":664},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":8240,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-250,"density":"1","height":64,"action":0,"isStatic":true,"wireframe":false,"width":1462,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-1449,"y":0,"length":1449}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":8871,"rotation":0,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":1423,"density":"1","height":117.7,"action":0,"isStatic":true,"wireframe":false,"width":191,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-5,"y":5,"length":7.0710678118654755},{"x":173,"y":-98,"length":198.82907232092595}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":7150,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":1955,"y":270,"length":1973.5564344603881},{"x":1925,"y":225,"length":1938.1047443314305},{"x":1900,"y":180,"length":1908.507270093567},{"x":1880,"y":130,"length":1884.4893207444823},{"x":1870,"y":61,"length":1870.9946552569304},{"x":1895,"y":25,"length":1895.1649004770006},{"x":1961,"y":-26,"length":1961.1723534661608},{"x":2005,"y":-68,"length":2006.1527858067043},{"x":2042,"y":-115,"length":2045.2356832404425},{"x":2075,"y":-165,"length":2081.5499033172373},{"x":2099,"y":-217,"length":2110.187195487642},{"x":2118,"y":-270,"length":2135.140276422137},{"x":2130,"y":-329,"length":2155.2589171605346},{"x":2135,"y":-370,"length":2166.823712257183},{"x":2165,"y":-355,"length":2193.9120310532053},{"x":2181,"y":-318,"length":2204.0610245635216},{"x":2204,"y":-278,"length":2221.463481581455},{"x":2225,"y":-222,"length":2236.0476291886093},{"x":2212,"y":-164,"length":2218.071234203266},{"x":2200,"y":-134,"length":2204.0771311367484},{"x":2197,"y":-105,"length":2199.507672184846},{"x":2205,"y":-86,"length":2206.6764601998184},{"x":2236,"y":-52,"length":2236.604569431083},{"x":2247,"y":8,"length":2247.0142411653737},{"x":2231,"y":49,"length":2231.5380346299276},{"x":2197,"y":74,"length":2198.2458916144938},{"x":2148,"y":87,"length":2149.7611495233605},{"x":2115,"y":110,"length":2117.8585882914845},{"x":2090,"y":145,"length":2095.023866212507},{"x":2065,"y":210,"length":2075.650500445583},{"x":2040,"y":270,"length":2057.7900767571023},{"x":2000,"y":285,"length":2020.2041975998368}],"y":1220},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":7350,"y":1156,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":8113,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8183,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8253,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8323,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8393,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8463,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8573,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8643,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8713,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8783,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8853,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8923,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":8993,"active":true,"y":1232,"safeId":-1,"id":-1,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3900,"ag":true,"active":true,"y":130,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":260.3,"height":260.3,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":4160,"ag":true,"active":true,"y":130,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":260.3,"height":260.3,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":4029,"stones":false,"physic":false,"impulse":18500,"id":1,"radius":65,"y":141,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":30},"className":"Tnt1"},{"params":{"x":4290,"stones":false,"physic":false,"impulse":8500,"id":2,"radius":65,"y":140,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":30},"className":"Tnt1"},{"params":{"speed":1000,"x":5485,"rotation":-179.99999999999994,"y":610,"safeId":-1,"id":-1,"rate":1,"width":230,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":5403,"rotation":141.00000000000006,"y":278,"safeId":-1,"id":-1,"rate":1,"width":304,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":5416,"rotation":-163.99999999999997,"y":860,"safeId":-1,"id":-1,"rate":1,"width":180,"height":128},"className":"GeyserE"},{"params":{"x":8518,"stones":false,"physic":true,"impulse":1,"id":8,"radius":1,"y":1250,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":9270,"rotation":-102,"y":663,"safeId":-1,"width":132,"ttl":1,"height":18},"className":"GlassCrashed0"},{"params":{"x":9289,"rotation":-95,"y":792,"safeId":-1,"width":132,"ttl":1,"height":18},"className":"GlassCrashed0"},{"params":{"x":8274,"rotation":120,"y":531,"safeId":-1,"width":132,"ttl":1,"height":18},"className":"GlassCrashed0"},{"params":{"x":8349,"rotation":133,"y":431,"safeId":-1,"width":132,"ttl":1,"height":18},"className":"GlassCrashed0"},{"params":{"x":9550,"rotation":0,"y":1230,"time":1,"safeId":-1,"force":6500,"width":64.1,"height":64.1},"className":"BoostE"},{"params":{"x":8443,"rotation":143.99999999999994,"y":348,"safeId":-1,"width":132,"ttl":1,"height":18},"className":"GlassCrashed0"},{"params":{"x":7550,"stones":false,"physic":false,"impulse":1,"id":9,"radius":1,"y":690,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":7610,"stones":false,"physic":false,"impulse":1,"id":9,"radius":1,"y":690,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":7670,"stones":false,"physic":false,"impulse":1,"id":9,"radius":1,"y":690,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":7730,"stones":false,"physic":false,"impulse":1,"id":9,"radius":1,"y":690,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"}],null,[{"params":{"x":450,"rotation":0,"y":130,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":4870,"rotation":0,"y":90,"id":0,"width":128,"height":1005},"className":"SafePointE"},{"params":{"x":7350,"rotation":0,"y":1080,"id":0,"width":128,"height":971},"className":"SafePointE"}],[{"params":{"x":3990,"rotation":0,"graphic":0,"safeId":-1,"id":1,"y":140,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2830,"sndId":-1,"rotation":0,"y":-130,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":1335},"className":"ToggleE"},{"params":{"x":4080,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":140,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2840,"sndId":-1,"rotation":0,"y":-130,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":64,"height":1335},"className":"ToggleE"},{"params":{"x":8079,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1231,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8679,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8819,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8429,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8219,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8499,"rotation":0,"graphic":0,"safeId":1,"id":7,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8149,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8609,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8959,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8889,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8539,"rotation":0,"graphic":0,"safeId":1,"id":7,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8359,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9029,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8749,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8289,"rotation":0,"graphic":0,"safeId":1,"id":-1,"y":1232,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8219,"rotation":0,"graphic":0,"id":6,"y":1433,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":150,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8859,"rotation":0,"graphic":0,"id":6,"y":1433,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-150,"useWeld":false},"className":"MotorJointE"},{"params":{"x":7480,"sndId":-1,"rotation":0,"y":1030,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":6,"width":64,"height":833},"className":"ToggleE"},{"params":{"x":8150,"sndId":-1,"rotation":-72,"y":737,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":7,"width":111,"height":387},"className":"ToggleE"},{"params":{"x":8152,"sndId":-1,"rotation":-72,"y":724,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":8,"width":73,"height":390},"className":"ToggleE"},{"params":{"x":7610,"active":0,"y":689,"cycle":0,"body":false,"id":9,"position":0,"width":45,"height":141,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":32,"y":-96,"length":101.19288512538814},{"x":32,"y":32,"length":45.254833995939045}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":7570,"sndId":-1,"rotation":0,"y":490,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":9,"width":64,"height":603},"className":"ToggleE"}]],"settings":{"prizes":"25,34,41","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map6.json b/motox3mspooky/assets/levels/map6.json deleted file mode 100644 index c1671401..00000000 --- a/motox3mspooky/assets/levels/map6.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":7200,"rotation":0,"y":-1510,"vertices":[{"x":0,"y":0,"length":0},{"x":700,"y":0,"length":700},{"x":705,"y":1035,"length":1252.297887884508},{"x":0,"y":1045,"length":1045}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":7540,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":1410,"y":10,"length":1410.0354605470034},{"x":1630,"y":1295,"length":2081.8081083519683},{"x":355,"y":1305,"length":1352.423750161169},{"x":355,"y":1210,"length":1261.0015860418257},{"x":365,"y":1180,"length":1235.1619327035626},{"x":360,"y":1155,"length":1209.8037030857527},{"x":360,"y":1115,"length":1171.6761497956677},{"x":370,"y":1090,"length":1151.0864433221338},{"x":370,"y":1055,"length":1118.0004472271019},{"x":355,"y":1025,"length":1084.7349906774466},{"x":335,"y":995,"length":1049.880945631456},{"x":310,"y":970,"length":1018.3319694480774},{"x":285,"y":940,"length":982.255058526043},{"x":265,"y":900,"length":938.2030697029295},{"x":235,"y":860,"length":891.5295844782718},{"x":215,"y":810,"length":838.0483279620573},{"x":185,"y":765,"length":787.0514595628421},{"x":155,"y":700,"length":716.9553682064177},{"x":150,"y":590,"length":608.7692502089769},{"x":145,"y":535,"length":554.3013620766235},{"x":140,"y":490,"length":509.6076922496363},{"x":130,"y":425,"length":444.43784717325775},{"x":110,"y":335,"length":352.59750424527965},{"x":90,"y":275,"length":289.35272592460575},{"x":80,"y":200,"length":215.40659228538016},{"x":55,"y":135,"length":145.7737973711325}],"y":-2190},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7580,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":310,"y":0,"length":310},{"x":310,"y":35,"length":311.96954979612997},{"x":0,"y":35,"length":35}],"y":-1600},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1570,"rotation":0,"physic":false,"line":true,"plr":false,"id":-1,"graphic":true,"density":0,"isWheel":false,"isStatic":true,"ignore":false,"layer":1,"rem":true,"safeId":-1,"vertices":[{"x":-20,"y":-135,"length":136.4734406395618},{"x":130,"y":-80,"length":152.64337522473747},{"x":195,"y":-25,"length":196.596032513375},{"x":295,"y":25,"length":296.05742686174926},{"x":460,"y":30,"length":460.9772228646444},{"x":575,"y":20,"length":575.3477209479498},{"x":725,"y":25,"length":725.4309064273455},{"x":865,"y":55,"length":866.7467911679859},{"x":1015,"y":105,"length":1020.4165815979276},{"x":1115,"y":165,"length":1127.1424044902224},{"x":1175,"y":210,"length":1193.6184482488532},{"x":1240,"y":235,"length":1262.071709531594},{"x":1305,"y":225,"length":1324.2545072605944},{"x":1350,"y":210,"length":1366.235704408284},{"x":1395,"y":185,"length":1407.2135587749287},{"x":1755,"y":180,"length":1764.2066205521394},{"x":1825,"y":200,"length":1835.9261967737157},{"x":1905,"y":195,"length":1914.9543075488773},{"x":1975,"y":200,"length":1985.1007531105317},{"x":2060,"y":215,"length":2071.189271891876},{"x":2140,"y":200,"length":2149.3254755853054},{"x":2190,"y":200,"length":2199.1134577370035},{"x":2230,"y":210,"length":2239.866067424568},{"x":2330,"y":210,"length":2339.444378479642},{"x":2405,"y":210,"length":2414.150989478496},{"x":2490,"y":205,"length":2498.424503562195},{"x":2605,"y":185,"length":2611.5608359752987},{"x":2710,"y":150,"length":2714.148116813082},{"x":4265,"y":-70,"length":4265.574404461842},{"x":4370,"y":-125,"length":4371.787391902767},{"x":4400,"y":-25,"length":4400.071022154074},{"x":4420,"y":25,"length":4420.070700792014},{"x":4480,"y":80,"length":4480.714228780943},{"x":4580,"y":105,"length":4581.20344451106},{"x":4680,"y":100,"length":4681.068254148832},{"x":4680,"y":140,"length":4682.09354883048},{"x":4665,"y":1025,"length":4776.279933169747},{"x":-45,"y":960,"length":961.0541087784808}],"y":-560},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6410,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":1805,"y":0,"length":1805},{"x":1805,"y":100,"length":1807.7679607737273},{"x":0,"y":100,"length":100}],"y":-1600},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7588,"rotation":171,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":2,"y":-1,"length":2.23606797749979},{"x":85,"y":80,"length":116.72617529928752},{"x":146,"y":141,"length":202.97044119772713},{"x":194,"y":187,"length":269.45314991664134},{"x":279,"y":188,"length":336.42978465052704},{"x":319,"y":227,"length":391.52266856466946},{"x":357,"y":262,"length":442.82389276099366},{"x":350,"y":300,"length":460.9772228646444},{"x":315,"y":320,"length":449.02672526253934},{"x":295,"y":360,"length":465.4299087940095},{"x":265,"y":385,"length":467.38634982207174},{"x":250,"y":425,"length":493.0770730829005},{"x":205,"y":440,"length":485.41219597368996},{"x":164,"y":409,"length":440.65519400093314},{"x":125,"y":380,"length":400.03124877939223},{"x":106,"y":296,"length":314.40737904826597},{"x":58,"y":264,"length":270.29613389761977},{"x":5,"y":230,"length":230.05434140654683},{"x":-60,"y":185,"length":194.48650338776724},{"x":-121,"y":146,"length":189.62331080328704},{"x":-75,"y":125,"length":145.7737973711325},{"x":-55,"y":75,"length":93.00537618869137},{"x":-15,"y":45,"length":47.43416490252569}],"y":-75},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2640,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-2706,"y":-3131,"length":4138.308470861011},{"x":9070,"y":-2340,"length":9366.98991138562},{"x":9070,"y":-2240,"length":9342.510369274416},{"x":9120,"y":-495,"length":9133.423509287193},{"x":9135,"y":1205,"length":9214.13316595761},{"x":5258,"y":1181,"length":5389.000371126356},{"x":5260,"y":665,"length":5301.869953139175},{"x":5685,"y":665,"length":5723.7618748511895},{"x":5765,"y":650,"length":5801.527816015364},{"x":5835,"y":630,"length":5868.911738985346},{"x":5890,"y":605,"length":5920.990204349269},{"x":5943,"y":567,"length":5969.986432145386},{"x":5981,"y":535,"length":6004.880181985316},{"x":6018,"y":497,"length":6038.487641785814},{"x":6057,"y":452,"length":6073.841700275041},{"x":6084,"y":415,"length":6098.137502549446},{"x":6114,"y":364,"length":6124.82587507596},{"x":6138,"y":308,"length":6145.7227402478875},{"x":6158,"y":246,"length":6162.911649537092},{"x":6174,"y":174,"length":6176.451408373581},{"x":6181,"y":103,"length":6181.8581348976295},{"x":6175,"y":5,"length":6175.002024291166},{"x":6158,"y":-67,"length":6158.364474436375},{"x":6138,"y":-124,"length":6139.252397482938},{"x":6112,"y":-183,"length":6114.738996882859},{"x":6082,"y":-238,"length":6086.654910539943},{"x":6040,"y":-297,"length":6047.297660939141},{"x":5995,"y":-346,"length":6004.976352992574},{"x":5947,"y":-388,"length":5959.643697403394},{"x":5889,"y":-430,"length":5904.677891299406},{"x":5819,"y":-468,"length":5837.7893932549505},{"x":5748,"y":-497,"length":5769.446507248334},{"x":5667,"y":-514,"length":5690.262296239076},{"x":5583,"y":-518,"length":5606.978954838336},{"x":3840,"y":-517,"length":3874.646951658951},{"x":3738,"y":-515,"length":3773.310085322965},{"x":3652,"y":-501,"length":3686.2046877513462},{"x":3568,"y":-476,"length":3599.6110901040406},{"x":3480,"y":-432,"length":3506.7112798176013},{"x":3408,"y":-378,"length":3428.8989486422606},{"x":3347,"y":-319,"length":3362.1674556749845},{"x":3295,"y":-254,"length":3304.7754840533416},{"x":3255,"y":-190,"length":3260.540599348519},{"x":3223,"y":-119,"length":3225.196118067861},{"x":3200,"y":-62,"length":3200.6005686433286},{"x":3185,"y":18,"length":3185.050863016162},{"x":3185,"y":980,"length":3332.3602746401834},{"x":3308,"y":980,"length":3450.1107228609344},{"x":2248,"y":1633,"length":2778.5235287828677},{"x":1005,"y":1640,"length":1923.4409270887422},{"x":1008,"y":1614,"length":1902.9083004706245},{"x":1028,"y":1597,"length":1899.2611721403669},{"x":1059,"y":1601,"length":1919.5525520287274},{"x":1096,"y":1604,"length":1942.6867992550935},{"x":1135,"y":1596,"length":1958.4281962839484},{"x":1170,"y":1571,"length":1958.811119020923},{"x":1193,"y":1544,"length":1951.2009122589093},{"x":1206,"y":1501,"length":1925.4705918294364},{"x":1203,"y":1457,"length":1889.459711134376},{"x":1190,"y":1428,"length":1858.8394228657837},{"x":1168,"y":1403,"length":1825.5500540932862},{"x":1136,"y":1383,"length":1789.7443951581465},{"x":1150,"y":1369,"length":1787.9208595460818},{"x":1170,"y":1359,"length":1793.25988077579},{"x":1243,"y":1374,"length":1852.8154252380348},{"x":1317,"y":1374,"length":1903.251165768722},{"x":1406,"y":1358,"length":1954.7378340841515},{"x":1504,"y":1316,"length":1998.4674127941141},{"x":1590,"y":1261,"length":2029.3400405057798},{"x":1661,"y":1198,"length":2047.956298361857},{"x":1742,"y":1108,"length":2064.5164082661104},{"x":1798,"y":1015,"length":2064.710391313997},{"x":1840,"y":928,"length":2060.772670626239},{"x":1865,"y":831,"length":2041.7605148498685},{"x":1880,"y":735,"length":2018.5700384182858},{"x":1880,"y":651,"length":1989.5228071072722},{"x":1874,"y":578,"length":1961.1119294930618},{"x":1859,"y":503,"length":1925.8478652271576},{"x":1837,"y":428,"length":1886.2006786129625},{"x":1809,"y":364,"length":1845.2579765442013},{"x":1776,"y":300,"length":1801.1596264629075},{"x":1731,"y":239,"length":1747.4215289963668},{"x":1686,"y":184,"length":1696.0106131743398},{"x":1640,"y":140,"length":1645.964762684791},{"x":1590,"y":100,"length":1593.1415505221123},{"x":8,"y":93,"length":93.34345183246653},{"x":8,"y":707,"length":707.0452602203059},{"x":-33,"y":682,"length":682.7979203248938},{"x":-91,"y":651,"length":657.3294455598349},{"x":-140,"y":632,"length":647.3206315266029},{"x":-202,"y":616,"length":648.2746331609775},{"x":-250,"y":606,"length":655.5425234109531},{"x":-326,"y":599,"length":681.9655416514826},{"x":-394,"y":600,"length":717.7994148785579},{"x":-480,"y":611,"length":776.9948519777979},{"x":-588,"y":640,"length":869.1052870625055},{"x":-671,"y":679,"length":954.6109155043221},{"x":-774,"y":744,"length":1073.597690012418},{"x":-835,"y":798,"length":1155.0017316004337},{"x":-894,"y":870,"length":1247.4518026761596},{"x":-954,"y":968,"length":1359.0952873143221},{"x":-975,"y":1016,"length":1408.1480746001112},{"x":-998,"y":1086,"length":1474.9237268414934},{"x":-1012,"y":1156,"length":1536.3853683239763},{"x":-1020,"y":1228,"length":1596.3658728499554},{"x":-1020,"y":1296,"length":1649.2471009524315},{"x":-1014,"y":1362,"length":1698.0106006736237},{"x":-999,"y":1442,"length":1754.2420015493872},{"x":-979,"y":1506,"length":1796.2396833385014},{"x":-951,"y":1569,"length":1834.7103313602395},{"x":-912,"y":1630,"length":1867.7912088881883},{"x":-867,"y":1689,"length":1898.5283774544957},{"x":-803,"y":1757,"length":1931.801749662734},{"x":-741,"y":1807,"length":1953.0309777369123},{"x":-692,"y":1843,"length":1968.6322663209603},{"x":-638,"y":1869,"length":1974.8936680236736},{"x":-583,"y":1890,"length":1977.8748696517684},{"x":-535,"y":1906,"length":1979.6618398100218},{"x":-466,"y":1921,"length":1976.7136869056176},{"x":-475,"y":1937,"length":1994.3906337525755},{"x":-2008,"y":1932,"length":2786.5189753525815},{"x":-2720,"y":-2988,"length":4040.6118348586765}],"y":-1640},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":3000,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":51,"y":10,"length":51.97114584074513},{"x":78,"y":20,"length":80.52328855678958},{"x":130,"y":35,"length":134.6291201783626},{"x":180,"y":45,"length":185.53975315279473},{"x":223,"y":50,"length":228.53664913969487},{"x":264,"y":50,"length":268.69313351851775},{"x":320,"y":50,"length":323.88269481403296},{"x":396,"y":50,"length":399.1440842603082},{"x":432,"y":47,"length":434.54919169180374},{"x":469,"y":40,"length":470.7026662342163},{"x":512,"y":31,"length":512.937618039465},{"x":556,"y":18,"length":556.2912906023247},{"x":589,"y":5,"length":589.0212220285446},{"x":620,"y":0,"length":620},{"x":650,"y":5,"length":650.0192304847603},{"x":673,"y":19,"length":673.2681486599525},{"x":690,"y":38,"length":691.0455846035051},{"x":693,"y":57,"length":695.3402045042412},{"x":689,"y":81,"length":693.7449098912366},{"x":676,"y":104,"length":683.953214774227},{"x":689,"y":129,"length":700.9721820443376},{"x":694,"y":154,"length":710.8811433706762},{"x":689,"y":176,"length":711.123758568085},{"x":669,"y":194,"length":696.560837256876},{"x":641,"y":207,"length":673.5948337094043},{"x":605,"y":208,"length":639.7569851123159},{"x":575,"y":198,"length":608.1356756514125},{"x":543,"y":189,"length":574.9521719238915},{"x":508,"y":179,"length":538.61396194306},{"x":477,"y":171,"length":506.7247773693329},{"x":442,"y":165,"length":471.79338698205595},{"x":401,"y":161,"length":432.113411039278},{"x":355,"y":160,"length":389.39054944875073},{"x":310,"y":160,"length":348.85527085024813},{"x":255,"y":160,"length":301.0398644698074},{"x":200,"y":160,"length":256.12496949731394},{"x":160,"y":168,"length":232},{"x":117,"y":176,"length":211.3409567499873},{"x":71,"y":191,"length":203.7694775966214},{"x":31,"y":203,"length":205.35335400231475},{"x":3,"y":207,"length":207.02173798903343},{"x":-24,"y":205,"length":206.40009689920205},{"x":-46,"y":192,"length":197.43353311937665},{"x":-64,"y":175,"length":186.33571852975479},{"x":-70,"y":154,"length":169.162643630324},{"x":-67,"y":132,"length":148.03040228277433},{"x":-53,"y":105,"length":117.61802582937702},{"x":-64,"y":81,"length":103.23274674249446},{"x":-68,"y":60,"length":90.68627239003708},{"x":-65,"y":40,"length":76.32168761236873},{"x":-51,"y":20,"length":54.78138369920935},{"x":-24,"y":4,"length":24.331050121192877},{"x":0,"y":1,"length":1},{"x":29,"y":2,"length":29.068883707497267}],"y":-1220},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4026,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-1075,"y":0,"length":1075},{"x":100,"y":0,"length":100},{"x":100,"y":245,"length":264.62237244798484},{"x":-181,"y":244,"length":303.80421326900654},{"x":-270,"y":255,"length":371.3825520941984},{"x":-339,"y":274,"length":435.8864531044754},{"x":-410,"y":305,"length":511.00391387933615},{"x":-482,"y":350,"length":595.6710501610768},{"x":-543,"y":402,"length":675.6130549360337},{"x":-594,"y":460,"length":751.2895580267304},{"x":-636,"y":530,"length":827.8864656461054},{"x":-665,"y":600,"length":895.6701401743836},{"x":-685,"y":672,"length":959.5879323959842},{"x":-693,"y":735,"length":1010.1851315476782},{"x":-693,"y":811,"length":1066.7567670279857},{"x":-682,"y":880,"length":1113.3391217414396},{"x":-667,"y":937,"length":1150.1556416415997},{"x":-637,"y":1002,"length":1187.3386206133446},{"x":-597,"y":1065,"length":1220.9152304726156},{"x":-558,"y":1114,"length":1245.9373981063416},{"x":-509,"y":1163,"length":1269.507778629182},{"x":-438,"y":1215,"length":1291.5374559028476},{"x":-379,"y":1247,"length":1303.3226768532802},{"x":-308,"y":1271,"length":1307.7862975272374},{"x":-216,"y":1289,"length":1306.9724557158809},{"x":-211,"y":1344,"length":1360.4620538625838},{"x":-1632,"y":1359,"length":2123.7478663909237},{"x":-1673,"y":1289,"length":2111.9777460948776},{"x":-1629,"y":1271,"length":2066.175694368705},{"x":-1595,"y":1265,"length":2035.7431075653922},{"x":-1520,"y":1246,"length":1965.4302327989158},{"x":-1438,"y":1209,"length":1878.7030100577367},{"x":-1373,"y":1170,"length":1803.8927351702484},{"x":-1314,"y":1124,"length":1729.153550151056},{"x":-1253,"y":1066,"length":1645.1033402190878},{"x":-1201,"y":1005,"length":1566.0223497766563},{"x":-1148,"y":929,"length":1476.8022887306208},{"x":-1116,"y":847,"length":1401.0228406417934},{"x":-1098,"y":785,"length":1349.751458602657},{"x":-1085,"y":705,"length":1293.928127834},{"x":-1078,"y":641,"length":1254.179014335673},{"x":-1076,"y":568,"length":1216.7168939404105}],"y":-996},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":2660,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1390,"density":"1","height":667,"action":0,"isStatic":true,"wireframe":false,"width":64,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":-156,"length":156},{"x":0,"y":498,"length":498}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":2195,"rotation":0,"physic":true,"line":false,"plr":false,"id":2,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":-5,"y":0,"length":5},{"x":45,"y":0,"length":45},{"x":45,"y":20,"length":49.24428900898052},{"x":-5,"y":20,"length":20.615528128088304}],"y":-934},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2317,"rotation":0,"physic":true,"line":false,"plr":false,"id":2,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":50,"y":0,"length":50},{"x":50,"y":20,"length":53.85164807134504},{"x":0,"y":20,"length":20}],"y":-934},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-10,"physic":true,"lineId":0,"y":290,"height":839,"isRoad":true,"direction":90,"width":11098,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":5010,"y":-5,"length":5010.002495009358},{"x":6245,"y":-775,"length":6292.904734699231},{"x":9590,"y":-775,"length":9621.264210071357},{"x":11085,"y":-775,"length":11112.058765143389}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":2230,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":-45,"y":0,"length":45},{"x":-45,"y":-35,"length":57.0087712549569},{"x":-45,"y":-65,"length":79.05694150420949},{"x":-15,"y":-65,"length":66.70832032063167},{"x":-15,"y":-35,"length":38.07886552931954},{"x":-15,"y":0,"length":15},{"x":50,"y":0,"length":50},{"x":110,"y":0,"length":110},{"x":110,"y":-30,"length":114.0175425099138},{"x":110,"y":-65,"length":127.76932339180638},{"x":140,"y":-65,"length":154.35349040433132},{"x":140,"y":-35,"length":144.30869689661813},{"x":140,"y":0,"length":140},{"x":110,"y":35,"length":115.43396380615195},{"x":70,"y":75,"length":102.59142264341595},{"x":70,"y":150,"length":165.5294535724685},{"x":70,"y":205,"length":216.6217902243447},{"x":70,"y":260,"length":269.2582403567252},{"x":70,"y":315,"length":322.6840560052511},{"x":70,"y":375,"length":381.4773912042495},{"x":107,"y":389,"length":403.44764220404113},{"x":135,"y":408,"length":429.75458112741507},{"x":156,"y":435,"length":462.12660602912706},{"x":167,"y":462,"length":491.25655211915495},{"x":173,"y":493,"length":522.4729658078014},{"x":170,"y":521,"length":548.033758084299},{"x":161,"y":551,"length":574.0400682879201},{"x":144,"y":576,"length":593.7272100889431},{"x":117,"y":599,"length":610.3195884124972},{"x":87,"y":615,"length":621.1231761897152},{"x":52,"y":620,"length":622.1768237406469},{"x":14,"y":614,"length":614.15958838074},{"x":-17,"y":598,"length":598.2415899952125},{"x":-40,"y":577,"length":578.3848199944393},{"x":-57,"y":550,"length":552.945747790866},{"x":-68,"y":517,"length":521.452778303079},{"x":-69,"y":482,"length":486.9137500625753},{"x":-62,"y":456,"length":460.1956105831519},{"x":-45,"y":425,"length":427.375712927162},{"x":-26,"y":406,"length":406.831660518205},{"x":-2,"y":390,"length":390.00512817141265},{"x":25,"y":375,"length":375.8324094593227},{"x":25,"y":315,"length":315.9905061864992},{"x":25,"y":255,"length":256.2225595063791},{"x":25,"y":195,"length":196.596032513375},{"x":25,"y":140,"length":142.21462653327893},{"x":25,"y":75,"length":79.05694150420949},{"x":-15,"y":35,"length":38.07886552931954}],"y":-870},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":2730,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-850,"density":"1","height":1369.05,"action":0,"isStatic":true,"wireframe":false,"width":1374,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":-75,"y":-63,"length":97.94896630388705},{"x":-123,"y":-95,"length":155.4155719353759},{"x":-174,"y":-120,"length":211.36697944570244},{"x":-233,"y":-145,"length":274.4339629127561},{"x":-285,"y":-158,"length":325.86653709762834},{"x":-340,"y":-171,"length":380.5798207997897},{"x":-413,"y":-179,"length":450.1222056286492},{"x":-479,"y":-179,"length":511.3531069623025},{"x":-567,"y":-168,"length":591.3653692938063},{"x":-628,"y":-154,"length":646.6065264130884},{"x":-683,"y":-137,"length":696.6046224365726},{"x":-744,"y":-109,"length":751.9421520303274},{"x":-813,"y":-68,"length":815.8388321231099},{"x":-863,"y":-34,"length":863.6694969720767},{"x":-921,"y":20,"length":921.217129671393},{"x":-961,"y":69,"length":963.4739228437893},{"x":-997,"y":119,"length":1004.0766902981067},{"x":-1030,"y":175,"length":1044.7607381596995},{"x":-1060,"y":240,"length":1086.830253535482},{"x":-1082,"y":306,"length":1124.43763722138},{"x":-1093,"y":366,"length":1152.6512915882236},{"x":-1099,"y":432,"length":1180.8577391032334},{"x":-1100,"y":512,"length":1213.3194138395709},{"x":-1094,"y":586,"length":1241.0608365426733},{"x":-1079,"y":649,"length":1259.143359590162},{"x":-1061,"y":707,"length":1274.9784311901124},{"x":-1034,"y":768,"length":1288.013975079463},{"x":-996,"y":832,"length":1297.7827244958996},{"x":-951,"y":890,"length":1302.4979846433544},{"x":-898,"y":950,"length":1307.2505498182052},{"x":-847,"y":992,"length":1304.4052284470497},{"x":-784,"y":1038,"length":1300.80744155313},{"x":-722,"y":1069,"length":1289.9786819943963},{"x":-639,"y":1101,"length":1272.9972505861904},{"x":-566,"y":1119,"length":1254.0003987240195},{"x":-482,"y":1126,"length":1224.826518328208},{"x":-379,"y":1123,"length":1185.2299354977497},{"x":-293,"y":1109,"length":1147.0527450819338},{"x":-210,"y":1084,"length":1104.1539747698234},{"x":-131,"y":1046,"length":1054.1712384617597},{"x":-53,"y":993,"length":994.4133949218503},{"x":6,"y":943,"length":943.0190878237831},{"x":63,"y":882,"length":884.2471373999466},{"x":106,"y":822,"length":828.8063706318865},{"x":140,"y":766,"length":778.6886412424417},{"x":163,"y":715,"length":733.3443938559836},{"x":183,"y":650,"length":675.2695757991767},{"x":196,"y":579,"length":611.2748972434579},{"x":207,"y":489,"length":531.0084745086466},{"x":210,"y":400,"length":451.7742799230607},{"x":210,"y":280,"length":350},{"x":210,"y":180,"length":276.5863337187866},{"x":210,"y":55,"length":217.0829334609241},{"x":210,"y":-55,"length":217.0829334609241},{"x":210,"y":-160,"length":264.0075756488817}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":2946,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-1007,"density":"1","height":64,"action":0,"isStatic":true,"wireframe":false,"width":1193,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1180,"y":0,"length":1180}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":6290,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-488,"density":"1","height":65,"action":0,"isStatic":true,"wireframe":false,"width":1629,"graphic":true,"textureMode":true,"shapeH":64,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1616,"y":1,"length":1616.000309405911}],"type":5,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":6433,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":-1,"vertices":[{"x":300,"y":0,"length":300},{"x":295,"y":50,"length":299.2072860075436},{"x":281,"y":101,"length":298.6000669792289},{"x":259,"y":149,"length":298.8009370801906},{"x":229,"y":192,"length":298.8394217635953},{"x":192,"y":229,"length":298.8394217635953},{"x":149,"y":259,"length":298.8009370801906},{"x":101,"y":281,"length":298.6000669792289},{"x":50,"y":295,"length":299.2072860075436},{"x":0,"y":300,"length":300},{"x":-50,"y":295,"length":299.2072860075436},{"x":-101,"y":281,"length":298.6000669792289},{"x":-149,"y":259,"length":298.8009370801906},{"x":-192,"y":229,"length":298.8394217635953},{"x":-229,"y":192,"length":298.8394217635953},{"x":-259,"y":149,"length":298.8009370801906},{"x":-281,"y":101,"length":298.6000669792289},{"x":-295,"y":50,"length":299.2072860075436},{"x":-300,"y":0,"length":300},{"x":-295,"y":-50,"length":299.2072860075436},{"x":-281,"y":-101,"length":298.6000669792289},{"x":-259,"y":-149,"length":298.8009370801906},{"x":-229,"y":-192,"length":298.8394217635953},{"x":-192,"y":-229,"length":298.8394217635953},{"x":-149,"y":-259,"length":298.8009370801906},{"x":-101,"y":-281,"length":298.6000669792289},{"x":-50,"y":-295,"length":299.2072860075436},{"x":0,"y":-300,"length":300},{"x":50,"y":-295,"length":299.2072860075436},{"x":101,"y":-281,"length":298.6000669792289},{"x":149,"y":-259,"length":298.8009370801906},{"x":192,"y":-229,"length":298.8394217635953},{"x":229,"y":-192,"length":298.8394217635953},{"x":259,"y":-149,"length":298.8009370801906},{"x":281,"y":-101,"length":298.6000669792289},{"x":295,"y":-50,"length":299.2072860075436}],"y":-1550},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8213,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":-1,"vertices":[{"x":300,"y":0,"length":300},{"x":295,"y":50,"length":299.2072860075436},{"x":281,"y":101,"length":298.6000669792289},{"x":259,"y":149,"length":298.8009370801906},{"x":229,"y":192,"length":298.8394217635953},{"x":192,"y":229,"length":298.8394217635953},{"x":149,"y":259,"length":298.8009370801906},{"x":101,"y":281,"length":298.6000669792289},{"x":50,"y":295,"length":299.2072860075436},{"x":0,"y":300,"length":300},{"x":-50,"y":295,"length":299.2072860075436},{"x":-101,"y":281,"length":298.6000669792289},{"x":-149,"y":259,"length":298.8009370801906},{"x":-192,"y":229,"length":298.8394217635953},{"x":-229,"y":192,"length":298.8394217635953},{"x":-259,"y":149,"length":298.8009370801906},{"x":-281,"y":101,"length":298.6000669792289},{"x":-295,"y":50,"length":299.2072860075436},{"x":-300,"y":0,"length":300},{"x":-295,"y":-50,"length":299.2072860075436},{"x":-281,"y":-101,"length":298.6000669792289},{"x":-259,"y":-149,"length":298.8009370801906},{"x":-229,"y":-192,"length":298.8394217635953},{"x":-192,"y":-229,"length":298.8394217635953},{"x":-149,"y":-259,"length":298.8009370801906},{"x":-101,"y":-281,"length":298.6000669792289},{"x":-50,"y":-295,"length":299.2072860075436},{"x":0,"y":-300,"length":300},{"x":50,"y":-295,"length":299.2072860075436},{"x":101,"y":-281,"length":298.6000669792289},{"x":149,"y":-259,"length":298.8009370801906},{"x":192,"y":-229,"length":298.8394217635953},{"x":229,"y":-192,"length":298.8394217635953},{"x":259,"y":-149,"length":298.8009370801906},{"x":281,"y":-101,"length":298.6000669792289},{"x":295,"y":-50,"length":299.2072860075436}],"y":-1550},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4200,"y":224,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":7239,"y":-1662,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":90,"scaleY":1,"x":5886,"y":-900,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":5966,"rotation":90,"y":-900,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":90,"scaleY":1,"x":5886,"y":-1020,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":5966,"rotation":90,"y":-1020,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":90,"scaleY":1,"x":5886,"y":-1140,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":5966,"rotation":90,"y":-1140,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4169,"y":247,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":4020,"rotation":-18,"y":-310,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":4085,"rotation":0,"y":-333,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":4710,"rotation":0,"y":190,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4710,"y":180,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":3870,"rotation":0,"y":180,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3870,"y":170,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":5294.8,"rotation":-18,"y":-30.2,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":-18,"scaleY":1,"x":5291.65,"y":-39.7,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":5755.7,"rotation":-21,"y":-310.5,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":-21,"scaleY":1,"x":5752.05,"y":-319.85,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":7207,"y":-1635,"width":77.3,"height":79.6},"className":"Dec23"},{"params":{"x":7420,"rotation":0,"y":-1630,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":7000,"rotation":0,"y":-1630,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":8446,"rotation":-15,"y":-1035,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"x":8240,"rotation":0,"y":-1070,"width":20.15,"height":54.65},"className":"Dec25"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":8240,"y":-1080,"width":19.15,"height":37.65},"className":"Dec12"},{"params":{"x":3730,"ag":true,"active":true,"y":-150,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":2330,"stones":false,"physic":false,"impulse":2360,"id":1,"radius":64,"y":-759,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":100},"className":"Tnt1"},{"params":{"x":3721,"stones":false,"physic":false,"impulse":3000,"id":3,"radius":64,"y":-1038,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":100},"className":"Tnt1"},{"params":{"x":3721,"stones":false,"physic":false,"impulse":3000,"id":3,"radius":64,"y":-1094,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":100},"className":"Tnt1"},{"params":{"x":3721,"stones":false,"physic":false,"impulse":3000,"id":3,"radius":64,"y":-1148,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":100},"className":"Tnt1"},{"params":{"speed":1800,"x":5885,"rotation":-90,"y":-1170,"safeId":-1,"id":-1,"rate":1,"width":1013,"height":128},"className":"GeyserE"},{"params":{"x":7730,"stones":false,"physic":false,"impulse":1,"id":13,"radius":1,"y":-1580,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"}],null,[{"params":{"x":2280,"rotation":0,"y":-910,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":4200,"rotation":0,"y":160,"id":0,"width":128,"height":542},"className":"SafePointE"},{"params":{"x":7240,"rotation":0,"y":-1730,"id":0,"width":128,"height":912},"className":"SafePointE"}],[{"params":{"x":7476,"active":0,"y":-255,"cycle":0,"body":false,"id":12,"position":0,"width":461,"height":349,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-448,"y":-336,"length":560}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":-3,"speed":850},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":2344,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":-924,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2363,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":-924,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2210,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":-924,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2191,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":-924,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2283,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-375,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2280,"sndId":-1,"rotation":0,"y":-880,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":146,"height":64},"className":"ToggleE"},{"params":{"x":2804,"sndId":-1,"rotation":0,"y":-440,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":379,"height":64},"className":"ToggleE"},{"params":{"x":2850,"sndId":-1,"rotation":0,"y":-1330,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":3,"width":589,"height":64},"className":"ToggleE"},{"params":{"x":3730,"rotation":0,"graphic":1,"id":1,"y":-150,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":6840,"sndId":-1,"rotation":3,"y":-800,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":12,"width":64,"height":1219},"className":"ToggleE"},{"params":{"x":7730,"active":0,"y":-1580,"cycle":0,"body":false,"id":13,"position":0,"width":13,"height":61,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-48,"length":48}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":600},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":7730,"sndId":-1,"rotation":0,"y":-1800,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":13,"width":64,"height":579},"className":"ToggleE"},{"params":{"x":5460,"sndId":-1,"rotation":0,"y":-270,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":14,"width":64,"height":850},"className":"ToggleE"},{"params":{"x":6433,"rotation":0,"graphic":1,"id":14,"y":-1550,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":90,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8213,"rotation":0,"graphic":1,"id":14,"y":-1550,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":-90,"useWeld":false},"className":"MotorJointE"},{"params":{"x":7260,"sndId":-1,"rotation":0,"y":-1940,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":14,"width":64,"height":773},"className":"ToggleE"},{"params":{"x":3530,"sndId":0,"rotation":0,"y":-500,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":632},"className":"ToggleE"},{"params":{"x":6420,"sndId":0,"rotation":0,"y":-610,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":772},"className":"ToggleE"},{"params":{"x":8450,"sndId":0,"rotation":0,"y":-1180,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":64,"height":772},"className":"ToggleE"}]],"settings":{"prizes":"25,34,43","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map7.json b/motox3mspooky/assets/levels/map7.json deleted file mode 100644 index 511a645a..00000000 --- a/motox3mspooky/assets/levels/map7.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"stretchTexture":false,"x":1471,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-270,"density":"1","height":1470,"action":0,"isStatic":true,"wireframe":false,"width":155,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":35,"y":0,"length":35},{"x":80,"y":0,"length":80},{"x":140,"y":-50,"length":148.66068747318505},{"x":140,"y":-115,"length":181.1767093199344},{"x":140,"y":-200,"length":244.13111231467406},{"x":140,"y":-260,"length":295.296461204668},{"x":140,"y":-330,"length":358.4689665786984},{"x":140,"y":-395,"length":419.0763653560052},{"x":140,"y":-470,"length":490.40799340956914},{"x":140,"y":-550,"length":567.5385449465084},{"x":140,"y":-620,"length":635.6099432828281},{"x":140,"y":-695,"length":708.9605066574583},{"x":140,"y":-760,"length":772.7871634544663},{"x":140,"y":-840,"length":851.5867542417508},{"x":140,"y":-915,"length":925.648421378225},{"x":140,"y":-995,"length":1004.800975317998},{"x":140,"y":-1070,"length":1079.1200118615168},{"x":140,"y":-1150,"length":1158.4903970253702},{"x":140,"y":-1210,"length":1218.0722474467595},{"x":140,"y":-1275,"length":1282.663244971181},{"x":140,"y":-1345,"length":1352.2666157233934},{"x":140,"y":-1400,"length":1406.9825869569247},{"x":140,"y":-1455,"length":1461.7198774046963}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":1521,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":-220,"density":"1","height":1525,"action":0,"isStatic":true,"wireframe":false,"width":210,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":-55,"y":0,"length":55},{"x":-5,"y":0,"length":5},{"x":60,"y":0,"length":60},{"x":105,"y":-35,"length":110.67971810589327},{"x":140,"y":-65,"length":154.35349040433132},{"x":140,"y":-140,"length":197.9898987322333},{"x":140,"y":-215,"length":256.56383221335},{"x":140,"y":-290,"length":322.02484376209236},{"x":140,"y":-370,"length":395.60080889704966},{"x":140,"y":-440,"length":461.7358552246078},{"x":140,"y":-525,"length":543.3461143691009},{"x":140,"y":-610,"length":625.8594091327541},{"x":140,"y":-695,"length":708.9605066574583},{"x":140,"y":-780,"length":792.4645102463579},{"x":140,"y":-870,"length":881.1923740024082},{"x":140,"y":-955,"length":965.2072316347407},{"x":140,"y":-1040,"length":1049.3807697875925},{"x":140,"y":-1125,"length":1133.6776437771011},{"x":140,"y":-1210,"length":1218.0722474467595},{"x":140,"y":-1295,"length":1302.5455846149878},{"x":140,"y":-1380,"length":1387.0832707519762},{"x":140,"y":-1510,"length":1516.4761785138598}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":10130,"rotation":0,"y":-865,"vertices":[{"x":-895,"y":-805,"length":1203.7649272179349},{"x":100,"y":-805,"length":811.1874012828355},{"x":100,"y":100,"length":141.4213562373095},{"x":-325,"y":95,"length":338.60005906674024}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"stretchTexture":false,"x":8900,"rotation":0,"physic":false,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-80,"density":"1","height":79.25,"action":0,"isStatic":true,"wireframe":false,"width":216,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":37,"y":11,"length":38.600518131237564},{"x":74,"y":22,"length":77.20103626247513},{"x":113,"y":34,"length":118.00423721205946},{"x":148,"y":46,"length":154.983870128475},{"x":203,"y":63,"length":212.55117030964567}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":9109,"rotation":90,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":70,"y":0,"length":70},{"x":140,"y":0,"length":140},{"x":195,"y":0,"length":195},{"x":265,"y":0,"length":265},{"x":335,"y":0,"length":335},{"x":410,"y":0,"length":410},{"x":490,"y":0,"length":490},{"x":560,"y":0,"length":560},{"x":635,"y":0,"length":635},{"x":700,"y":0,"length":700},{"x":745,"y":0,"length":745},{"x":815,"y":0,"length":815},{"x":890,"y":0,"length":890},{"x":890,"y":35,"length":890.6879363727792},{"x":835,"y":35,"length":835.7332110189232},{"x":775,"y":35,"length":775.7899200170108},{"x":710,"y":35,"length":710.8621526006291},{"x":640,"y":35,"length":640.956316764255},{"x":575,"y":35,"length":576.064232529672},{"x":515,"y":35,"length":516.1879502661797},{"x":450,"y":35,"length":451.3590588434002},{"x":380,"y":35,"length":381.6084380618437},{"x":315,"y":35,"length":316.9384798348096},{"x":240,"y":35,"length":242.53865671269807},{"x":175,"y":35,"length":178.46568297574746},{"x":120,"y":35,"length":125},{"x":60,"y":35,"length":69.46221994724903},{"x":0,"y":35,"length":35}],"y":-521},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9690,"bg":true,"rotation":0,"y":100,"vertices":[{"x":-1255,"y":0,"length":1255},{"x":2170,"y":-10,"length":2170.0230413523263},{"x":2170,"y":765,"length":2300.8965643852835},{"x":-1255,"y":775,"length":1475.0084745519262}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"stretchTexture":false,"x":10288,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-755,"density":"1","height":16,"action":0,"isStatic":true,"wireframe":false,"width":248,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":235,"y":0,"length":235}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":10280,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-750,"density":"1","height":407,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-1,"y":394,"length":394.0012690334893}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":10080,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-470,"density":"1","height":407,"action":0,"isStatic":true,"wireframe":false,"width":17,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-1,"y":394,"length":394.0012690334893}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"stretchTexture":false,"x":9840,"rotation":0,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-140,"density":"1","height":211,"action":0,"isStatic":true,"wireframe":false,"width":16,"graphic":true,"textureMode":true,"shapeH":16,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":198,"length":198}],"type":7,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":5520,"bg":true,"rotation":0,"y":70,"vertices":[{"x":0,"y":0,"length":0},{"x":1640,"y":0,"length":1640},{"x":1645,"y":385,"length":1689.4525740606039},{"x":5,"y":385,"length":385.0324661635691}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":-570,"rotation":18,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":-15,"y":-25,"length":29.154759474226502},{"x":45,"y":-25,"length":51.478150704935004},{"x":85,"y":0,"length":85},{"x":130,"y":0,"length":130},{"x":180,"y":0,"length":180},{"x":250,"y":0,"length":250},{"x":305,"y":0,"length":305},{"x":380,"y":0,"length":380},{"x":440,"y":0,"length":440},{"x":520,"y":0,"length":520},{"x":605,"y":25,"length":605.5163086160438},{"x":520,"y":50,"length":522.398315464359},{"x":455,"y":50,"length":457.73900860643283},{"x":400,"y":50,"length":403.11288741492746},{"x":335,"y":50,"length":338.71079108879894},{"x":270,"y":50,"length":274.5906043549196},{"x":210,"y":50,"length":215.87033144922904},{"x":145,"y":50,"length":153.37861650177967},{"x":80,"y":50,"length":94.33981132056604},{"x":45,"y":70,"length":83.21658488546619},{"x":-20,"y":70,"length":72.80109889280519},{"x":15,"y":20,"length":25}],"y":30},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":110,"bg":true,"rotation":0,"y":410,"vertices":[{"x":-270,"y":0,"length":270},{"x":415,"y":0,"length":415},{"x":415,"y":580,"length":713.1795005466716},{"x":-270,"y":580,"length":639.7655820689325}],"viscosity":1.5,"id":-1,"sf":true,"density":2.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":470,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":1416,"y":0,"length":1416},{"x":1468,"y":-5,"length":1468.008514961681},{"x":1517,"y":-15,"length":1517.0741577127994},{"x":1563,"y":-32,"length":1563.327540856362},{"x":1606,"y":-56,"length":1606.9760421362853},{"x":1641,"y":-76,"length":1642.7589597990327},{"x":1673,"y":-92,"length":1675.5276780763725},{"x":1707,"y":-103,"length":1710.1046751588044},{"x":1741,"y":-107,"length":1744.284953784788},{"x":1775,"y":-105,"length":1778.1029216555492},{"x":1814,"y":-98,"length":1816.6452598127132},{"x":1848,"y":-85,"length":1849.9537832064887},{"x":1881,"y":-65,"length":1882.122737761807},{"x":1910,"y":-40,"length":1910.4188022525323},{"x":1935,"y":-9,"length":1935.0209301193618},{"x":1967,"y":47,"length":1967.5614348731274},{"x":1987,"y":86,"length":1988.860226360817},{"x":2006,"y":117,"length":2009.4091171287146},{"x":2033,"y":151,"length":2038.6000098106545},{"x":2065,"y":180,"length":2072.83019082606},{"x":2098,"y":205,"length":2107.991698275873},{"x":2128,"y":222,"length":2139.5485505124675},{"x":2167,"y":240,"length":2180.249756335269},{"x":2212,"y":252,"length":2226.3081547710326},{"x":2259,"y":258,"length":2273.685334429547},{"x":2300,"y":257,"length":2314.31393721768},{"x":2352,"y":251,"length":2365.355153037277},{"x":2395,"y":237,"length":2406.6977375648985},{"x":2438,"y":218,"length":2447.72710897273},{"x":2480,"y":188,"length":2487.1155984392844},{"x":2511,"y":161,"length":2516.15619546959},{"x":2540,"y":124,"length":2543.0249703846794},{"x":2568,"y":98,"length":2569.8692573747794},{"x":2599,"y":81,"length":2600.261909885233},{"x":2638,"y":72,"length":2638.9823796304513},{"x":2679,"y":73,"length":2679.99440297923},{"x":2715,"y":84,"length":2716.2991366931587},{"x":2759,"y":106,"length":2761.0354941579435},{"x":2802,"y":136,"length":2805.2985580861086},{"x":3010,"y":330,"length":3028.0356668969407},{"x":3059,"y":367,"length":3080.9365459223595},{"x":3109,"y":392,"length":3133.6153241902557},{"x":3153,"y":405,"length":3178.9045282927264},{"x":3206,"y":409,"length":3231.983446739788},{"x":3249,"y":409,"length":3274.6422705388754},{"x":3301,"y":402,"length":3325.3879472927665},{"x":3356,"y":385,"length":3378.011397257268},{"x":3398,"y":364,"length":3417.4405627603824},{"x":3436,"y":337,"length":3452.4867849131588},{"x":3468,"y":305,"length":3481.386074539852},{"x":3501,"y":264,"length":3510.9396178231264},{"x":3528,"y":216,"length":3534.6060600864703},{"x":3546,"y":169,"length":3550.0249294899327},{"x":3558,"y":113,"length":3559.7939547114242},{"x":3558,"y":49,"length":3558.3373926596673},{"x":3553,"y":0,"length":3553},{"x":3536,"y":-45,"length":3536.2863289049433},{"x":3512,"y":-93,"length":3513.231133870927},{"x":3480,"y":-134,"length":3482.5789294716637},{"x":3442,"y":-172,"length":3446.2948219791065},{"x":3398,"y":-203,"length":3404.0583132490547},{"x":3357,"y":-226,"length":3364.598787374209},{"x":3339,"y":-244,"length":3347.9033737549835},{"x":3325,"y":-273,"length":3336.1885438326176},{"x":3324,"y":-303,"length":3337.7814488069766},{"x":3335,"y":-332,"length":3351.4845964139536},{"x":3355,"y":-352,"length":3373.4150352424767},{"x":3380,"y":-364,"length":3399.54349876568},{"x":3708,"y":-501,"length":3741.692798720921},{"x":3754,"y":-514,"length":3789.0252044556264},{"x":5130,"y":-515,"length":5155.78558514607},{"x":5170,"y":-510,"length":5195.093839383462},{"x":5203,"y":-500,"length":5226.969389617659},{"x":5228,"y":-485,"length":5250.4484570367895},{"x":5238,"y":-452,"length":5257.465929513952},{"x":5232,"y":-412,"length":5248.196642657362},{"x":5202,"y":-324,"length":5212.080198922499},{"x":5179,"y":-280,"length":5186.563505829269},{"x":5155,"y":-220,"length":5159.692335789025},{"x":5145,"y":-165,"length":5147.645092661303},{"x":5159,"y":-118,"length":5160.349309882035},{"x":5200,"y":-80,"length":5200.615348206403},{"x":5819,"y":-46,"length":5819.181815341397},{"x":5889,"y":-338,"length":5898.691804120639},{"x":5908,"y":-359,"length":5918.897279054604},{"x":5924,"y":-342,"length":5933.863833961814},{"x":5993,"y":-51,"length":5993.216999241726},{"x":6488,"y":-26,"length":6488.052095968404},{"x":6552,"y":-36,"length":6552.098900352466},{"x":6579,"y":-61,"length":6579.282787660065},{"x":6600,"y":-101,"length":6600.772757791318},{"x":6607,"y":-148,"length":6608.657427950097},{"x":6598,"y":-225,"length":6601.835275133726},{"x":6584,"y":-265,"length":6589.330846148188},{"x":6572,"y":-301,"length":6578.889343954646},{"x":6564,"y":-339,"length":6572.7480554179165},{"x":6562,"y":-387,"length":6573.401935071368},{"x":6571,"y":-423,"length":6584.600975002206},{"x":6590,"y":-448,"length":6605.210367581036},{"x":6625,"y":-463,"length":6641.159085581372},{"x":7667,"y":-455,"length":7680.48917712928},{"x":7726,"y":-463,"length":7739.860786861738},{"x":7773,"y":-473,"length":7787.378121036631},{"x":7817,"y":-487,"length":7832.155386609742},{"x":7861,"y":-507,"length":7877.332670390403},{"x":7900,"y":-528,"length":7917.62489639412},{"x":7937,"y":-556,"length":7956.450527716489},{"x":7974,"y":-585,"length":7995.430007197861},{"x":8011,"y":-605,"length":8033.812668963597},{"x":8055,"y":-618,"length":8078.672477579469},{"x":8114,"y":-629,"length":8138.3436275448585},{"x":8170,"y":-630,"length":8194.254084417935},{"x":8215,"y":-623,"length":8238.58932099422},{"x":8264,"y":-610,"length":8286.482727912971},{"x":8313,"y":-592,"length":8334.052615624645},{"x":8362,"y":-561,"length":8380.79739642953},{"x":8401,"y":-533,"length":8417.891066056865},{"x":8439,"y":-495,"length":8453.504953568076},{"x":8457,"y":-435,"length":8468.180087834693},{"x":8416,"y":-441,"length":8427.546321438998},{"x":8376,"y":-428,"length":8386.927923858651},{"x":8324,"y":-436,"length":8335.410727732617},{"x":8287,"y":-430,"length":8298.14852843693},{"x":8257,"y":-448,"length":8269.144635329581},{"x":8224,"y":-451,"length":8236.357022373422},{"x":8191,"y":-442,"length":8202.916859264149},{"x":8160,"y":-435,"length":8171.5864432801545},{"x":8126,"y":-446,"length":8138.2302744515655},{"x":8092,"y":-442,"length":8104.062438061543},{"x":8066,"y":-418,"length":8076.823633087452},{"x":8051,"y":391,"length":8060.488942986027},{"x":8011,"y":1005,"length":8073.793779878205},{"x":4443,"y":996,"length":4553.269704289435},{"x":1245,"y":725,"length":1440.7116297163705},{"x":0,"y":725,"length":725},{"x":21,"y":269,"length":269.8184574857695},{"x":0,"y":197,"length":197},{"x":-29,"y":155,"length":157.68956845650888},{"x":-44,"y":97,"length":106.51291001564083},{"x":-46,"y":62,"length":77.20103626247513},{"x":-36,"y":29,"length":46.22769732530488}],"y":380},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":969,"rotation":123.00000000000006,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":false,"textureOffset":0,"id":-1,"smoothing":true,"y":-7,"density":"1","height":567,"action":0,"isStatic":true,"wireframe":false,"width":668.65,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":17,"y":-72,"length":73.97972695272672},{"x":-58,"y":-188,"length":196.74348782107123},{"x":-88,"y":-224,"length":240.66574330386118},{"x":-119,"y":-253,"length":279.58898404622454},{"x":-161,"y":-284,"length":326.4613300224086},{"x":-205,"y":-305,"length":367.4914965002592},{"x":-255,"y":-320,"length":409.1760012512953},{"x":-313,"y":-326,"length":451.9347298006649},{"x":-368,"y":-323,"length":489.64579034236573},{"x":-423,"y":-309,"length":523.8415791057445},{"x":-475,"y":-287,"length":554.9720713693617},{"x":-521,"y":-256,"length":580.4972006823117},{"x":-560,"y":-217,"length":600.5738922064462},{"x":-589,"y":-177,"length":615.0203248673981},{"x":-610,"y":-138,"length":625.4150621787103},{"x":-624,"y":-100,"length":631.9620241755038},{"x":-633,"y":-61,"length":635.9323863430766},{"x":-636,"y":-23,"length":636.4157446198201},{"x":-635,"y":22,"length":635.380988069363},{"x":-628,"y":61,"length":630.955624430118},{"x":-617,"y":96,"length":624.423734334306},{"x":-601,"y":134,"length":615.7572573668946},{"x":-581,"y":167,"length":604.5246066125018},{"x":-555,"y":201,"length":590.2762065338565},{"x":-530,"y":226,"length":576.1735849550897}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":-170,"physic":false,"lineId":0,"y":450,"height":2618,"isRoad":false,"direction":90,"width":12333,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2185,"y":-30,"length":2185.205939951656},{"x":2370,"y":-25,"length":2370.131852872325},{"x":2795,"y":195,"length":2801.7940680927995},{"x":3815,"y":355,"length":3831.4814367291406},{"x":3995,"y":340,"length":4009.441981124057},{"x":4120,"y":260,"length":4128.195731793734},{"x":4440,"y":-335,"length":4452.62001522699},{"x":4525,"y":-445,"length":4546.828565054988},{"x":4615,"y":-475,"length":4639.3803465549145},{"x":5700,"y":-335,"length":5709.835812000201},{"x":8420,"y":-525,"length":8436.35140330226},{"x":8610,"y":-635,"length":8633.38433060871},{"x":8725,"y":-680,"length":8751.458449881367},{"x":8840,"y":-680,"length":8866.115271075601},{"x":8950,"y":-640,"length":8972.853503763448},{"x":9040,"y":-585,"length":9058.908598722033},{"x":9415,"y":-410,"length":9423.92301539014},{"x":9720,"y":-340,"length":9725.94468419392},{"x":10165,"y":-350,"length":10171.023793109522},{"x":10820,"y":-1240,"length":10890.821823902914},{"x":12320,"y":-2250,"length":12523.773393031352}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":5890,"rotation":6,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":60,"y":0,"length":60},{"x":115,"y":0,"length":115},{"x":170,"y":0,"length":170},{"x":235,"y":0,"length":235},{"x":295,"y":0,"length":295},{"x":350,"y":0,"length":350},{"x":400,"y":0,"length":400},{"x":455,"y":0,"length":455},{"x":515,"y":0,"length":515},{"x":580,"y":0,"length":580},{"x":645,"y":0,"length":645},{"x":705,"y":0,"length":705},{"x":765,"y":0,"length":765},{"x":825,"y":0,"length":825},{"x":890,"y":0,"length":890},{"x":935,"y":0,"length":935},{"x":985,"y":0,"length":985},{"x":985,"y":35,"length":985.6216312561327},{"x":915,"y":35,"length":915.6691542254767},{"x":855,"y":35,"length":855.716074407861},{"x":795,"y":35,"length":795.7700672933106},{"x":740,"y":35,"length":740.8272403199007},{"x":680,"y":35,"length":680.9001395212076},{"x":615,"y":35,"length":615.995129850878},{"x":540,"y":35,"length":541.1330705103875},{"x":470,"y":35,"length":471.3013897709193},{"x":405,"y":35,"length":406.5095324835569},{"x":340,"y":35,"length":341.796723214252},{"x":260,"y":35,"length":262.3451924468981},{"x":190,"y":35,"length":193.19679086361657},{"x":130,"y":35,"length":134.6291201783626},{"x":65,"y":35,"length":73.824115301167},{"x":0,"y":35,"length":35}],"y":-64},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2715,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":9,"rem":true,"safeId":-1,"vertices":[{"x":180,"y":0,"length":180},{"x":173,"y":46,"length":179.0111728356641},{"x":155,"y":89,"length":178.73443988218946},{"x":127,"y":127,"length":179.60512242138307},{"x":90,"y":155,"length":179.2344832893492},{"x":46,"y":173,"length":179.0111728356641},{"x":0,"y":180,"length":180},{"x":-46,"y":173,"length":179.0111728356641},{"x":-89,"y":155,"length":178.73443988218946},{"x":-127,"y":127,"length":179.60512242138307},{"x":-155,"y":89,"length":178.73443988218946},{"x":-173,"y":46,"length":179.0111728356641},{"x":-180,"y":0,"length":180},{"x":-173,"y":-46,"length":179.0111728356641},{"x":-155,"y":-90,"length":179.2344832893492},{"x":-127,"y":-127,"length":179.60512242138307},{"x":-90,"y":-155,"length":179.2344832893492},{"x":-46,"y":-173,"length":179.0111728356641},{"x":0,"y":-180,"length":180},{"x":46,"y":-173,"length":179.0111728356641},{"x":90,"y":-155,"length":179.2344832893492},{"x":127,"y":-127,"length":179.60512242138307},{"x":155,"y":-90,"length":179.2344832893492},{"x":173,"y":-46,"length":179.0111728356641}],"y":400},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":9030,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-1082,"y":-160,"length":1093.7659713119622},{"x":-1085,"y":-195,"length":1102.383780722485},{"x":-1070,"y":-255,"length":1099.9659085626245},{"x":-1025,"y":-320,"length":1073.79001671649},{"x":-965,"y":-390,"length":1040.8289965215226},{"x":-905,"y":-475,"length":1022.0812100806863},{"x":69,"y":-1200,"length":1201.9821130116704},{"x":776,"y":-82,"length":780.3204469959761},{"x":1273,"y":-83,"length":1275.702943478614},{"x":912,"y":440,"length":1012.5927118047018},{"x":881,"y":489,"length":1007.612028510974},{"x":865,"y":515,"length":1006.7025379922313},{"x":840,"y":540,"length":998.5990186255943},{"x":808,"y":549,"length":976.8648831849777},{"x":775,"y":535,"length":941.727136701497},{"x":745,"y":520,"length":908.5290309065529},{"x":720,"y":500,"length":876.584280032445},{"x":685,"y":500,"length":848.0713413386871},{"x":640,"y":505,"length":815.2453618389987},{"x":605,"y":485,"length":775.4031209635411},{"x":580,"y":453,"length":735.9408943658451},{"x":560,"y":410,"length":694.0461079784253},{"x":530,"y":365,"length":643.5254462723288},{"x":497,"y":314,"length":587.8817908389407},{"x":447,"y":261,"length":517.6195514081747},{"x":383,"y":207,"length":435.35962146253297},{"x":322,"y":169,"length":363.6550563377333},{"x":248,"y":140,"length":284.787640181241},{"x":162,"y":114,"length":198.09088823063013},{"x":50,"y":96,"length":108.24047302187847},{"x":-105,"y":90,"length":138.2931668593933},{"x":-200,"y":95,"length":221.41589825484527},{"x":-300,"y":111,"length":319.87653868328636},{"x":-411,"y":147,"length":436.4974226728034},{"x":-490,"y":180,"length":522.0153254455275},{"x":-561,"y":220,"length":602.5952206913029},{"x":-612,"y":256,"length":663.3852575992324},{"x":-635,"y":304,"length":704.0177554579145},{"x":-665,"y":310,"length":733.7063445275637},{"x":-700,"y":300,"length":761.5773105863908},{"x":-760,"y":280,"length":809.9382692526635},{"x":-805,"y":250,"length":842.9264499349869},{"x":-845,"y":210,"length":870.7037383633999},{"x":-875,"y":145,"length":886.9329174182228},{"x":-905,"y":75,"length":908.1024171314599},{"x":-930,"y":20,"length":930.2150289046076},{"x":-985,"y":-55,"length":986.5343379730884},{"x":-1030,"y":-110,"length":1035.8571330062848}],"y":-690},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"stretchTexture":false,"x":9718,"rotation":-54,"physic":true,"originOffsetRatio":0,"repeatTexture":true,"snapToGrid":true,"textureOffset":0,"id":-1,"smoothing":true,"y":59,"density":"1","height":225,"action":0,"isStatic":true,"wireframe":false,"width":1199.35,"graphic":true,"textureMode":true,"shapeH":17,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":33,"y":45,"length":55.80322571321482},{"x":61,"y":83,"length":103.00485425454472},{"x":89,"y":120,"length":149.40214188558343},{"x":115,"y":148,"length":187.42731924668826},{"x":154,"y":176,"length":233.8632078801623},{"x":189,"y":192,"length":269.4160351575236},{"x":225,"y":205,"length":304.38462510448846},{"x":270,"y":210,"length":342.0526275297414},{"x":315,"y":210,"length":378.5828839237189},{"x":385,"y":210,"length":438.54874301495835},{"x":455,"y":210,"length":501.12373721467236},{"x":520,"y":210,"length":560.8029957123981},{"x":590,"y":210,"length":626.2587324740471},{"x":645,"y":210,"length":678.3251432757008},{"x":710,"y":210,"length":740.4052944165107},{"x":775,"y":210,"length":802.9476944359452},{"x":835,"y":210,"length":861.0023228772383},{"x":900,"y":210,"length":924.1753080449618},{"x":955,"y":210,"length":977.8164449425055},{"x":1016,"y":209,"length":1037.2738307698696},{"x":1075,"y":202,"length":1093.8139695578952},{"x":1114,"y":186,"length":1129.4210906477708},{"x":1149,"y":161,"length":1160.2249781831108},{"x":1186,"y":119,"length":1191.955116604648}],"type":4,"safeId":-1},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":1385,"y":317,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":4379,"y":-198,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":7600,"y":-140,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":3715,"ag":true,"active":true,"y":480,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"},{"params":{"x":890,"ag":true,"active":true,"y":50,"sgos":true,"btg":true,"id":-1,"ad":-1,"width":273,"height":324.1,"scaleX":1,"scaleY":1,"safeId":-1,"rotation":0},"className":"SpikeBall200E"}],[{"params":{"x":2660,"rotation":0,"y":590,"time":1,"safeId":-1,"force":6000,"width":64.1,"height":64.1},"className":"BoostE"},{"params":{"x":2720,"stones":false,"physic":false,"impulse":1,"id":3,"radius":1,"y":610,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":2560,"stones":false,"physic":false,"impulse":1,"id":3,"radius":1,"y":540,"height":53.2,"width":53.2,"safeId":-1,"rotation":45,"count":1},"className":"Tnt1"}],null,[{"params":{"x":1098,"rotation":0,"y":-30,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":1384,"rotation":0,"y":250,"id":0,"width":128,"height":466},"className":"SafePointE"},{"params":{"x":4380,"rotation":0,"y":-270,"id":0,"width":128,"height":1354},"className":"SafePointE"},{"params":{"x":7600,"rotation":0,"y":-210,"id":0,"width":128,"height":1313},"className":"SafePointE"},{"params":{"x":9840,"rotation":0,"y":-46,"id":0,"width":128,"height":128},"className":"SafePointE"}],[{"params":{"x":1120,"sndId":-1,"rotation":0,"y":10,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":9,"width":316,"height":172},"className":"ToggleE"},{"params":{"x":540,"sndId":-1,"rotation":0,"y":-300,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":619},"className":"ToggleE"},{"params":{"x":-310,"active":0,"y":140,"cycle":0,"body":false,"id":1,"position":0,"width":557,"height":189,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":544,"y":176,"length":571.7621883265804}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":580},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":6840,"rotation":0,"graphic":0,"safeId":-1,"id":2,"y":56,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5430,"sndId":-1,"rotation":0,"y":-280,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":2,"width":64,"height":683},"className":"ToggleE"},{"params":{"x":3060,"sndId":-1,"rotation":24,"y":250,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":3,"width":110,"height":521},"className":"ToggleE"},{"params":{"x":2714,"active":3,"y":400,"cycle":0,"body":false,"id":3,"position":0,"width":973,"height":2413,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":960,"y":-2400,"length":2584.879107424562}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1500},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":9090,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":-20,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9090,"rotation":0,"graphic":0,"safeId":-1,"id":5,"y":-480,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":9070,"sndId":-1,"rotation":0,"y":-320,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":5,"width":22,"height":966},"className":"ToggleE"},{"params":{"x":889,"rotation":0,"graphic":0,"id":9,"y":49,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":100,"useWeld":false},"className":"MotorJointE"},{"params":{"x":3715,"rotation":0,"graphic":0,"id":11,"y":480,"height":17,"width":17,"time":0,"safeId":-1,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2220,"sndId":-1,"rotation":0,"y":-210,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":64,"height":1201},"className":"ToggleE"}]],"settings":{"prizes":"28,35,42","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map8.json b/motox3mspooky/assets/levels/map8.json deleted file mode 100644 index f6225e55..00000000 --- a/motox3mspooky/assets/levels/map8.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":1883,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1713,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2563,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1207,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2053,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1372,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2223,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2393,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2733,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1543,"rotation":0,"physic":true,"line":true,"plr":false,"id":81,"graphic":true,"density":0.7,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-10,"vertices":[{"x":0,"y":0,"length":0},{"x":185,"y":0,"length":185},{"x":185,"y":45,"length":190.3943276465977},{"x":0,"y":45,"length":45}],"y":417},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1160,"bg":true,"rotation":0,"y":450,"vertices":[{"x":0,"y":0,"length":0},{"x":1790,"y":0,"length":1790},{"x":1790,"y":630,"length":1897.6301009416982},{"x":0,"y":630,"length":630}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":7480,"rotation":0,"y":1860,"width":409,"height":684},"className":"FinishZone"},{"params":{"x":7426,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":3,"vertices":[{"x":0,"y":0,"length":0},{"x":15,"y":-58,"length":59.90826320300064},{"x":47,"y":-112,"length":121.46192819151193},{"x":94,"y":-161,"length":186.43229333996834},{"x":152,"y":-191,"length":244.10038918445008},{"x":220,"y":-207,"length":302.07449412355226},{"x":286,"y":-204,"length":351.30044121805486},{"x":349,"y":-186,"length":395.47060573448437},{"x":400,"y":-154,"length":428.6210447469886},{"x":442,"y":-110,"length":455.48216210956053},{"x":473,"y":-57,"length":476.4220817720354},{"x":485,"y":-5,"length":485.02577251111103},{"x":490,"y":38,"length":491.4712606043206},{"x":485,"y":95,"length":494.2165517260627},{"x":466,"y":145,"length":488.0379083636844},{"x":426,"y":203,"length":471.89511546529064},{"x":381,"y":243,"length":451.896005735833},{"x":328,"y":272,"length":426.1079675387448},{"x":271,"y":284,"length":392.5519073956972},{"x":220,"y":284,"length":359.2436499090833},{"x":160,"y":271,"length":314.70780098370614},{"x":114,"y":251,"length":275.6755339162328},{"x":76,"y":220,"length":232.75738441561847},{"x":37,"y":177,"length":180.8258831030558},{"x":16,"y":137,"length":137.93114224133723},{"x":1,"y":89,"length":89.00561780022652},{"x":-2,"y":43,"length":43.04648650006177}],"y":1350},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7796,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":3,"vertices":[{"x":0,"y":0,"length":0},{"x":15,"y":-58,"length":59.90826320300064},{"x":47,"y":-112,"length":121.46192819151193},{"x":94,"y":-161,"length":186.43229333996834},{"x":152,"y":-191,"length":244.10038918445008},{"x":220,"y":-207,"length":302.07449412355226},{"x":286,"y":-204,"length":351.30044121805486},{"x":349,"y":-186,"length":395.47060573448437},{"x":400,"y":-154,"length":428.6210447469886},{"x":442,"y":-110,"length":455.48216210956053},{"x":473,"y":-57,"length":476.4220817720354},{"x":485,"y":-5,"length":485.02577251111103},{"x":490,"y":38,"length":491.4712606043206},{"x":485,"y":95,"length":494.2165517260627},{"x":466,"y":145,"length":488.0379083636844},{"x":426,"y":203,"length":471.89511546529064},{"x":381,"y":243,"length":451.896005735833},{"x":328,"y":272,"length":426.1079675387448},{"x":271,"y":284,"length":392.5519073956972},{"x":220,"y":284,"length":359.2436499090833},{"x":160,"y":271,"length":314.70780098370614},{"x":114,"y":251,"length":275.6755339162328},{"x":76,"y":220,"length":232.75738441561847},{"x":37,"y":177,"length":180.8258831030558},{"x":16,"y":137,"length":137.93114224133723},{"x":1,"y":89,"length":89.00561780022652},{"x":-2,"y":43,"length":43.04648650006177}],"y":1890},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6430,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":3,"rem":true,"safeId":2,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":-50,"length":53.85164807134504},{"x":60,"y":-93,"length":110.6752004741803},{"x":109,"y":-116,"length":159.17600321656528},{"x":162,"y":-126,"length":205.23157651784484},{"x":230,"y":-130,"length":264.1968962724581},{"x":300,"y":-130,"length":326.9556544854363},{"x":1265,"y":-120,"length":1270.6789523715265},{"x":1335,"y":-120,"length":1340.3824081209063},{"x":1414,"y":-117,"length":1418.8322663373567},{"x":1480,"y":-106,"length":1483.7910904167068},{"x":1530,"y":-69,"length":1531.5550920551307},{"x":1557,"y":-42,"length":1557.5663709774938},{"x":1580,"y":0,"length":1580},{"x":1586,"y":52,"length":1586.8522300453815},{"x":1580,"y":100,"length":1583.161394173064},{"x":1565,"y":144,"length":1571.6109569483156},{"x":1526,"y":193,"length":1538.15636396304},{"x":1478,"y":226,"length":1495.1789190595218},{"x":1426,"y":237,"length":1445.560444948602},{"x":1370,"y":240,"length":1390.8630414242805},{"x":1305,"y":240,"length":1326.88545097156},{"x":1230,"y":240,"length":1253.1959144523253},{"x":320,"y":230,"length":394.0812099047606},{"x":245,"y":230,"length":336.04315199093105},{"x":160,"y":228,"length":278.53904573685895},{"x":104,"y":214,"length":237.9327636119078},{"x":56,"y":188,"length":196.16319736382766},{"x":21,"y":149,"length":150.4725888658795},{"x":0,"y":100,"length":100},{"x":-2,"y":46,"length":46.04345773288535}],"y":-220},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5630,"rotation":0,"physic":false,"line":true,"plr":false,"id":3,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":8,"rem":true,"safeId":2,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":165,"y":10,"length":165.3027525481654},{"x":235,"y":60,"length":242.53865671269807},{"x":250,"y":85,"length":264.0549185302179},{"x":250,"y":105,"length":271.15493725912495},{"x":240,"y":125,"length":270.60118255469615},{"x":220,"y":130,"length":255.53864678361276},{"x":195,"y":125,"length":231.62469643800938},{"x":165,"y":110,"length":198.3053201505194},{"x":125,"y":100,"length":160.0781059358212},{"x":60,"y":95,"length":112.36102527122117},{"x":10,"y":95,"length":95.524865872714},{"x":-5,"y":85,"length":85.14693182963201},{"x":-20,"y":65,"length":68.00735254367721},{"x":-25,"y":45,"length":51.478150704935004},{"x":-20,"y":15,"length":25}],"y":-830},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5850,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":2,"vertices":[{"x":-5,"y":0,"length":5},{"x":-16,"y":-48,"length":50.59644256269407},{"x":-27,"y":-86,"length":90.13878188659973},{"x":-53,"y":-153,"length":161.91973320136123},{"x":-74,"y":-200,"length":213.2510257888576},{"x":-98,"y":-240,"length":259.2373429890069},{"x":-135,"y":-287,"length":317.1655719021218},{"x":-186,"y":-344,"length":391.0652119531984},{"x":-223,"y":-378,"length":438.8769759283346},{"x":-233,"y":-392,"length":456.018639969903},{"x":-232,"y":-412,"length":472.8297790960294},{"x":-224,"y":-430,"length":484.8463674196188},{"x":-204,"y":-447,"length":491.350180624776},{"x":-186,"y":-458,"length":494.3278264471868},{"x":-153,"y":-467,"length":491.4244601156927},{"x":-121,"y":-468,"length":483.3890772452352},{"x":-91,"y":-462,"length":470.87684164757985},{"x":-70,"y":-450,"length":455.411901469428},{"x":-57,"y":-432,"length":435.74419101119406},{"x":-28,"y":-367,"length":368.06657006579667},{"x":27,"y":-272,"length":273.33678859604686},{"x":80,"y":-197,"length":212.6240814207083},{"x":104,"y":-161,"length":191.66898549321954},{"x":138,"y":-127,"length":187.5446613476374},{"x":170,"y":-95,"length":194.74342094150447},{"x":198,"y":-70,"length":210.00952359357422},{"x":221,"y":-54,"length":227.50164834567684},{"x":252,"y":-35,"length":254.41894583540747},{"x":283,"y":-22,"length":283.8538356267183},{"x":320,"y":-12,"length":320.22492095400696},{"x":350,"y":7,"length":350.06999300139967},{"x":355,"y":35,"length":356.72117963473937},{"x":357,"y":100,"length":370.7411495909242},{"x":236,"y":100,"length":256.3123094976127},{"x":0,"y":100,"length":100},{"x":0,"y":44,"length":44}],"y":-300},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":140,"physic":false,"lineId":-1,"y":420,"height":1363,"isRoad":false,"direction":90,"width":7453,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1105,"y":260,"length":1135.1761977772437},{"x":2880,"y":230,"length":2889.169430822637},{"x":3340,"y":125,"length":3342.3382533789127},{"x":3690,"y":-395,"length":3711.0813787897455},{"x":3825,"y":-440,"length":3850.22401945653},{"x":4635,"y":-50,"length":4635.269679317483},{"x":4925,"y":60,"length":4925.365468673365},{"x":5265,"y":45,"length":5265.192304180352},{"x":5615,"y":-130,"length":5616.504695983081},{"x":7440,"y":-1090,"length":7519.421520303274}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":-36,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-84,"y":-620,"length":625.664446808351},{"x":-90,"y":-2150,"length":2151.8828964420904},{"x":9510,"y":-2410,"length":9810.616698250931},{"x":9625,"y":-505,"length":9638.238947027616},{"x":9416,"y":1656,"length":9560.512120174317},{"x":8340,"y":1563,"length":8485.197051335932},{"x":8337,"y":1490,"length":8469.100837751314},{"x":8317,"y":1410,"length":8435.673594918191},{"x":8257,"y":1323,"length":8362.318936754325},{"x":8173,"y":1276,"length":8272.007313826554},{"x":8070,"y":1253,"length":8166.69510879401},{"x":8020,"y":1226,"length":8113.166829296683},{"x":8090,"y":1180,"length":8175.603953225719},{"x":8140,"y":1143,"length":8219.856993889856},{"x":8172,"y":1112,"length":8247.310349441204},{"x":8203,"y":1070,"length":8272.491100025432},{"x":8224,"y":1035,"length":8288.872118690215},{"x":8250,"y":983,"length":8308.356576363343},{"x":8261,"y":951,"length":8315.559031117511},{"x":8273,"y":906,"length":8322.461474828226},{"x":8276,"y":852,"length":8319.740380564768},{"x":8277,"y":803,"length":8315.860628942743},{"x":8269,"y":748,"length":8302.762492086595},{"x":8257,"y":690,"length":8285.779927079888},{"x":8226,"y":617,"length":8249.106921358214},{"x":8190,"y":550,"length":8208.446868927154},{"x":8141,"y":499,"length":8156.278685773311},{"x":8097,"y":466,"length":8110.398572203465},{"x":8052,"y":434,"length":8063.687741970171},{"x":8003,"y":410,"length":8013.495429586268},{"x":7937,"y":388,"length":7946.478024886245},{"x":7880,"y":376,"length":7888.965458157362},{"x":7811,"y":373,"length":7819.900894512666},{"x":7747,"y":383,"length":7756.461693323831},{"x":7681,"y":403,"length":7691.564860286884},{"x":7616,"y":433,"length":7628.29895848347},{"x":7545,"y":466,"length":7559.37702459667},{"x":7497,"y":495,"length":7513.323765152145},{"x":7356,"y":596,"length":7380.105148302428},{"x":7222,"y":707,"length":7256.523478911923},{"x":7182,"y":737,"length":7219.71557611517},{"x":7144,"y":765,"length":7184.842447820272},{"x":7110,"y":781,"length":7152.76596849079},{"x":7069,"y":787,"length":7112.673899455815},{"x":7023,"y":783,"length":7066.513850548939},{"x":6973,"y":769,"length":7015.275475703003},{"x":6930,"y":742,"length":6969.610032132357},{"x":6907,"y":718,"length":6944.218674552235},{"x":6892,"y":690,"length":6926.453926793998},{"x":6880,"y":643,"length":6909.9818378921955},{"x":6882,"y":597,"length":6907.845756818836},{"x":6896,"y":554,"length":6918.217400458011},{"x":6920,"y":520,"length":6939.510069161944},{"x":6947,"y":486,"length":6963.97910680381},{"x":6987,"y":460,"length":7002.126034284159},{"x":7061,"y":442,"length":7074.820492422405},{"x":7116,"y":432,"length":7129.100925081648},{"x":7178,"y":431,"length":7190.927965151646},{"x":7240,"y":420,"length":7252.172088415994},{"x":7333,"y":391,"length":7343.416779674159},{"x":7440,"y":357,"length":7448.560196440651},{"x":7525,"y":324,"length":7531.971919756473},{"x":7618,"y":288,"length":7623.44200476399},{"x":7681,"y":258,"length":7685.33180806138},{"x":7740,"y":225,"length":7743.26965822578},{"x":7798,"y":182,"length":7800.123588764475},{"x":7870,"y":118,"length":7870.884575446396},{"x":7935,"y":50,"length":7935.157528367033},{"x":8002,"y":-42,"length":8002.110221685278},{"x":8055,"y":-135,"length":8056.131205485671},{"x":8083,"y":-198,"length":8085.424726011615},{"x":8110,"y":-275,"length":8114.661114304158},{"x":8140,"y":-425,"length":8151.087350777196},{"x":8145,"y":-570,"length":8164.920391528628},{"x":8140,"y":-664,"length":8167.037161663953},{"x":8130,"y":-745,"length":8164.063020334912},{"x":8107,"y":-832,"length":8149.581154881519},{"x":8075,"y":-925,"length":8127.80720735919},{"x":8034,"y":-1004,"length":8096.491338845488},{"x":7995,"y":-1065,"length":8065.6214887632805},{"x":7941,"y":-1142,"length":8022.695619304025},{"x":7880,"y":-1210,"length":7972.358496705978},{"x":7791,"y":-1282,"length":7895.77133660797},{"x":7720,"y":-1330,"length":7833.728358833998},{"x":7652,"y":-1371,"length":7773.850075734675},{"x":7575,"y":-1405,"length":7704.196908179333},{"x":7495,"y":-1431,"length":7630.385704536829},{"x":7410,"y":-1445,"length":7549.577802764868},{"x":7190,"y":-1455,"length":7335.74297532295},{"x":6990,"y":-1455,"length":7139.8266785686055},{"x":6850,"y":-1439,"length":6999.515768965736},{"x":6802,"y":-1431,"length":6950.896704742489},{"x":6757,"y":-1421,"length":6904.801952264815},{"x":6699,"y":-1404,"length":6844.5465152923025},{"x":6627,"y":-1387,"length":6770.590668471991},{"x":6580,"y":-1380,"length":6723.154021737119},{"x":6404,"y":-1364,"length":6547.649349193954},{"x":6332,"y":-1361,"length":6476.6152425476075},{"x":6266,"y":-1355,"length":6410.833097187915},{"x":6210,"y":-1336,"length":6352.08595659725},{"x":6160,"y":-1310,"length":6297.753567741437},{"x":6124,"y":-1288,"length":6257.980504923294},{"x":6104,"y":-1268,"length":6234.311509701773},{"x":6040,"y":-1193,"length":6156.691400419547},{"x":6015,"y":-1175,"length":6128.690724779641},{"x":5963,"y":-1140,"length":6070.994070166763},{"x":5935,"y":-1130,"length":6041.616091742341},{"x":5915,"y":-1130,"length":6021.9701925532645},{"x":5898,"y":-1141,"length":6007.352578299363},{"x":5880,"y":-1161,"length":5993.523254313776},{"x":5860,"y":-1186,"length":5978.812256627565},{"x":5825,"y":-1213,"length":5949.957478839659},{"x":5787,"y":-1223,"length":5914.8202001413365},{"x":5759,"y":-1227,"length":5888.260354298203},{"x":5733,"y":-1221,"length":5861.580844789228},{"x":5708,"y":-1214,"length":5835.671340985543},{"x":5680,"y":-1213,"length":5808.077909257072},{"x":5656,"y":-1213,"length":5784.609321293876},{"x":5639,"y":-1227,"length":5770.9487954754895},{"x":5628,"y":-1252,"length":5765.577854820798},{"x":5627,"y":-1282,"length":5771.191644712554},{"x":5633,"y":-1323,"length":5786.278423995859},{"x":5640,"y":-1373,"length":5804.716099862249},{"x":5633,"y":-1413,"length":5807.517369754481},{"x":5602,"y":-1463,"length":5789.885404738163},{"x":5556,"y":-1496,"length":5753.881472536604},{"x":5487,"y":-1519,"length":5693.375975640463},{"x":5415,"y":-1535,"length":5628.361217974553},{"x":5267,"y":-1551,"length":5490.6183622612125},{"x":5177,"y":-1555,"length":5405.492946993826},{"x":5096,"y":-1553,"length":5327.38444266978},{"x":5007,"y":-1540,"length":5238.477736900291},{"x":4927,"y":-1516,"length":5154.957322810733},{"x":4876,"y":-1497,"length":5100.625941980063},{"x":4840,"y":-1470,"length":5058.309994454669},{"x":4813,"y":-1427,"length":5020.089441434286},{"x":4800,"y":-1385,"length":4995.820753389777},{"x":4800,"y":-1335,"length":4982.190783179624},{"x":4810,"y":-1285,"length":4978.687075926745},{"x":4832,"y":-1242,"length":4989.066846615708},{"x":4866,"y":-1202,"length":5012.260966869143},{"x":4914,"y":-1161,"length":5049.288761796061},{"x":4973,"y":-1126,"length":5098.882720753636},{"x":5012,"y":-1106,"length":5132.580247789605},{"x":5057,"y":-1086,"length":5172.295911875112},{"x":5110,"y":-1070,"length":5220.823689802213},{"x":5280,"y":-1010,"length":5375.732508226204},{"x":5309,"y":-998,"length":5401.988985549674},{"x":5337,"y":-982,"length":5426.591287355258},{"x":5366,"y":-964,"length":5451.9035207897805},{"x":5376,"y":-949,"length":5459.118701768629},{"x":5380,"y":-928,"length":5459.449056452491},{"x":5373,"y":-902,"length":5448.186211942466},{"x":5360,"y":-872,"length":5430.468119784887},{"x":5347,"y":-835,"length":5411.805059312465},{"x":5342,"y":-812,"length":5403.360806016936},{"x":5341,"y":-793,"length":5399.549055245262},{"x":5347,"y":-772,"length":5402.443243570449},{"x":5356,"y":-758,"length":5409.371497688063},{"x":5384,"y":-750,"length":5435.987122869222},{"x":5408,"y":-748,"length":5459.4842247230645},{"x":5434,"y":-750,"length":5485.513285008067},{"x":5455,"y":-737,"length":5504.56119958712},{"x":5468,"y":-718,"length":5514.938621598612},{"x":5474,"y":-693,"length":5517.691999378001},{"x":5473,"y":-666,"length":5513.37328683629},{"x":5462,"y":-640,"length":5499.367600006386},{"x":5440,"y":-604,"length":5473.428176198167},{"x":5413,"y":-573,"length":5443.243334630558},{"x":5371,"y":-536,"length":5397.67885298857},{"x":5314,"y":-499,"length":5337.377352220845},{"x":5253,"y":-472,"length":5274.162777161888},{"x":5203,"y":-455,"length":5222.856881056574},{"x":5110,"y":-433,"length":5128.312490478715},{"x":5044,"y":-421,"length":5061.538995206893},{"x":4987,"y":-414,"length":5004.154773785479},{"x":4929,"y":-415,"length":4946.439729745021},{"x":4869,"y":-427,"length":4887.687592307839},{"x":4819,"y":-441,"length":4839.136493218599},{"x":4766,"y":-466,"length":4788.727597180696},{"x":4727,"y":-493,"length":4752.639056355953},{"x":4695,"y":-522,"length":4723.929402520745},{"x":4661,"y":-566,"length":4695.239823480799},{"x":4625,"y":-615,"length":4665.71002099359},{"x":4583,"y":-655,"length":4629.569526424676},{"x":4540,"y":-685,"length":4591.385956331705},{"x":4480,"y":-714,"length":4536.540091303063},{"x":4425,"y":-733,"length":4485.299767016693},{"x":4370,"y":-745,"length":4433.049176357059},{"x":4313,"y":-753,"length":4378.239143765448},{"x":4251,"y":-756,"length":4317.700429626863},{"x":4199,"y":-752,"length":4265.806488813106},{"x":4137,"y":-739,"length":4202.486168924295},{"x":4062,"y":-720,"length":4125.317442330954},{"x":3978,"y":-704,"length":4039.8143521701586},{"x":3902,"y":-697,"length":3963.762480270482},{"x":3841,"y":-697,"length":3903.727705668007},{"x":3788,"y":-701,"length":3852.3168353602487},{"x":3741,"y":-711,"length":3807.965598584105},{"x":3697,"y":-733,"length":3768.9651099472917},{"x":3667,"y":-767,"length":3746.355295483865},{"x":3636,"y":-813,"length":3725.7838101532407},{"x":3602,"y":-871,"length":3705.8123266026305},{"x":3554,"y":-930,"length":3673.6651997698427},{"x":3497,"y":-985,"length":3633.0750061070858},{"x":3415,"y":-1034,"length":3568.106080261628},{"x":3340,"y":-1074,"length":3508.4292781813347},{"x":3275,"y":-1098,"length":3454.1611137872537},{"x":3214,"y":-1115,"length":3401.914314029676},{"x":3151,"y":-1122,"length":3344.7996950490174},{"x":3065,"y":-1122,"length":3263.910078418215},{"x":2994,"y":-1114,"length":3194.53157755562},{"x":2910,"y":-1094,"length":3108.848018157208},{"x":2841,"y":-1064,"length":3033.7068085100113},{"x":2784,"y":-1032,"length":2969.121082071258},{"x":2727,"y":-981,"length":2898.083849718638},{"x":2690,"y":-930,"length":2846.225570821821},{"x":2661,"y":-873,"length":2800.5445898967578},{"x":2637,"y":-818,"length":2760.9587103033614},{"x":2616,"y":-737,"length":2717.83461601327},{"x":2602,"y":-676,"length":2688.3786935623484},{"x":2596,"y":-612,"length":2667.1632870898625},{"x":2602,"y":-574,"length":2664.5600012009486},{"x":2613,"y":-537,"length":2667.6090418200342},{"x":2638,"y":-493,"length":2683.6715521836873},{"x":2672,"y":-460,"length":2711.3066960415968},{"x":2702,"y":-431,"length":2736.1588038708574},{"x":2742,"y":-406,"length":2771.894658893083},{"x":2800,"y":-386,"length":2826.481204607595},{"x":2892,"y":-368,"length":2915.319536517395},{"x":2980,"y":-356,"length":3001.1890976744535},{"x":3134,"y":-344,"length":3152.8228621348203},{"x":3195,"y":-328,"length":3211.7921788310027},{"x":3210,"y":-309,"length":3224.838135472849},{"x":3217,"y":-286,"length":3229.688065432945},{"x":3213,"y":-254,"length":3223.0242009640574},{"x":3200,"y":-234,"length":3208.544218177459},{"x":3182,"y":-215,"length":3189.255242215649},{"x":3153,"y":-204,"length":3159.59253702119},{"x":3117,"y":-206,"length":3123.799769511484},{"x":3086,"y":-215,"length":3093.480402394688},{"x":3053,"y":-224,"length":3061.2064615115396},{"x":3024,"y":-227,"length":3032.5080379118535},{"x":2985,"y":-224,"length":2993.3928910184845},{"x":2953,"y":-220,"length":2961.1837160162827},{"x":2908,"y":-211,"length":2915.6448686354106},{"x":2846,"y":-211,"length":2853.8109608031154},{"x":2788,"y":-216,"length":2796.3547700533277},{"x":2740,"y":-231,"length":2749.720167580694},{"x":2577,"y":-302,"length":2594.635427184328},{"x":2424,"y":-355,"length":2449.8573427854935},{"x":2360,"y":-371,"length":2388.983256534043},{"x":2300,"y":-378,"length":2330.854778831148},{"x":2242,"y":-381,"length":2274.14269561081},{"x":2185,"y":-382,"length":2218.1408882214855},{"x":2127,"y":-377,"length":2160.152309444869},{"x":2061,"y":-365,"length":2093.0709495857996},{"x":1998,"y":-349,"length":2028.2517102174475},{"x":1946,"y":-329,"length":1973.6152107237115},{"x":1886,"y":-308,"length":1910.9840397031055},{"x":1825,"y":-295,"length":1848.6887244747288},{"x":1764,"y":-285,"length":1786.874645855159},{"x":1710,"y":-278,"length":1732.4502878870724},{"x":1658,"y":-273,"length":1680.325266131531},{"x":1613,"y":-271,"length":1635.6069209929383},{"x":1554,"y":-271,"length":1577.4526934269693},{"x":1497,"y":-276,"length":1522.2302716737702},{"x":1444,"y":-280,"length":1470.8963253744296},{"x":1377,"y":-276,"length":1404.3877669646656},{"x":1331,"y":-264,"length":1356.9292538669804},{"x":1288,"y":-250,"length":1312.0381092026253},{"x":1235,"y":-230,"length":1256.2344526401114},{"x":1180,"y":-222,"length":1200.7014616464828},{"x":1122,"y":-221,"length":1143.5580440012654},{"x":1078,"y":-223,"length":1100.823782446582},{"x":1032,"y":-234,"length":1058.1965790910497},{"x":684,"y":-374,"length":779.5716772689988},{"x":584,"y":-412,"length":714.7027354082255},{"x":523,"y":-429,"length":676.4392064332168},{"x":470,"y":-432,"length":638.3760647142091},{"x":408,"y":-431,"length":593.4854673873658},{"x":355,"y":-422,"length":551.4607873638886},{"x":310,"y":-410,"length":514.0038910358559},{"x":267,"y":-388,"length":470.99150735443203},{"x":224,"y":-346,"length":412.1795725166399},{"x":195,"y":-303,"length":360.3248534309006},{"x":168,"y":-249,"length":300.3747659175118},{"x":148,"y":-204,"length":252.03174403237384},{"x":138,"y":-149,"length":203.08865059377396},{"x":136,"y":-94,"length":165.32392446346051},{"x":140,"y":-10,"length":140.356688476182},{"x":1215,"y":-10,"length":1215.041151566481},{"x":1235,"y":25,"length":1235.253010520517},{"x":1255,"y":385,"length":1312.7261709892127},{"x":2915,"y":400,"length":2942.3162644420127},{"x":2980,"y":45,"length":2980.3397457336973},{"x":2990,"y":25,"length":2990.1045132235763},{"x":3020,"y":15,"length":3020.0372514258825},{"x":3092,"y":76,"length":3092.9338822548407},{"x":3130,"y":100,"length":3131.597036657175},{"x":3175,"y":121,"length":3177.3048327159295},{"x":3218,"y":135,"length":3220.830482965535},{"x":3265,"y":142,"length":3268.0864431651744},{"x":3310,"y":144,"length":3313.130845590014},{"x":3354,"y":141,"length":3356.9624662781084},{"x":3395,"y":132,"length":3397.565157579763},{"x":3437,"y":120,"length":3439.094212143657},{"x":3487,"y":95,"length":3488.293852300864},{"x":3528,"y":70,"length":3528.6943761113685},{"x":3562,"y":40,"length":3562.2245858451993},{"x":3596,"y":5,"length":3596.0034760828585},{"x":3623,"y":-31,"length":3623.132622469125},{"x":3643,"y":-72,"length":3643.711432042883},{"x":3658,"y":-118,"length":3659.9027309479143},{"x":3667,"y":-161,"length":3670.5326588929843},{"x":3673,"y":-200,"length":3678.4411100356087},{"x":3672,"y":-244,"length":3680.097824786727},{"x":3667,"y":-290,"length":3678.449265655298},{"x":3655,"y":-336,"length":3670.411557305257},{"x":3640,"y":-377,"length":3659.471136653492},{"x":3610,"y":-430,"length":3635.5192201389887},{"x":3614,"y":-455,"length":3642.5294782609517},{"x":3643,"y":-478,"length":3674.225496618301},{"x":3682,"y":-493,"length":3714.85840914563},{"x":3723,"y":-498,"length":3756.159341668029},{"x":3779,"y":-497,"length":3811.541682836487},{"x":3823,"y":-490,"length":3854.2741210246063},{"x":3950,"y":-466,"length":3977.393116100042},{"x":4116,"y":-423,"length":4137.678697047416},{"x":4323,"y":-343,"length":4336.585984389102},{"x":4910,"y":-46,"length":4910.215473887068},{"x":5041,"y":13,"length":5041.016762519244},{"x":5082,"y":28,"length":5082.077134400854},{"x":5140,"y":40,"length":5140.155639666955},{"x":5186,"y":46,"length":5186.204006785695},{"x":5242,"y":47,"length":5242.210697787718},{"x":5288,"y":45,"length":5288.191467789343},{"x":5348,"y":40,"length":5348.149586539254},{"x":5395,"y":30,"length":5395.083409920555},{"x":5448,"y":14,"length":5448.017988222873},{"x":5492,"y":-2,"length":5492.000364166048},{"x":5546,"y":-27,"length":5546.0657226542135},{"x":5599,"y":-59,"length":5599.310850452937},{"x":5640,"y":-89,"length":5640.702172602273},{"x":5680,"y":-124,"length":5681.353359895862},{"x":5724,"y":-169,"length":5726.494302799925},{"x":5767,"y":-222,"length":5771.271350404519},{"x":5798,"y":-267,"length":5804.144467533522},{"x":5823,"y":-309,"length":5831.192845379065},{"x":5846,"y":-357,"length":5856.890386544724},{"x":5861,"y":-402,"length":5874.77020827198},{"x":5871,"y":-448,"length":5888.068019308201},{"x":5877,"y":-488,"length":5897.225873239044},{"x":5882,"y":-530,"length":5905.829662291319},{"x":5888,"y":-598,"length":5918.289279851062},{"x":6244,"y":-600,"length":6272.761433372068},{"x":6286,"y":-609,"length":6315.43165587278},{"x":6326,"y":-626,"length":6356.897985653065},{"x":6362,"y":-645,"length":6394.612498033012},{"x":6406,"y":-686,"length":6442.626172610048},{"x":6457,"y":-737,"length":6498.9243725404285},{"x":6587,"y":-857,"length":6642.515939009857},{"x":6680,"y":-932,"length":6744.703403412192},{"x":6800,"y":-1022,"length":6876.371426850065},{"x":6861,"y":-1062,"length":6942.705884595717},{"x":6945,"y":-1115,"length":7033.9355982266425},{"x":7009,"y":-1144,"length":7101.7474610126765},{"x":7077,"y":-1167,"length":7172.5740149544645},{"x":7180,"y":-1183,"length":7276.80486202564},{"x":7249,"y":-1186,"length":7345.379295856682},{"x":7311,"y":-1183,"length":7406.092762043964},{"x":7373,"y":-1176,"length":7466.197492700016},{"x":7443,"y":-1160,"length":7532.851319387632},{"x":7526,"y":-1123,"length":7609.3235573209795},{"x":7582,"y":-1089,"length":7659.807112453942},{"x":7638,"y":-1048,"length":7709.562114672921},{"x":7695,"y":-995,"length":7759.0624433626},{"x":7724,"y":-961,"length":7783.5529804839125},{"x":7762,"y":-912,"length":7815.394295875289},{"x":7790,"y":-857,"length":7836.998724001427},{"x":7821,"y":-805,"length":7862.319377893524},{"x":7837,"y":-760,"length":7873.764601510513},{"x":7856,"y":-693,"length":7886.506514293892},{"x":7863,"y":-616,"length":7887.092303250926},{"x":7865,"y":-535,"length":7883.175121738702},{"x":7857,"y":-448,"length":7869.761940490957},{"x":7850,"y":-398,"length":7860.082951216227},{"x":7837,"y":-337,"length":7844.242347097647},{"x":7812,"y":-274,"length":7816.803694605615},{"x":7777,"y":-205,"length":7779.701408151858},{"x":7720,"y":-128,"length":7721.061066977776},{"x":7660,"y":-69,"length":7660.310763931187},{"x":7584,"y":-9,"length":7584.005340187993},{"x":7518,"y":26,"length":7518.0449586312},{"x":7444,"y":58,"length":7444.22595035911},{"x":7320,"y":100,"length":7320.683028242652},{"x":6884,"y":264,"length":6889.0603132793085},{"x":6813,"y":312,"length":6820.14024782482},{"x":6768,"y":356,"length":6777.356416774906},{"x":6731,"y":402,"length":6742.993771315528},{"x":6700,"y":455,"length":6715.431855063381},{"x":6679,"y":508,"length":6698.291200000191},{"x":6662,"y":577,"length":6686.940481266452},{"x":6661,"y":630,"length":6690.7264926912085},{"x":6667,"y":692,"length":6702.816795944821},{"x":6681,"y":748,"length":6722.742371978864},{"x":6707,"y":805,"length":6755.136860197578},{"x":6731,"y":843,"length":6783.5838610575165},{"x":6760,"y":882,"length":6817.295944874331},{"x":6796,"y":917,"length":6857.5874037448475},{"x":6840,"y":950,"length":6905.657101246774},{"x":6882,"y":972,"length":6950.302727219872},{"x":6930,"y":992,"length":7000.640256433693},{"x":6979,"y":1008,"length":7051.418651590615},{"x":7040,"y":1020,"length":7113.508276511668},{"x":7092,"y":1017,"length":7164.548345848467},{"x":7160,"y":1007,"length":7230.4667207587645},{"x":7208,"y":992,"length":7275.941725989839},{"x":7262,"y":967,"length":7326.099439674566},{"x":7300,"y":944,"length":7360.783653932508},{"x":7344,"y":912,"length":7400.410799408368},{"x":7378,"y":883,"length":7430.6509136145},{"x":7412,"y":852,"length":7460.807463002915},{"x":7443,"y":821,"length":7488.1432945690885},{"x":7471,"y":792,"length":7512.862636838237},{"x":7491,"y":784,"length":7531.914564040142},{"x":7512,"y":782,"length":7552.593461851366},{"x":7529,"y":794,"length":7570.751415810719},{"x":7554,"y":798,"length":7596.033175283004},{"x":7588,"y":796,"length":7629.636950733632},{"x":7630,"y":785,"length":7670.2754187838655},{"x":7668,"y":777,"length":7707.266246860815},{"x":7712,"y":775,"length":7750.843115429443},{"x":7753,"y":778,"length":7791.937692256016},{"x":7790,"y":790,"length":7829.955300000122},{"x":7824,"y":806,"length":7865.4060289345525},{"x":7857,"y":832,"length":7900.928616308339},{"x":7880,"y":858,"length":7926.573282320677},{"x":7901,"y":890,"length":7950.968557351991},{"x":7911,"y":923,"length":7964.662579168059},{"x":7915,"y":962,"length":7973.247080079734},{"x":7912,"y":990,"length":7973.697009543314},{"x":7910,"y":1025,"length":7976.13471551227},{"x":7897,"y":1054,"length":7967.027362824857},{"x":7882,"y":1087,"length":7956.600593218187},{"x":7865,"y":1112,"length":7943.221575658078},{"x":7842,"y":1140,"length":7924.428307455371},{"x":7810,"y":1166,"length":7896.559757261386},{"x":7768,"y":1187,"length":7858.167279970566},{"x":7705,"y":1212,"length":7799.741598283882},{"x":7642,"y":1235,"length":7741.149074911295},{"x":7585,"y":1256,"length":7688.287260502172},{"x":7536,"y":1280,"length":7643.931972486412},{"x":7500,"y":1307,"length":7613.031524957715},{"x":7472,"y":1345,"length":7592.088579567549},{"x":7447,"y":1390,"length":7575.612780495054},{"x":7433,"y":1436,"length":7570.441532698076},{"x":7433,"y":1476,"length":7578.130706183419},{"x":7442,"y":1512,"length":7594.044245328045},{"x":7462,"y":1562,"length":7623.731894551382},{"x":7532,"y":1632,"length":7706.779353270729},{"x":7630,"y":1675,"length":7811.691558170995},{"x":7690,"y":1673,"length":7869.8811299790295},{"x":7792,"y":1620,"length":7958.62199127462},{"x":7845,"y":1542,"length":7995.110318188236},{"x":7895,"y":1437,"length":8024.711458987171},{"x":7942,"y":1377,"length":8060.48962532674},{"x":8017,"y":1337,"length":8127.721574955677},{"x":8082,"y":1330,"length":8190.7035106881995},{"x":8135,"y":1340,"length":8244.62400598111},{"x":8200,"y":1372,"length":8313.9872504112},{"x":8242,"y":1417,"length":8362.921319730325},{"x":8272,"y":1492,"length":8405.477261881088},{"x":8270,"y":1567,"length":8417.148507659824},{"x":8340,"y":1573,"length":8487.04477424268},{"x":9415,"y":1670,"length":9561.962403189002},{"x":9510,"y":2940,"length":9954.079565685619},{"x":5880,"y":2960,"length":6583.008430801225},{"x":70,"y":2940,"length":2940.8332152640005}],"y":403},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"scaleX":1,"rotation":138,"scaleY":0.851967276977016,"x":7482,"y":956,"width":9.3,"height":109.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":-177,"scaleY":0.851967276977016,"x":7782,"y":836,"width":9.3,"height":109.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":-132,"scaleY":0.851967276977016,"x":8082,"y":966,"width":9.3,"height":109.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":-48,"scaleY":0.6026490066225165,"x":8070,"y":1510,"width":9.3,"height":77.35},"className":"SignPillar"},{"params":{"x":7520,"rotation":135,"y":1000,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"x":7780,"rotation":-177.00000000000006,"y":900,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"x":8040,"rotation":-138.00000000000006,"y":1000,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":-87,"scaleY":0.851967276977016,"x":8182,"y":1246,"width":9.3,"height":109.35},"className":"SignPillar"},{"params":{"x":8100,"rotation":-87.00000000000011,"y":1240,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"x":8030,"rotation":-51.000000000000114,"y":1470,"width":68.8,"height":69.8},"className":"Sign1"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":3280,"y":480,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":5220,"y":380,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":0.8126217374366965,"x":6980,"y":1372,"width":9.3,"height":104.25},"className":"SignPillar"}],[{"params":{"speed":1300,"x":3100,"rotation":-84,"y":-99,"safeId":-1,"id":-1,"rate":1,"width":332,"height":128},"className":"GeyserE"},{"params":{"x":5820,"stones":true,"physic":false,"impulse":15000,"id":2,"radius":64,"y":-750,"height":53.2,"width":53.2,"safeId":2,"rotation":0,"count":12},"className":"Tnt1"},{"params":{"speed":1000,"x":7430,"rotation":105.00000000000006,"y":-890,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7219,"rotation":90.00000000000006,"y":-907,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7624,"rotation":123.00000000000006,"y":-800,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7794,"rotation":138.00000000000006,"y":-658,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7900,"rotation":156.00000000000006,"y":-488,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7965,"rotation":171.00000000000006,"y":-276,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7916,"rotation":-158.99999999999994,"y":160,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7965,"rotation":-173.99999999999994,"y":-46,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7448,"rotation":-108,"y":595,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7647,"rotation":-126,"y":497,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7807,"rotation":-140.99999999999994,"y":343,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"},{"params":{"speed":1000,"x":7208,"rotation":-108,"y":675,"safeId":-1,"id":22,"rate":1,"width":274,"height":128},"className":"GeyserE"}],null,[{"params":{"x":480,"rotation":0,"y":310,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":3280,"rotation":0,"y":410,"id":1,"width":128,"height":616},"className":"SafePointE"},{"params":{"x":5220,"rotation":0,"y":320,"id":2,"width":128,"height":815},"className":"SafePointE"},{"params":{"x":6980,"rotation":0,"y":1320,"id":3,"width":128,"height":606},"className":"SafePointE"}],[{"params":{"x":5860,"rotation":0,"graphic":0,"safeId":2,"id":-1,"y":-210,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5040,"sndId":-1,"rotation":0,"y":-860,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":3,"width":64,"height":571},"className":"ToggleE"},{"params":{"x":5640,"rotation":0,"graphic":0,"safeId":2,"id":3,"y":-700,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5030,"sndId":-1,"rotation":0,"y":-860,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":2,"width":64,"height":571},"className":"ToggleE"},{"params":{"x":7220,"rotation":0,"graphic":0,"id":5,"y":-160,"height":17,"width":17,"time":0,"safeId":2,"snd":false,"rate":60,"useWeld":false},"className":"MotorJointE"},{"params":{"x":6890,"sndId":-1,"rotation":0,"y":-840,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":5,"width":64,"height":1044},"className":"ToggleE"},{"params":{"x":7670,"rotation":0,"graphic":0,"id":7,"y":1390,"height":17,"width":17,"time":0,"safeId":3,"snd":false,"rate":180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":8040,"rotation":0,"graphic":0,"id":7,"y":1930,"height":17,"width":17,"time":0,"safeId":3,"snd":false,"rate":-180,"useWeld":false},"className":"MotorJointE"},{"params":{"x":7030,"sndId":-1,"rotation":0,"y":1550,"fnl":false,"safeId":3,"id_off":-1,"off":false,"id":7,"width":64,"height":1017},"className":"ToggleE"},{"params":{"x":7920,"rotation":0,"graphic":0,"safeId":2,"id":5,"y":-240,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2237,"sndId":0,"rotation":0,"y":260,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":154,"height":669},"className":"ToggleE"},{"params":{"x":5197,"sndId":0,"rotation":0,"y":-1250,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":154,"height":669},"className":"ToggleE"},{"params":{"x":7447,"sndId":0,"rotation":0,"y":290,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":0,"width":154,"height":669},"className":"ToggleE"},{"params":{"x":6220,"sndId":-1,"rotation":0,"y":-1030,"fnl":false,"safeId":2,"id_off":-1,"off":false,"id":22,"width":64,"height":2779},"className":"ToggleE"},{"params":{"x":2232,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1382,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2402,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2062,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1891,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1722,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":1552,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2742,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":2572,"rotation":0,"graphic":0,"safeId":-10,"id":-1,"y":439,"width":17,"height":17},"className":"PivotJointE"}]],"settings":{"prizes":"28,34,41","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/map9.json b/motox3mspooky/assets/levels/map9.json deleted file mode 100644 index 2b3b9dc5..00000000 --- a/motox3mspooky/assets/levels/map9.json +++ /dev/null @@ -1 +0,0 @@ -{"layers":[[{"params":{"x":-259,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":365,"y":0,"length":365},{"x":365,"y":780,"length":861.1765208132418},{"x":0,"y":780,"length":780}],"y":-340},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11625,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":520,"y":0,"length":520},{"x":520,"y":100,"length":529.5280917949491},{"x":330,"y":100,"length":344.81879299133334},{"x":325,"y":515,"length":608.9745479082028},{"x":195,"y":515,"length":550.6813960903346},{"x":195,"y":100,"length":219.14607000811125},{"x":0,"y":100,"length":100}],"y":-107},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11260,"bg":true,"rotation":0,"y":20,"vertices":[{"x":0,"y":0,"length":0},{"x":2535,"y":0,"length":2535},{"x":2535,"y":505,"length":2584.8114051125663},{"x":0,"y":505,"length":505}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":8630,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":-165,"y":0,"length":165},{"x":-95,"y":0,"length":95},{"x":-35,"y":25,"length":43.01162633521314},{"x":40,"y":25,"length":47.16990566028302},{"x":125,"y":25,"length":127.47548783981962},{"x":185,"y":0,"length":185},{"x":250,"y":0,"length":250},{"x":203,"y":26,"length":204.65825172711703},{"x":153,"y":53,"length":161.91973320136123},{"x":100,"y":80,"length":128.06248474865697},{"x":50,"y":80,"length":94.33981132056604},{"x":0,"y":80,"length":80},{"x":-53,"y":54,"length":75.66372975210778},{"x":-105,"y":29,"length":108.93117092916977}],"y":150},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":7650,"bg":true,"rotation":0,"y":180,"vertices":[{"x":0,"y":0,"length":0},{"x":3435,"y":0,"length":3435},{"x":3435,"y":375,"length":3455.4088036005232},{"x":0,"y":375,"length":375}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":5040,"bg":true,"rotation":0,"y":180,"vertices":[{"x":0,"y":0,"length":0},{"x":2515,"y":0,"length":2515},{"x":2515,"y":350,"length":2539.237090151292},{"x":0,"y":350,"length":350}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":2203,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":3,"rem":true,"safeId":-1,"vertices":[{"x":-707,"y":-707,"length":999.8489885977782},{"x":-642,"y":-766,"length":999.4598541212148},{"x":-573,"y":-819,"length":999.544896440375},{"x":-500,"y":-866,"length":999.9779997579947},{"x":-422,"y":-906,"length":999.4598541212148},{"x":-342,"y":-939,"length":999.3422837046375},{"x":-258,"y":-965,"length":998.8938882584075},{"x":-173,"y":-984,"length":999.092087847762},{"x":-87,"y":-996,"length":999.7924784674068},{"x":0,"y":-1000,"length":1000},{"x":87,"y":-996,"length":999.7924784674068},{"x":173,"y":-984,"length":999.092087847762},{"x":258,"y":-965,"length":998.8938882584075},{"x":342,"y":-939,"length":999.3422837046375},{"x":422,"y":-906,"length":999.4598541212148},{"x":500,"y":-866,"length":999.9779997579947},{"x":573,"y":-819,"length":999.544896440375},{"x":642,"y":-766,"length":999.4598541212148},{"x":707,"y":-707,"length":999.8489885977782}],"y":1166},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":1284,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":225,"y":0,"length":225},{"x":225,"y":45,"length":229.4558781116753},{"x":0,"y":45,"length":45}],"y":409},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":3248,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":500,"y":0,"length":500},{"x":498,"y":43,"length":499.85297838464464},{"x":492,"y":86,"length":499.4597080846462},{"x":482,"y":129,"length":498.96392655180995},{"x":469,"y":171,"length":499.20136217762865},{"x":453,"y":211,"length":499.7299270606074},{"x":433,"y":249,"length":499.48973963435924},{"x":409,"y":286,"length":499.07614649470077},{"x":383,"y":321,"length":499.7299270606074},{"x":353,"y":353,"length":499.21738751770255},{"x":321,"y":383,"length":499.7299270606074},{"x":286,"y":409,"length":499.07614649470077},{"x":250,"y":433,"length":499.98899987899733},{"x":211,"y":453,"length":499.7299270606074},{"x":171,"y":469,"length":499.20136217762865},{"x":129,"y":482,"length":498.96392655180995},{"x":86,"y":492,"length":499.4597080846462},{"x":43,"y":498,"length":499.85297838464464},{"x":0,"y":500,"length":500},{"x":-43,"y":498,"length":499.85297838464464},{"x":-86,"y":492,"length":499.4597080846462},{"x":-129,"y":482,"length":498.96392655180995},{"x":-171,"y":469,"length":499.20136217762865},{"x":-211,"y":453,"length":499.7299270606074},{"x":-249,"y":433,"length":499.48973963435924},{"x":-286,"y":409,"length":499.07614649470077},{"x":-321,"y":383,"length":499.7299270606074},{"x":-353,"y":353,"length":499.21738751770255},{"x":-383,"y":321,"length":499.7299270606074},{"x":-409,"y":286,"length":499.07614649470077},{"x":-433,"y":249,"length":499.48973963435924},{"x":-453,"y":211,"length":499.7299270606074},{"x":-469,"y":171,"length":499.20136217762865},{"x":-482,"y":129,"length":498.96392655180995},{"x":-492,"y":86,"length":499.4597080846462},{"x":-498,"y":43,"length":499.85297838464464},{"x":-500,"y":0,"length":500},{"x":-498,"y":-43,"length":499.85297838464464},{"x":-492,"y":-86,"length":499.4597080846462},{"x":-482,"y":-129,"length":498.96392655180995},{"x":-469,"y":-171,"length":499.20136217762865},{"x":-453,"y":-211,"length":499.7299270606074},{"x":-433,"y":-250,"length":499.98899987899733},{"x":-409,"y":-286,"length":499.07614649470077},{"x":-383,"y":-321,"length":499.7299270606074},{"x":-353,"y":-353,"length":499.21738751770255},{"x":-321,"y":-383,"length":499.7299270606074},{"x":-286,"y":-409,"length":499.07614649470077},{"x":-250,"y":-433,"length":499.98899987899733},{"x":-211,"y":-453,"length":499.7299270606074},{"x":-171,"y":-469,"length":499.20136217762865},{"x":-129,"y":-482,"length":498.96392655180995},{"x":-86,"y":-492,"length":499.4597080846462},{"x":-43,"y":-498,"length":499.85297838464464},{"x":0,"y":-500,"length":500},{"x":43,"y":-498,"length":499.85297838464464},{"x":86,"y":-492,"length":499.4597080846462},{"x":129,"y":-482,"length":498.96392655180995},{"x":171,"y":-469,"length":499.20136217762865},{"x":211,"y":-453,"length":499.7299270606074},{"x":250,"y":-433,"length":499.98899987899733},{"x":286,"y":-409,"length":499.07614649470077},{"x":321,"y":-383,"length":499.7299270606074},{"x":353,"y":-353,"length":499.21738751770255},{"x":383,"y":-321,"length":499.7299270606074},{"x":409,"y":-286,"length":499.07614649470077},{"x":433,"y":-250,"length":499.98899987899733},{"x":453,"y":-211,"length":499.7299270606074},{"x":469,"y":-171,"length":499.20136217762865},{"x":482,"y":-129,"length":498.96392655180995},{"x":492,"y":-86,"length":499.4597080846462},{"x":498,"y":-43,"length":499.85297838464464}],"y":-244},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":4548,"rotation":0,"physic":true,"line":true,"plr":true,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":500,"y":0,"length":500},{"x":498,"y":43,"length":499.85297838464464},{"x":492,"y":86,"length":499.4597080846462},{"x":482,"y":129,"length":498.96392655180995},{"x":469,"y":171,"length":499.20136217762865},{"x":453,"y":211,"length":499.7299270606074},{"x":433,"y":249,"length":499.48973963435924},{"x":409,"y":286,"length":499.07614649470077},{"x":383,"y":321,"length":499.7299270606074},{"x":353,"y":353,"length":499.21738751770255},{"x":321,"y":383,"length":499.7299270606074},{"x":286,"y":409,"length":499.07614649470077},{"x":250,"y":433,"length":499.98899987899733},{"x":211,"y":453,"length":499.7299270606074},{"x":171,"y":469,"length":499.20136217762865},{"x":129,"y":482,"length":498.96392655180995},{"x":86,"y":492,"length":499.4597080846462},{"x":43,"y":498,"length":499.85297838464464},{"x":0,"y":500,"length":500},{"x":-43,"y":498,"length":499.85297838464464},{"x":-86,"y":492,"length":499.4597080846462},{"x":-129,"y":482,"length":498.96392655180995},{"x":-171,"y":469,"length":499.20136217762865},{"x":-211,"y":453,"length":499.7299270606074},{"x":-249,"y":433,"length":499.48973963435924},{"x":-286,"y":409,"length":499.07614649470077},{"x":-321,"y":383,"length":499.7299270606074},{"x":-353,"y":353,"length":499.21738751770255},{"x":-383,"y":321,"length":499.7299270606074},{"x":-409,"y":286,"length":499.07614649470077},{"x":-433,"y":249,"length":499.48973963435924},{"x":-453,"y":211,"length":499.7299270606074},{"x":-469,"y":171,"length":499.20136217762865},{"x":-482,"y":129,"length":498.96392655180995},{"x":-492,"y":86,"length":499.4597080846462},{"x":-498,"y":43,"length":499.85297838464464},{"x":-500,"y":0,"length":500},{"x":-498,"y":-43,"length":499.85297838464464},{"x":-492,"y":-86,"length":499.4597080846462},{"x":-482,"y":-129,"length":498.96392655180995},{"x":-469,"y":-171,"length":499.20136217762865},{"x":-453,"y":-211,"length":499.7299270606074},{"x":-433,"y":-250,"length":499.98899987899733},{"x":-409,"y":-286,"length":499.07614649470077},{"x":-383,"y":-321,"length":499.7299270606074},{"x":-353,"y":-353,"length":499.21738751770255},{"x":-321,"y":-383,"length":499.7299270606074},{"x":-286,"y":-409,"length":499.07614649470077},{"x":-250,"y":-433,"length":499.98899987899733},{"x":-211,"y":-453,"length":499.7299270606074},{"x":-171,"y":-469,"length":499.20136217762865},{"x":-129,"y":-482,"length":498.96392655180995},{"x":-86,"y":-492,"length":499.4597080846462},{"x":-43,"y":-498,"length":499.85297838464464},{"x":0,"y":-500,"length":500},{"x":43,"y":-498,"length":499.85297838464464},{"x":86,"y":-492,"length":499.4597080846462},{"x":129,"y":-482,"length":498.96392655180995},{"x":171,"y":-469,"length":499.20136217762865},{"x":211,"y":-453,"length":499.7299270606074},{"x":250,"y":-433,"length":499.98899987899733},{"x":286,"y":-409,"length":499.07614649470077},{"x":321,"y":-383,"length":499.7299270606074},{"x":353,"y":-353,"length":499.21738751770255},{"x":383,"y":-321,"length":499.7299270606074},{"x":409,"y":-286,"length":499.07614649470077},{"x":433,"y":-250,"length":499.98899987899733},{"x":453,"y":-211,"length":499.7299270606074},{"x":469,"y":-171,"length":499.20136217762865},{"x":482,"y":-129,"length":498.96392655180995},{"x":492,"y":-86,"length":499.4597080846462},{"x":498,"y":-43,"length":499.85297838464464}],"y":-244},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2820,"bg":true,"rotation":0,"y":-142,"vertices":[{"x":0,"y":0,"length":0},{"x":2155,"y":0,"length":2155},{"x":2155,"y":640,"length":2248.0269126502913},{"x":0,"y":640,"length":640}],"viscosity":1.5,"id":-1,"sf":true,"density":1.5},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":10320,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-305,"length":305},{"x":175,"y":-305,"length":351.63901945034485},{"x":905,"y":-1195,"length":1499.0163441403834},{"x":955,"y":-1195,"length":1529.7221970017954},{"x":955,"y":100,"length":960.2213286529309},{"x":0,"y":100,"length":100}],"y":320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":2747,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-425,"length":425},{"x":410,"y":-425,"length":590.5294234837075},{"x":421,"y":-447,"length":614.0439723668004},{"x":440,"y":-467,"length":641.6299556598024},{"x":465,"y":-481,"length":669.0186843429711},{"x":493,"y":-487,"length":692.9776331166829},{"x":521,"y":-486,"length":712.4864911000068},{"x":550,"y":-474,"length":726.0688672570943},{"x":573,"y":-457,"length":732.924279854338},{"x":590,"y":-434,"length":732.4315667692102},{"x":597,"y":-411,"length":724.7965231704688},{"x":600,"y":-385,"length":712.8990110808122},{"x":595,"y":-355,"length":692.8564064797265},{"x":582,"y":-328,"length":668.0628712928147},{"x":562,"y":-307,"length":640.3850404248993},{"x":538,"y":-295,"length":613.5706968231126},{"x":513,"y":-287,"length":587.82480383189},{"x":488,"y":-286,"length":565.6323894544937},{"x":464,"y":-292,"length":548.2335268843013},{"x":443,"y":-304,"length":537.2755345258148},{"x":424,"y":-323,"length":533.0150091695355},{"x":410,"y":-345,"length":535.8404613315422},{"x":95,"y":-345,"length":357.8407467016578},{"x":95,"y":265,"length":281.51376520518494},{"x":0,"y":265,"length":265}],"y":143},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-183,"physic":true,"lineId":0,"y":403,"height":64,"isRoad":true,"direction":90,"width":14378,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":true,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":false,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":true,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":12905,"y":0,"length":12905},{"x":14365,"y":0,"length":14365}],"smoothing":true,"shape":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":4548,"rotation":0,"y":-244,"width":200.1,"height":200.1},"className":"OvalTemplate"},{"params":{"x":4947,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":5,"y":-340,"length":340.03676271838606},{"x":-310,"y":-340,"length":460.10868281309365},{"x":-324,"y":-323,"length":457.4986338777418},{"x":-342,"y":-305,"length":458.24556735444804},{"x":-365,"y":-293,"length":468.05341575508237},{"x":-389,"y":-287,"length":483.41493564018066},{"x":-417,"y":-288,"length":506.78693747964735},{"x":-446,"y":-298,"length":536.3953765647127},{"x":-469,"y":-316,"length":565.5236511411349},{"x":-485,"y":-337,"length":590.58784274653},{"x":-496,"y":-362,"length":614.0521150521347},{"x":-499,"y":-392,"length":634.5589019153383},{"x":-494,"y":-417,"length":646.4711903867023},{"x":-481,"y":-444,"length":654.5968224793029},{"x":-463,"y":-464,"length":655.4883675550619},{"x":-437,"y":-480,"length":649.129416988631},{"x":-409,"y":-486,"length":635.1983942045193},{"x":-381,"y":-485,"length":616.7544081723291},{"x":-349,"y":-473,"length":587.8179990439218},{"x":-325,"y":-455,"length":559.1511423577707},{"x":-305,"y":-425,"length":523.1156659860227},{"x":100,"y":-425,"length":436.6062299143245},{"x":100,"y":-190,"length":214.7091055358389},{"x":835,"y":-190,"length":856.3439729454514},{"x":835,"y":-155,"length":849.2643875731515},{"x":630,"y":-155,"length":648.7873303325213},{"x":630,"y":-40,"length":631.2685640834652},{"x":835,"y":-40,"length":835.9575348066431},{"x":835,"y":-5,"length":835.0149699256895},{"x":100,"y":-5,"length":100.12492197250393},{"x":100,"y":265,"length":283.24018076537095},{"x":5,"y":265,"length":265.04716561397146}],"y":143},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11730,"rotation":0,"y":-1450,"vertices":[{"x":0,"y":0,"length":0},{"x":315,"y":0,"length":315},{"x":315,"y":675,"length":744.8825410761082},{"x":0,"y":675,"length":675}]},"className":"frg.game.editor.objects::FinishShaper"},{"params":{"x":5759,"rotation":90,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":55,"y":0,"length":55},{"x":51,"y":18,"length":54.08326913195984},{"x":42,"y":35,"length":54.67174773134658},{"x":27,"y":47,"length":54.20332093147061},{"x":9,"y":54,"length":54.74486277268398},{"x":-9,"y":54,"length":54.74486277268398},{"x":-27,"y":47,"length":54.20332093147061},{"x":-42,"y":35,"length":54.67174773134658},{"x":-51,"y":18,"length":54.08326913195984},{"x":-55,"y":0,"length":55},{"x":-5,"y":-105,"length":105.11898020814318}],"y":43},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":8260,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":75,"y":0,"length":75},{"x":135,"y":0,"length":135},{"x":195,"y":0,"length":195},{"x":260,"y":0,"length":260},{"x":325,"y":0,"length":325},{"x":390,"y":0,"length":390},{"x":470,"y":0,"length":470},{"x":530,"y":0,"length":530},{"x":595,"y":0,"length":595},{"x":596,"y":52,"length":598.2641557038162},{"x":595,"y":95,"length":602.5363059600642},{"x":525,"y":95,"length":533.5260068637704},{"x":460,"y":95,"length":469.7073557013984},{"x":385,"y":95,"length":396.547601177967},{"x":295,"y":95,"length":309.9193443462347},{"x":215,"y":95,"length":235.05318547086316},{"x":145,"y":95,"length":173.34935823359717},{"x":65,"y":95,"length":115.10864433221339},{"x":0,"y":95,"length":95},{"x":0,"y":50,"length":50}],"y":0},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":11227,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":false,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":0,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":45,"y":295,"length":298.41246622753545},{"x":0,"y":295,"length":295}],"y":-480},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-183,"physic":false,"lineId":0,"y":403,"height":578.5,"isRoad":false,"direction":90,"width":14178,"textureMode":true,"cameraOffsetY":100,"straightSides":true,"directed":false,"originOffsetRatio":0,"thick":128,"stretchTexture":false,"camera":true,"rotation":0,"repeatTexture":true,"textureOffset":0,"snapToGrid":true,"line":false,"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2345,"y":5,"length":2345.005330484347},{"x":2970,"y":-90,"length":2971.363323459452},{"x":3315,"y":-350,"length":3333.425415394801},{"x":4835,"y":-375,"length":4849.52059486296},{"x":5950,"y":-185,"length":5952.8753556579695},{"x":9040,"y":-185,"length":9041.892777510691},{"x":10640,"y":-210,"length":10642.072166641232},{"x":11405,"y":-540,"length":11417.776710025468},{"x":14165,"y":-515,"length":14174.358892027532}],"smoothing":true,"shape":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":11600,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":false,"ignore":false,"layer":8,"rem":true,"safeId":-1,"vertices":[{"x":0,"y":-1270,"length":1270},{"x":565,"y":-1270,"length":1390.0089927766655},{"x":565,"y":-755,"length":943.0005302225445},{"x":565,"y":-660,"length":868.80665282904},{"x":565,"y":-555,"length":791.9911615668448},{"x":565,"y":-460,"length":728.5773809280658},{"x":565,"y":-385,"length":683.7031519599716},{"x":565,"y":-295,"length":637.3774391990981},{"x":565,"y":-205,"length":601.0407640085654},{"x":565,"y":-115,"length":576.584772605035},{"x":565,"y":-40,"length":566.4141594275341},{"x":565,"y":70,"length":569.3197695495916},{"x":565,"y":175,"length":591.4811915860047},{"x":565,"y":280,"length":630.5751343020116},{"x":565,"y":380,"length":680.9001395212076},{"x":565,"y":465,"length":731.7444909256236},{"x":565,"y":545,"length":785.0159234053791},{"x":565,"y":625,"length":842.525963991615},{"x":565,"y":695,"length":895.6840960963859},{"x":565,"y":780,"length":963.1329087929661},{"x":565,"y":925,"length":1083.9049773850104},{"x":495,"y":828,"length":964.680776215635},{"x":435,"y":745,"length":862.6992523469578},{"x":435,"y":665,"length":794.638282490845},{"x":435,"y":575,"length":721.0062413044702},{"x":435,"y":495,"length":658.9764790946639},{"x":435,"y":385,"length":580.9044671888829},{"x":435,"y":270,"length":511.9814449762804},{"x":435,"y":175,"length":468.8816481800072},{"x":435,"y":75,"length":441.41816908686485},{"x":435,"y":-20,"length":435.4595273960601},{"x":335,"y":-20,"length":335.5964838909967},{"x":230,"y":-20,"length":230.8679276123039},{"x":140,"y":-20,"length":141.4213562373095},{"x":140,"y":85,"length":163.783393541592},{"x":140,"y":160,"length":212.60291625469299},{"x":140,"y":240,"length":277.8488797889961},{"x":140,"y":315,"length":344.7100230628637},{"x":140,"y":425,"length":447.4650824366076},{"x":140,"y":515,"length":533.689984916337},{"x":140,"y":635,"length":650.2499519415592},{"x":140,"y":730,"length":743.3034373659252},{"x":75,"y":825,"length":828.4020762890445},{"x":0,"y":925,"length":925},{"x":0,"y":805,"length":805},{"x":0,"y":715,"length":715},{"x":0,"y":620,"length":620},{"x":0,"y":515,"length":515},{"x":0,"y":395,"length":395},{"x":0,"y":290,"length":290},{"x":0,"y":180,"length":180},{"x":0,"y":70,"length":70},{"x":0,"y":-25,"length":25},{"x":0,"y":-135,"length":135},{"x":0,"y":-245,"length":245},{"x":0,"y":-355,"length":355},{"x":0,"y":-480,"length":480},{"x":0,"y":-580,"length":580},{"x":0,"y":-705,"length":705}],"y":-1040},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":6796,"rotation":0,"physic":true,"line":true,"plr":false,"id":-1,"graphic":true,"density":1,"isWheel":false,"isStatic":true,"ignore":false,"layer":2,"rem":true,"safeId":-1,"vertices":[{"x":-20,"y":-10,"length":22.360679774997898},{"x":1525,"y":-10,"length":1525.032786532801},{"x":1525,"y":85,"length":1527.367015487764},{"x":890,"y":85,"length":894.0497749007043},{"x":890,"y":395,"length":973.7171047075224},{"x":725,"y":395,"length":825.6209784156408},{"x":725,"y":85,"length":729.9657526213131},{"x":-20,"y":85,"length":87.32124598286491}],"y":10},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"x":4170,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4310,"active":false,"y":189,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4241,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3821,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4101,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3960,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":4030,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3750,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3610,"active":false,"y":189,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3541,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3890,"active":false,"y":190,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3681,"active":false,"y":189,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":3470,"active":false,"y":189,"safeId":-1,"id":13,"rotation":0,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5595,"active":false,"y":60,"safeId":-1,"id":2,"rotation":80,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5611,"active":false,"y":60,"safeId":-1,"id":2,"rotation":80,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5603,"active":false,"y":59,"safeId":-1,"id":2,"rotation":90,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5619,"active":false,"y":59,"safeId":-1,"id":2,"rotation":90,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5628,"active":false,"y":60,"safeId":-1,"id":2,"rotation":80,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5636,"active":false,"y":59,"safeId":-1,"id":2,"rotation":90,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5645,"active":false,"y":60,"safeId":-1,"id":2,"rotation":80,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5588,"active":false,"y":60,"safeId":-1,"id":2,"rotation":-90,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5683,"active":false,"y":59,"safeId":-1,"id":2,"rotation":90,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5659,"active":false,"y":60,"safeId":-1,"id":2,"rotation":80,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5667,"active":false,"y":59,"safeId":-1,"id":2,"rotation":90,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5652,"active":false,"y":60,"safeId":-1,"id":2,"rotation":-90,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5707,"active":false,"y":59,"safeId":-1,"id":2,"rotation":102,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5675,"active":false,"y":60,"safeId":-1,"id":2,"rotation":80,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"x":5692,"active":false,"y":60,"safeId":-1,"id":2,"rotation":80,"width":85.95,"height":17.05},"className":"PlankBone"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":7600,"y":-60,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":10407,"y":-49,"width":9.3,"height":128.35},"className":"SignPillar"},{"params":{"x":250,"rotation":0,"y":370,"width":95,"height":72.35},"className":"Dec26"},{"params":{"x":520,"rotation":12,"y":370,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":10370,"y":-30,"width":80.2,"height":95.5},"className":"Dec24"},{"params":{"x":10490,"rotation":0,"y":-20,"width":71.6,"height":72.35},"className":"Dec28"},{"params":{"scaleX":1,"rotation":0,"scaleY":1,"x":7570,"y":-40,"width":77.3,"height":79.6},"className":"Dec23"}],[{"params":{"x":2697,"rotation":0,"y":173,"time":3,"safeId":-1,"force":6000,"width":64.1,"height":64.1},"className":"BoostE"},{"params":{"x":1395,"stones":false,"physic":false,"impulse":1,"id":11,"radius":1,"y":436,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":5673,"stones":false,"physic":false,"impulse":1,"id":2,"radius":1,"y":61,"height":53.2,"width":53.2,"safeId":-1,"rotation":90,"count":1},"className":"Tnt1"},{"params":{"x":8640,"stones":false,"physic":true,"impulse":3600,"id":16,"radius":100,"y":150,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"},{"params":{"x":8700,"stones":false,"physic":true,"impulse":3600,"id":16,"radius":100,"y":150,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":40},"className":"Tnt1"},{"params":{"speed":2000,"x":11820,"rotation":-90,"y":-570,"safeId":-1,"id":-1,"rate":1,"width":934,"height":128},"className":"GeyserE"},{"params":{"speed":2000,"x":11950,"rotation":-90,"y":-570,"safeId":-1,"id":-1,"rate":1,"width":934,"height":128},"className":"GeyserE"},{"params":{"speed":2000,"x":11690,"rotation":-90,"y":-396,"safeId":-1,"id":-1,"rate":1,"width":586,"height":128},"className":"GeyserE"},{"params":{"speed":2000,"x":12080,"rotation":-90,"y":-400,"safeId":-1,"id":-1,"rate":1,"width":594,"height":128},"className":"GeyserE"},{"params":{"x":11250,"stones":false,"physic":false,"impulse":1,"id":17,"radius":1,"y":-470,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":11250,"stones":false,"physic":false,"impulse":1,"id":17,"radius":1,"y":-380,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":11250,"stones":false,"physic":false,"impulse":1,"id":17,"radius":1,"y":-270,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"},{"params":{"x":11250,"stones":false,"physic":false,"impulse":1,"id":17,"radius":1,"y":-180,"height":53.2,"width":53.2,"safeId":-1,"rotation":0,"count":1},"className":"Tnt1"}],null,[{"params":{"x":400,"rotation":0,"y":330,"width":64,"height":32},"className":"PlayerWP"},{"params":{"x":7600,"rotation":0,"y":-140,"id":0,"width":128,"height":3176},"className":"SafePointE"},{"params":{"x":10405,"rotation":0,"y":-130,"id":0,"width":128,"height":2247},"className":"SafePointE"}],[{"params":{"x":1424,"sndId":-1,"rotation":0,"y":279,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":11,"width":45,"height":359},"className":"ToggleE"},{"params":{"x":1394,"active":0,"y":432,"cycle":0,"body":false,"id":11,"position":0,"width":13,"height":45,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-32,"length":32}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":610},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":3248,"rotation":0,"graphic":1,"id":1,"y":-244,"height":17,"width":17,"time":4.5,"safeId":-1,"snd":false,"rate":-30,"useWeld":false},"className":"MotorJointE"},{"params":{"x":4548,"rotation":0,"graphic":1,"id":1,"y":-244,"height":17,"width":17,"time":4.5,"safeId":-1,"snd":false,"rate":30,"useWeld":false},"className":"MotorJointE"},{"params":{"x":2290,"sndId":-1,"rotation":0,"y":10,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":1,"width":64,"height":1829},"className":"ToggleE"},{"params":{"x":4132,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4345,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4205,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":189,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4066,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3925,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3855,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3995,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":189,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3785,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":189,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3715,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3645,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3574,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":189,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":4275,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3433,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":189,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":3506,"rotation":0,"graphic":0,"safeId":-1,"id":12,"y":190,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5652,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5588,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5638,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5635,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5621,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5618,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5589,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5602,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5605,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5714,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5699,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5669,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5682,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5653,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5685,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":24,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5666,"rotation":90,"graphic":0,"safeId":-1,"id":14,"y":94,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":5760,"active":0,"y":40,"cycle":0,"body":false,"id":2,"position":0,"width":973,"height":13,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":960,"y":0,"length":960}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1200},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":5530,"sndId":-1,"rotation":0,"y":-300,"fnl":false,"safeId":-1,"id_off":13,"off":false,"id":2,"width":64,"height":1357},"className":"ToggleE"},{"params":{"x":8286,"rotation":0,"graphic":0,"safeId":-1,"id":-1,"y":48,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8510,"rotation":0,"graphic":0,"safeId":-1,"id":16,"y":160,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8830,"rotation":0,"graphic":0,"safeId":-1,"id":16,"y":160,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8750,"rotation":0,"graphic":0,"safeId":-1,"id":16,"y":50,"width":17,"height":17},"className":"PivotJointE"},{"params":{"x":8540,"sndId":-1,"rotation":0,"y":-40,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":16,"width":64,"height":585},"className":"ToggleE"},{"params":{"x":11257,"active":0,"y":-320,"cycle":0,"body":false,"id":17,"position":0,"width":301,"height":13,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":288,"y":0,"length":288}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":1000},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":11420,"sndId":-1,"rotation":63,"y":-400,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":17,"width":64,"height":699},"className":"ToggleE"},{"params":{"x":11390,"sndId":-1,"rotation":51,"y":-810,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":18,"width":64,"height":699},"className":"ToggleE"},{"params":{"x":11880,"active":0,"y":-1390,"cycle":0,"body":false,"id":18,"position":0,"width":13,"height":493,"stopOnEnd":true,"accelDist":0,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-480,"length":480}],"sideWait":0,"safeId":-1,"startTime":"0","rotation":0,"speed":500},"className":"frg.game.editor.objects::MoverPather"},{"params":{"x":2270,"sndId":-1,"rotation":0,"y":10,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":12,"width":64,"height":1829},"className":"ToggleE"},{"params":{"x":2280,"sndId":-1,"rotation":0,"y":10,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":13,"width":64,"height":1829},"className":"ToggleE"},{"params":{"x":5550,"sndId":0,"rotation":0,"y":-500,"fnl":false,"safeId":-1,"id_off":12,"off":false,"id":0,"width":64,"height":1701},"className":"ToggleE"},{"params":{"x":4440,"sndId":0,"rotation":0,"y":-1110,"fnl":false,"safeId":-1,"id_off":-1,"off":false,"id":14,"width":64,"height":1570},"className":"ToggleE"},{"params":{"x":7800,"sndId":-1,"rotation":0,"y":-260,"fnl":false,"safeId":-1,"id_off":14,"off":false,"id":0,"width":64,"height":1209},"className":"ToggleE"},{"params":{"x":7820,"sndId":-1,"rotation":0,"y":-270,"fnl":false,"safeId":-1,"id_off":2,"off":false,"id":0,"width":64,"height":1209},"className":"ToggleE"}]],"settings":{"prizes":"24,33,44","gravityY":500,"theme":6,"countdown":0}} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/menu_skeleton.json b/motox3mspooky/assets/levels/menu_skeleton.json deleted file mode 100644 index d5155475..00000000 --- a/motox3mspooky/assets/levels/menu_skeleton.json +++ /dev/null @@ -1 +0,0 @@ -{"frameRate":30,"name":"menu_skeleton","version":"5.5","compatibleVersion":"5.5","armature":[{"name":"biker_anim","bone":[{"inheritScale":false,"name":"back","transform":{"x":483.65,"y":-64,"scX":2,"scY":2}},{"inheritScale":false,"name":"road","transform":{"x":217.15,"y":115}},{"inheritScale":false,"name":"sun","transform":{"x":442.15,"y":-146.4}},{"inheritScale":false,"name":"moto_wheel_f","transform":{"x":30.95,"y":35}},{"inheritScale":false,"name":"moto_wheel_b","transform":{"x":-30.95,"y":35}},{"inheritScale":false,"name":"Layer 1","transform":{"x":-2.55,"y":15.1}},{"inheritScale":false,"name":"body_01","transform":{"x":-11.6,"y":-5.1}},{"inheritScale":false,"name":"leg_01","transform":{"x":-13.45,"y":1.9,"skX":30,"skY":30,"scX":0.8307,"scY":0.8307}},{"inheritScale":false,"name":"leg_02","transform":{"x":-4.7,"y":31.7,"skX":-11.43,"skY":-11.43,"scX":0.8307,"scY":0.8307}},{"inheritScale":false,"name":"hand 2","transform":{"x":4.3,"y":-3.85,"skX":11.69,"skY":11.69,"scX":0.8307,"scY":0.8307}},{"inheritScale":false,"name":"hand_01","transform":{"x":-8.45,"y":-12,"skX":-3.29,"skY":-3.29,"scX":0.8307,"scY":0.8307}},{"inheritScale":false,"name":"head","transform":{"x":-7.5,"y":-17.7,"skX":-6.73,"skY":-6.73,"scX":0.8307,"scY":0.8307}}],"slot":[{"name":"back","parent":"back"},{"name":"road","parent":"road"},{"name":"sun","parent":"sun"},{"name":"moto_wheel_f","parent":"moto_wheel_f"},{"name":"moto_wheel_b","parent":"moto_wheel_b"},{"name":"Layer 1","parent":"Layer 1"},{"name":"body_01","parent":"body_01"},{"name":"leg_01","parent":"leg_01"},{"name":"leg_02","parent":"leg_02"},{"name":"hand 2","parent":"hand 2"},{"name":"hand_01","parent":"hand_01"},{"name":"head","parent":"head"}],"skin":[{"slot":[{"name":"back","display":[{"name":"back-123123","transform":{"x":33.65,"y":-28}}]},{"name":"road","display":[{"name":"ass","transform":{"x":-36.5,"y":-63.5}}]},{"name":"sun","display":[{"name":"sun_012312","transform":{"x":0.05,"y":30.15}}]},{"name":"moto_wheel_f","display":[{"type":"armature","name":"front_wheel_anim_01","transform":{"x":-0.05,"y":0.05}}]},{"name":"moto_wheel_b","display":[{"type":"armature","name":"back_wheel_anim-01","transform":{"y":0.05}}]},{"name":"Layer 1","display":[{"name":"bike_body_01","transform":{"x":-6.05,"y":3.65}}]},{"name":"body_01","display":[{"name":"body-01","transform":{"x":0.95,"y":-1.8}}]},{"name":"leg_01","display":[{"name":"leg_01","transform":{"x":4.7,"y":5.75}}]},{"name":"leg_02","display":[{"name":"leg_02","transform":{"x":4.65,"y":-11.5}}]},{"name":"hand 2","display":[{"name":"hand)92","transform":{"x":1.35,"y":-0.4}}]},{"name":"hand_01","display":[{"name":"hand_01","transform":{"x":3.35,"y":3.8}}]},{"name":"head","display":[{"name":"head","transform":{"x":5.8,"y":-10.2}}]}]}],"animation":[{"duration":170,"fadeInTime":0.2,"name":"biker menu animation","bone":[{"name":"back","translateFrame":[{"duration":20,"tweenEasing":-1},{"duration":149,"tweenEasing":1,"x":-70,"y":0.1},{"tweenEasing":0,"x":-134,"y":0.1}],"scaleFrame":[{"duration":170}]},{"name":"road","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":163,"tweenEasing":0,"x":-34.65,"y":-2.75},{"x":-214,"y":-1.45},{"tweenEasing":0,"x":-217.15,"y":-115}],"scaleFrame":[{"duration":170}]},{"name":"sun","translateFrame":[{"duration":20,"tweenEasing":-1},{"duration":149,"tweenEasing":1,"x":-50},{"tweenEasing":0,"x":-96.02,"y":-15}],"scaleFrame":[{"duration":20,"tweenEasing":-1},{"duration":149,"tweenEasing":1},{"tweenEasing":0,"x":1.4443,"y":1.4443}]},{"name":"moto_wheel_f","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":92.1,"y":-16.05},{"duration":7,"tweenEasing":0,"x":161.42,"y":-58.98},{"duration":9,"tweenEasing":0,"x":287.29,"y":-123.35},{"duration":142,"tweenEasing":1,"x":349.98,"y":-110.09},{"tweenEasing":0,"x":377.04,"y":-81.68}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-10.21},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":-17.24},{"duration":142,"tweenEasing":1,"rotate":-0.53},{"tweenEasing":0,"rotate":14.47}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.6172,"y":1.6172},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"moto_wheel_b","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":96.3,"y":-1.9},{"duration":7,"tweenEasing":0,"x":163.73,"y":-24.13},{"duration":9,"tweenEasing":0,"x":277.6,"y":-101.2},{"duration":142,"tweenEasing":1,"x":311.83,"y":-109.12},{"tweenEasing":0,"x":344.25,"y":-106.2}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-10.21},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":-17.24},{"duration":142,"tweenEasing":1,"rotate":-0.53},{"tweenEasing":0,"rotate":14.47}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.6172,"y":1.6172},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"Layer 1","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":92.3,"y":-5.1},{"duration":7,"tweenEasing":0,"x":151.42,"y":-39.37},{"duration":9,"tweenEasing":0,"x":274.95,"y":-114.4},{"duration":142,"tweenEasing":1,"x":329.05,"y":-121.8},{"tweenEasing":0,"x":367.12,"y":-105.58}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-10.21},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":-17.24},{"duration":142,"tweenEasing":1,"rotate":-0.53},{"tweenEasing":0,"rotate":14.47}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.6172,"y":1.6172},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"body_01","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":87.8,"y":-0.2},{"duration":7,"tweenEasing":0,"x":140.5,"y":-33.63},{"duration":9,"tweenEasing":0,"x":259.66,"y":-120.03},{"duration":142,"tweenEasing":1,"x":319.47,"y":-154.91},{"tweenEasing":0,"x":368.35,"y":-135.62}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-4.99},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":42.76},{"duration":142,"tweenEasing":1,"rotate":86.16},{"tweenEasing":0,"rotate":92.46}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.6172,"y":1.6171},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"leg_01","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":88.34,"y":-1.14},{"duration":7,"tweenEasing":0,"x":144.5,"y":-32.8},{"duration":9,"tweenEasing":0,"x":254.17,"y":-122.42},{"duration":142,"tweenEasing":1,"x":306.45,"y":-163.38},{"tweenEasing":0,"x":358.83,"y":-145.77}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-20.44},{"duration":7,"tweenEasing":0,"rotate":-30.23},{"duration":9,"tweenEasing":0,"rotate":42.75},{"duration":142,"tweenEasing":1,"rotate":101.16},{"tweenEasing":0,"rotate":118.67}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.6171,"y":1.6171},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"leg_02","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":95.3,"y":-5},{"duration":7,"tweenEasing":0,"x":160.92,"y":-38.77},{"duration":9,"tweenEasing":0,"x":228.7,"y":-118.64},{"duration":142,"tweenEasing":1,"x":247.63,"y":-188.7},{"tweenEasing":0,"x":302.34,"y":-185.97}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-10.2},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":42.76},{"duration":142,"tweenEasing":1,"rotate":101.16},{"tweenEasing":0,"rotate":118.67}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.2089,"y":1.2089},{"duration":142,"tweenEasing":1,"x":1.6171,"y":1.6171},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"hand 2","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":88.78,"y":-5.99},{"duration":7,"tweenEasing":0,"x":140.56,"y":-42.6},{"duration":9,"tweenEasing":0,"x":269.1,"y":-119.85},{"duration":142,"tweenEasing":1,"x":332.94,"y":-133.78},{"tweenEasing":0,"x":378.23,"y":-112.96}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-25.21},{"duration":7,"tweenEasing":0,"rotate":-30.23},{"duration":9,"tweenEasing":0,"rotate":-17.25},{"duration":143,"rotate":14.47}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.617,"y":1.617},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"hand_01","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":86.78,"y":-2.94},{"duration":7,"tweenEasing":0,"x":137,"y":-35.5},{"duration":9,"tweenEasing":0,"x":266.5,"y":-118.65},{"duration":142,"tweenEasing":1,"x":332.92,"y":-144.54},{"tweenEasing":0,"x":377.88,"y":-122.59}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-10.21},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":-6.22},{"duration":142,"tweenEasing":1,"rotate":29.47},{"tweenEasing":0,"rotate":23.51}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.115,"y":1.115},{"duration":9,"tweenEasing":0,"x":1.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.6171,"y":1.6171},{"tweenEasing":0,"x":1.5797,"y":1.5797}]},{"name":"head","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":86.55,"y":-0.1},{"duration":7,"tweenEasing":0,"x":133.25,"y":-35.45},{"duration":9,"tweenEasing":0,"x":266.9,"y":-118.3},{"duration":142,"tweenEasing":1,"x":335.65,"y":-140.9},{"tweenEasing":0,"x":384.6,"y":-121.25}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-10.2},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":-12.01},{"duration":142,"tweenEasing":1,"rotate":25.41},{"tweenEasing":0,"rotate":40.41}],"scaleFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.1149,"y":1.1149},{"duration":9,"tweenEasing":0,"x":1.2089,"y":1.2089},{"duration":142,"tweenEasing":1,"x":1.6171,"y":1.6171},{"tweenEasing":0,"x":1.5797,"y":1.5797}]}],"slot":[{"name":"road","displayFrame":[{"duration":169},{"value":-1}]}]}]},{"name":"front_wheel_anim_01","bone":[{"inheritScale":false,"name":"wheel","transform":{"scX":0.7272,"scY":0.7272}}],"slot":[{"name":"wheel","parent":"wheel"}],"skin":[{"slot":[{"name":"wheel","display":[{"name":"moto_wheel_01","transform":{"x":0.45,"y":0.35}}]}]}],"animation":[{"duration":25,"playTimes":0,"name":"anim","bone":[{"name":"wheel","rotateFrame":[{"duration":24,"tweenEasing":0,"clockwise":2},{"tweenEasing":0}],"scaleFrame":[{"duration":25}]}]}]},{"name":"back_wheel_anim-01","bone":[{"inheritScale":false,"name":"wheel","transform":{"x":-0.05,"scX":0.7272,"scY":0.7272}}],"slot":[{"name":"wheel","parent":"wheel"}],"skin":[{"slot":[{"name":"wheel","display":[{"name":"moto_wheel_01","transform":{"x":0.45,"y":0.35}}]}]}],"animation":[{"duration":25,"playTimes":0,"name":"anim","bone":[{"name":"wheel","rotateFrame":[{"duration":24,"tweenEasing":0,"clockwise":2},{"tweenEasing":0}],"scaleFrame":[{"duration":25}]}]}]}]} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/menu_texture.json b/motox3mspooky/assets/levels/menu_texture.json deleted file mode 100644 index 885d8a75..00000000 --- a/motox3mspooky/assets/levels/menu_texture.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"menu_skeleton","imagePath":"menu_texture.png","SubTexture":[{"name":"back-123123","x":0,"y":0,"height":240,"width":500},{"name":"ass","x":0,"y":242,"height":159,"width":261},{"name":"sun_012312","x":502,"y":0,"height":335,"width":335},{"name":"bike_body_01","x":839,"y":0,"height":47,"width":95},{"name":"body-01","x":839,"y":48,"height":29,"width":23},{"name":"leg_01","x":979,"y":38,"height":31,"width":30},{"name":"leg_02","x":979,"y":0,"height":37,"width":25},{"name":"hand)92","x":1005,"y":15,"height":11,"width":16},{"name":"hand_01","x":1005,"y":0,"height":14,"width":15},{"name":"head","x":935,"y":44,"height":29,"width":30},{"name":"moto_wheel_01","x":935,"y":0,"height":43,"width":43}]} \ No newline at end of file diff --git a/motox3mspooky/assets/levels/objects.json b/motox3mspooky/assets/levels/objects.json deleted file mode 100644 index 4e185a99..00000000 --- a/motox3mspooky/assets/levels/objects.json +++ /dev/null @@ -1,494 +0,0 @@ -{ - "point21": { - "x": 680, - "y": 173 - }, - "point20": { - "x": 632, - "y": 85 - }, - "point19": { - "x": 596, - "y": 202 - }, - "point18": { - "x": 632, - "y": 314 - }, - "point17": { - "x": 480, - "y": 360 - }, - "point16": { - "x": 533, - "y": 287 - }, - "point15": { - "x": 487, - "y": 150 - }, - "point14": { - "x": 545, - "y": 90 - }, - "point13": { - "x": 431, - "y": 43 - }, - "point12": { - "x": 430, - "y": 253 - }, - "point11": { - "x": 351, - "y": 333 - }, - "point10": { - "x": 353, - "y": 190 - }, - "point9": { - "x": 309, - "y": 48 - }, - "point8": { - "x": 260, - "y": 140 - }, - "point7": { - "x": 282, - "y": 273 - }, - "point6": { - "x": 193, - "y": 296 - }, - "point5": { - "x": 137, - "y": 214 - }, - "point4": { - "x": 185, - "y": 79 - }, - "point3": { - "x": 99, - "y": 96 - }, - "point2": { - "x": 42, - "y": 167 - }, - "point1": { - "x": 48, - "y": 266 - }, - "point0": { - "x": 105, - "y": 344 - }, - "bike1": { - "driver_head": { - "x": -1.8, - "y": -59.5, - "r": 14.998931884765625, - "g": "driver_head1" - }, - "driver_forearm": { - "x": 8.8, - "y": -33.35, - "r": 11.00091552734375, - "g": "driver_forearm1" - }, - "driver_arm": { - "x": -4.25, - "y": -39.4, - "r": 44.99913024902344, - "g": "driver_arm1" - }, - "driver_shin": { - "x": -1.8, - "y": -2.7, - "r": 3.0003509521484375, - "g": "driver_shin1" - }, - "driver_hip": { - "x": -7.4, - "y": -18.5, - "r": 29.9998779296875, - "g": "driver_hip1" - }, - "driver_corpse": { - "x": -8.35, - "y": -33.75, - "r": 15.732131958007812, - "g": "driver_corpse1" - }, - "suspend_front": { - "x": 46, - "y": 16, - "r": 63.00018310546875, - "g": "suspend_front1" - }, - "base": { - "x": 0, - "y": 0, - "r": 0, - "g": "bike_1_base" - }, - "suspend_back": { - "x": -6, - "y": 12, - "r": 169.69569396972656, - "g": "suspend_back1" - }, - "Wheel0": { - "x": -35, - "y": 17, - "r": 0, - "g": "Wheel_1_0" - }, - "Wheel1": { - "x": 44, - "y": 17, - "r": 0, - "g": "Wheel_1_0" - } - }, - "bike3": { - "driver_head": { - "x": -1.8, - "y": -59.5, - "r": 14.998931884765625, - "g": "driver_head3" - }, - "driver_forearm": { - "x": 8.8, - "y": -33.35, - "r": 11.00091552734375, - "g": "driver_forearm3" - }, - "driver_arm": { - "x": -4.25, - "y": -39.4, - "r": 44.99913024902344, - "g": "driver_arm3" - }, - "driver_shin": { - "x": -1.8, - "y": -2.7, - "r": 3.0003509521484375, - "g": "driver_shin3" - }, - "driver_hip": { - "x": -7.4, - "y": -18.5, - "r": 29.9998779296875, - "g": "driver_hip3" - }, - "driver_corpse": { - "x": -8.35, - "y": -33.75, - "r": 15.732131958007812, - "g": "driver_corpse3" - }, - "suspend_front": { - "x": 44, - "y": 15, - "r": 63.00018310546875, - "g": "suspend_front3" - }, - "base": { - "x": 0, - "y": 0, - "r": 0, - "g": "bike_3_base" - }, - "suspend_back": { - "x": -6, - "y": 12, - "r": 169.69569396972656, - "g": "suspend_back3" - }, - "Wheel0": { - "x": -34, - "y": 17, - "r": 0, - "g": "Wheel_3_0" - }, - "Wheel1": { - "x": 46, - "y": 16, - "r": 0, - "g": "Wheel_3_0" - } - }, - "bike5": { - "driver_head": { - "x": -1.8, - "y": -59.5, - "r": 14.998931884765625, - "g": "driver_head5" - }, - "driver_forearm": { - "x": 8.8, - "y": -33.35, - "r": 11.00091552734375, - "g": "driver_forearm5" - }, - "driver_arm": { - "x": -4.25, - "y": -39.4, - "r": 44.99913024902344, - "g": "driver_arm5" - }, - "driver_shin": { - "x": -1.8, - "y": -2.7, - "r": 3.0003509521484375, - "g": "driver_shin5" - }, - "driver_hip": { - "x": -7.4, - "y": -18.5, - "r": 29.9998779296875, - "g": "driver_hip5" - }, - "driver_corpse": { - "x": -8.35, - "y": -33.75, - "r": 15.732131958007812, - "g": "driver_corpse5" - }, - "suspend_front": { - "x": 49, - "y": 13, - "r": 63.00018310546875, - "g": "suspend_front5" - }, - "base": { - "x": 0, - "y": 0, - "r": 0, - "g": "bike_5_base" - }, - "suspend_back": { - "x": -10, - "y": 12, - "r": 169.69569396972656, - "g": "suspend_back5" - }, - "Wheel0": { - "x": -34, - "y": 17, - "r": 0, - "g": "Wheel_5_0" - }, - "Wheel1": { - "x": 47, - "y": 17, - "r": 0, - "g": "Wheel_5_0" - } - }, - "bike11": { - "driver_head": { - "x": 20.1, - "y": -56.55, - "r": 47.00189208984375, - "g": "driver_head1" - }, - "driver_forearm": { - "x": 19, - "y": -31.5, - "r": 25.82525634765625, - "g": "driver_forearm1" - }, - "driver_arm": { - "x": 7.9, - "y": -40.7, - "r": 59.82405090332031, - "g": "driver_arm1" - }, - "driver_shin": { - "x": -34.45, - "y": -48.55, - "r": 117.83747863769531, - "g": "driver_shin1" - }, - "driver_hip": { - "x": -17.8, - "y": -47.95, - "r": 144.83595275878906, - "g": "driver_hip1" - }, - "driver_corpse": { - "x": -1.15, - "y": -46.8, - "r": 100.73109436035156, - "g": "driver_corpse1" - }, - "suspend_front": { - "x": 40.35, - "y": 26.75, - "r": 78.82647705078125, - "g": "suspend_front1" - }, - "base": { - "x": 0.5, - "y": -1.2, - "r": 15.826858520507812, - "g": "bike_1_base" - }, - "suspend_back": { - "x": -8.5, - "y": 8.7, - "r": -174.4778289794922, - "g": "suspend_back1" - }, - "Wheel0": { - "x": -37.8, - "y": 5.6, - "r": 15.826858520507812, - "g": "Wheel_1_0" - }, - "Wheel1": { - "x": 38.15, - "y": 27.15, - "r": 15.826858520507812, - "g": "Wheel_1_0" - } - }, - "Plank0": { - "shape": "rect", - "h": 17.3, - "w": 71.1 - }, - "PlankWipe0": { - "shape":"rect", - "h":18, - "w":85 - }, - "RemovedWipe0": { - "shape":"rect", - "h":85, - "w":18 - }, - "SphereE":{ - "h":274, - "shape":"circ", - "w":274 - }, - "PlankBone": { - "shape": "rect", - "h": 12, - "w": 85 - }, - "PlankCandy": { - "shape": "rect", - "h": 18, - "w": 85 - }, - "Tnt1": { - "h": 52.8, - "shape": "rect", - "w": 52.8 - }, - "EggE": { - "h": 44, - "shape": "circ", - "w": 44 - }, - "BarrelE": { - "h": 52.1, - "shape": "circ", - "w": 52.1 - }, - "SpikesE": { - "h": 29.5, - "shape": "rect", - "w": 116.8 - }, - "Removed0": { - "h": 70.1, - "shape": "rect", - "w": 10.2 - }, - "Removed1": { - "h": 47.7, - "shape": "rect", - "w": 10.2 - }, - "Glass0": { - "w": 64, - "shape": "rect", - "h": 16 - }, - "Glass1": { - "w": 128, - "shape": "rect", - "h": 16 - }, - "GlassCrashed0": { - "w": 128, - "shape": "rect", - "h": 16, - "pts": [ - { - "x": -47, - "y": -6 - }, - { - "x": -35, - "y": 2 - }, - { - "x": 13, - "y": 2 - }, - { - "x": 48, - "y": 2 - }, - { - "x": 47, - "y": -4 - }, - { - "x": 4, - "y": -4 - } - ] - }, - "GlassCrashed1": { - "w": 64, - "shape": "rect", - "h": 16, - "pts": [ - { - "x": -23, - "y": -6 - }, - { - "x": -17, - "y": 2 - }, - { - "x": 7, - "y": 2 - }, - { - "x": 25, - "y": 2 - }, - { - "x": 24, - "y": -4 - }, - { - "x": 3, - "y": -4 - } - ] - } -} \ No newline at end of file diff --git a/motox3mspooky/assets/lib/dragonBones.min.js b/motox3mspooky/assets/lib/dragonBones.min.js deleted file mode 100644 index 804b45a5..00000000 --- a/motox3mspooky/assets/lib/dragonBones.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(e.hasOwnProperty(i))t[i]=e[i]};return function(e,i){t(e,i);function a(){this.constructor=e}e.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}();var dragonBones;(function(t){})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function e(i){this._clock=new t.WorldClock;this._events=[];this._objects=[];this._eventManager=null;this._eventManager=i;console.info("DragonBones: "+e.VERSION+"\nWebsite: http://www.dragonbones.com/\nSource: http://www.github.com/dragonbones/")}e.prototype.advanceTime=function(e){if(this._objects.length>0){for(var i=0,a=this._objects;i0){for(var n=0;ni){r.length=i}t._maxCountMap[a]=i}else{t._defaultMaxCount=i;for(var a in t._poolsMap){var r=t._poolsMap[a];if(r.length>i){r.length=i}if(a in t._maxCountMap){t._maxCountMap[a]=i}}}};t.clearPool=function(e){if(e===void 0){e=null}if(e!==null){var i=String(e);var a=i in t._poolsMap?t._poolsMap[i]:null;if(a!==null&&a.length>0){a.length=0}}else{for(var r in t._poolsMap){var a=t._poolsMap[r];a.length=0}}};t.borrowObject=function(e){var i=String(e);var a=i in t._poolsMap?t._poolsMap[i]:null;if(a!==null&&a.length>0){var r=a.pop();r._isInPool=false;return r}var n=new e;n._onClear();return n};t.prototype.returnToPool=function(){this._onClear();t._returnObject(this)};t._hashCode=0;t._defaultMaxCount=3e3;t._maxCountMap={};t._poolsMap={};return t}();t.BaseObject=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a,r,n){if(t===void 0){t=1}if(e===void 0){e=0}if(i===void 0){i=0}if(a===void 0){a=1}if(r===void 0){r=0}if(n===void 0){n=0}this.a=t;this.b=e;this.c=i;this.d=a;this.tx=r;this.ty=n}t.prototype.toString=function(){return"[object dragonBones.Matrix] a:"+this.a+" b:"+this.b+" c:"+this.c+" d:"+this.d+" tx:"+this.tx+" ty:"+this.ty};t.prototype.copyFrom=function(t){this.a=t.a;this.b=t.b;this.c=t.c;this.d=t.d;this.tx=t.tx;this.ty=t.ty;return this};t.prototype.copyFromArray=function(t,e){if(e===void 0){e=0}this.a=t[e];this.b=t[e+1];this.c=t[e+2];this.d=t[e+3];this.tx=t[e+4];this.ty=t[e+5];return this};t.prototype.identity=function(){this.a=this.d=1;this.b=this.c=0;this.tx=this.ty=0;return this};t.prototype.concat=function(t){var e=this.a*t.a;var i=0;var a=0;var r=this.d*t.d;var n=this.tx*t.a+t.tx;var s=this.ty*t.d+t.ty;if(this.b!==0||this.c!==0){e+=this.b*t.c;i+=this.b*t.d;a+=this.c*t.a;r+=this.c*t.b}if(t.b!==0||t.c!==0){i+=this.a*t.b;a+=this.d*t.c;n+=this.ty*t.c;s+=this.tx*t.b}this.a=e;this.b=i;this.c=a;this.d=r;this.tx=n;this.ty=s;return this};t.prototype.invert=function(){var t=this.a;var e=this.b;var i=this.c;var a=this.d;var r=this.tx;var n=this.ty;if(e===0&&i===0){this.b=this.c=0;if(t===0||a===0){this.a=this.b=this.tx=this.ty=0}else{t=this.a=1/t;a=this.d=1/a;this.tx=-t*r;this.ty=-a*n}return this}var s=t*a-e*i;if(s===0){this.a=this.d=1;this.b=this.c=0;this.tx=this.ty=0;return this}s=1/s;var o=this.a=a*s;e=this.b=-e*s;i=this.c=-i*s;a=this.d=t*s;this.tx=-(o*r+i*n);this.ty=-(e*r+a*n);return this};t.prototype.transformPoint=function(t,e,i,a){if(a===void 0){a=false}i.x=this.a*t+this.c*e;i.y=this.b*t+this.d*e;if(!a){i.x+=this.tx;i.y+=this.ty}};t.prototype.transformRectangle=function(t,e){if(e===void 0){e=false}var i=this.a;var a=this.b;var r=this.c;var n=this.d;var s=e?0:this.tx;var o=e?0:this.ty;var l=t.x;var h=t.y;var u=l+t.width;var f=h+t.height;var _=i*l+r*h+s;var m=a*l+n*h+o;var p=i*u+r*h+s;var c=a*u+n*h+o;var d=i*u+r*f+s;var y=a*u+n*f+o;var v=i*l+r*f+s;var g=a*l+n*f+o;var b=0;if(_>p){b=_;_=p;p=b}if(d>v){b=d;d=v;v=b}t.x=Math.floor(_v?p:v)-t.x);if(m>c){b=m;m=c;c=b}if(y>g){b=y;y=g;g=b}t.y=Math.floor(mg?c:g)-t.y)};return t}();t.Matrix=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a,r,n){if(t===void 0){t=0}if(e===void 0){e=0}if(i===void 0){i=0}if(a===void 0){a=0}if(r===void 0){r=1}if(n===void 0){n=1}this.x=t;this.y=e;this.skew=i;this.rotation=a;this.scaleX=r;this.scaleY=n}t.normalizeRadian=function(t){t=(t+Math.PI)%(Math.PI*2);t+=t>0?-Math.PI:Math.PI;return t};t.prototype.toString=function(){return"[object dragonBones.Transform] x:"+this.x+" y:"+this.y+" skewX:"+this.skew*180/Math.PI+" skewY:"+this.rotation*180/Math.PI+" scaleX:"+this.scaleX+" scaleY:"+this.scaleY};t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y;this.skew=t.skew;this.rotation=t.rotation;this.scaleX=t.scaleX;this.scaleY=t.scaleY;return this};t.prototype.identity=function(){this.x=this.y=0;this.skew=this.rotation=0;this.scaleX=this.scaleY=1;return this};t.prototype.add=function(t){this.x+=t.x;this.y+=t.y;this.skew+=t.skew;this.rotation+=t.rotation;this.scaleX*=t.scaleX;this.scaleY*=t.scaleY;return this};t.prototype.minus=function(t){this.x-=t.x;this.y-=t.y;this.skew-=t.skew;this.rotation-=t.rotation;this.scaleX/=t.scaleX;this.scaleY/=t.scaleY;return this};t.prototype.fromMatrix=function(e){var i=this.scaleX,a=this.scaleY;var r=t.PI_Q;this.x=e.tx;this.y=e.ty;this.rotation=Math.atan(e.b/e.a);var n=Math.atan(-e.c/e.d);this.scaleX=this.rotation>-r&&this.rotation-r&&n=0&&this.scaleX<0){this.scaleX=-this.scaleX;this.rotation=this.rotation-Math.PI}if(a>=0&&this.scaleY<0){this.scaleY=-this.scaleY;n=n-Math.PI}this.skew=n-this.rotation;return this};t.prototype.toMatrix=function(t){if(this.skew!==0||this.rotation!==0){t.a=Math.cos(this.rotation);t.b=Math.sin(this.rotation);if(this.skew===0){t.c=-t.b;t.d=t.a}else{t.c=-Math.sin(this.skew+this.rotation);t.d=Math.cos(this.skew+this.rotation)}if(this.scaleX!==1){t.a*=this.scaleX;t.b*=this.scaleX}if(this.scaleY!==1){t.c*=this.scaleY;t.d*=this.scaleY}}else{t.a=this.scaleX;t.b=0;t.c=0;t.d=this.scaleY}t.tx=this.x;t.ty=this.y;return this};t.PI_D=Math.PI*2;t.PI_H=Math.PI/2;t.PI_Q=Math.PI/4;t.RAD_DEG=180/Math.PI;t.DEG_RAD=Math.PI/180;return t}();t.Transform=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a,r,n,s,o){if(t===void 0){t=1}if(e===void 0){e=1}if(i===void 0){i=1}if(a===void 0){a=1}if(r===void 0){r=0}if(n===void 0){n=0}if(s===void 0){s=0}if(o===void 0){o=0}this.alphaMultiplier=t;this.redMultiplier=e;this.greenMultiplier=i;this.blueMultiplier=a;this.alphaOffset=r;this.redOffset=n;this.greenOffset=s;this.blueOffset=o}t.prototype.copyFrom=function(t){this.alphaMultiplier=t.alphaMultiplier;this.redMultiplier=t.redMultiplier;this.greenMultiplier=t.greenMultiplier;this.blueMultiplier=t.blueMultiplier;this.alphaOffset=t.alphaOffset;this.redOffset=t.redOffset;this.greenOffset=t.greenOffset;this.blueOffset=t.blueOffset};t.prototype.identity=function(){this.alphaMultiplier=this.redMultiplier=this.greenMultiplier=this.blueMultiplier=1;this.alphaOffset=this.redOffset=this.greenOffset=this.blueOffset=0};return t}();t.ColorTransform=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e){if(t===void 0){t=0}if(e===void 0){e=0}this.x=t;this.y=e}t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y};t.prototype.clear=function(){this.x=this.y=0};return t}();t.Point=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a){if(t===void 0){t=0}if(e===void 0){e=0}if(i===void 0){i=0}if(a===void 0){a=0}this.x=t;this.y=e;this.width=i;this.height=a}t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y;this.width=t.width;this.height=t.height};t.prototype.clear=function(){this.x=this.y=0;this.width=this.height=0};return t}();t.Rectangle=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.ints=[];e.floats=[];e.strings=[];return e}e.toString=function(){return"[class dragonBones.UserData]"};e.prototype._onClear=function(){this.ints.length=0;this.floats.length=0;this.strings.length=0};e.prototype.addInt=function(t){this.ints.push(t)};e.prototype.addFloat=function(t){this.floats.push(t)};e.prototype.addString=function(t){this.strings.push(t)};e.prototype.getInt=function(t){if(t===void 0){t=0}return t>=0&&t=0&&t=0&&t=t){i=0}if(this.sortedBones.indexOf(r)>=0){continue}var n=false;for(var s in this.constraints){var o=this.constraints[s];if(o.bone===r&&this.sortedBones.indexOf(o.target)<0){n=true;break}}if(n){continue}if(r.parent!==null&&this.sortedBones.indexOf(r.parent)<0){continue}this.sortedBones.push(r);a++}};i.prototype.cacheFrames=function(t){if(this.cacheFrameRate>0){return}this.cacheFrameRate=t;for(var e in this.animations){this.animations[e].cacheFrames(this.cacheFrameRate)}};i.prototype.setCacheFrame=function(t,e){var i=this.parent.cachedFrames;var a=i.length;i.length+=10;i[a]=t.a;i[a+1]=t.b;i[a+2]=t.c;i[a+3]=t.d;i[a+4]=t.tx;i[a+5]=t.ty;i[a+6]=e.rotation;i[a+7]=e.skew;i[a+8]=e.scaleX;i[a+9]=e.scaleY;return a};i.prototype.getCacheFrame=function(t,e,i){var a=this.parent.cachedFrames;t.a=a[i];t.b=a[i+1];t.c=a[i+2];t.d=a[i+3];t.tx=a[i+4];t.ty=a[i+5];e.rotation=a[i+6];e.skew=a[i+7];e.scaleX=a[i+8];e.scaleY=a[i+9];e.x=t.tx;e.y=t.ty};i.prototype.addBone=function(t){if(t.name in this.bones){console.warn("Same bone: "+t.name);return}this.bones[t.name]=t;this.sortedBones.push(t)};i.prototype.addSlot=function(t){if(t.name in this.slots){console.warn("Same slot: "+t.name);return}this.slots[t.name]=t;this.sortedSlots.push(t)};i.prototype.addConstraint=function(t){if(t.name in this.constraints){console.warn("Same constraint: "+t.name);return}this.constraints[t.name]=t};i.prototype.addSkin=function(t){if(t.name in this.skins){console.warn("Same skin: "+t.name);return}t.parent=this;this.skins[t.name]=t;if(this.defaultSkin===null){this.defaultSkin=t}if(t.name==="default"){this.defaultSkin=t}};i.prototype.addAnimation=function(t){if(t.name in this.animations){console.warn("Same animation: "+t.name);return}t.parent=this;this.animations[t.name]=t;this.animationNames.push(t.name);if(this.defaultAnimation===null){this.defaultAnimation=t}};i.prototype.addAction=function(t,e){if(e){this.defaultActions.push(t)}else{this.actions.push(t)}};i.prototype.getBone=function(t){return t in this.bones?this.bones[t]:null};i.prototype.getSlot=function(t){return t in this.slots?this.slots[t]:null};i.prototype.getConstraint=function(t){return t in this.constraints?this.constraints[t]:null};i.prototype.getSkin=function(t){return t in this.skins?this.skins[t]:null};i.prototype.getAnimation=function(t){return t in this.animations?this.animations[t]:null};return i}(t.BaseObject);t.ArmatureData=e;var i=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.transform=new t.Transform;i.userData=null;return i}i.toString=function(){return"[class dragonBones.BoneData]"};i.prototype._onClear=function(){if(this.userData!==null){this.userData.returnToPool()}this.inheritTranslation=false;this.inheritRotation=false;this.inheritScale=false;this.inheritReflection=false;this.length=0;this.name="";this.transform.identity();this.userData=null;this.parent=null};return i}(t.BaseObject);t.BoneData=i;var a=function(e){__extends(i,e);function i(){var t=e!==null&&e.apply(this,arguments)||this;t.color=null;t.userData=null;return t}i.createColor=function(){return new t.ColorTransform};i.toString=function(){return"[class dragonBones.SlotData]"};i.prototype._onClear=function(){if(this.userData!==null){this.userData.returnToPool()}this.blendMode=0;this.displayIndex=0;this.zOrder=0;this.name="";this.color=null;this.userData=null;this.parent=null};i.DEFAULT_COLOR=new t.ColorTransform;return i}(t.BaseObject);t.SlotData=a})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.CanvasData]"};e.prototype._onClear=function(){this.hasBackground=false;this.color=0;this.x=0;this.y=0;this.width=0;this.height=0};return e}(t.BaseObject);t.CanvasData=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.displays={};return e}e.toString=function(){return"[class dragonBones.SkinData]"};e.prototype._onClear=function(){for(var t in this.displays){var e=this.displays[t];for(var i=0,a=e;ir){s|=2}if(en){s|=8}return s};e.rectangleIntersectsSegment=function(t,i,a,r,n,s,o,l,h,u,f){if(h===void 0){h=null}if(u===void 0){u=null}if(f===void 0){f=null}var _=t>n&&ts&&in&&as&&r=-i&&t<=i){var a=this.height*.5;if(e>=-a&&e<=a){return true}}return false};e.prototype.intersectsSegment=function(t,i,a,r,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}var l=this.width*.5;var h=this.height*.5;var u=e.rectangleIntersectsSegment(t,i,a,r,-l,-h,l,h,n,s,o);return u};return e}(e);t.RectangleBoundingBoxData=i;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.EllipseData]"};e.ellipseIntersectsSegment=function(t,e,i,a,r,n,s,o,l,h,u){if(l===void 0){l=null}if(h===void 0){h=null}if(u===void 0){u=null}var f=s/o;var _=f*f;e*=f;a*=f;var m=i-t;var p=a-e;var c=Math.sqrt(m*m+p*p);var d=m/c;var y=p/c;var v=(r-t)*d+(n-e)*y;var g=v*v;var b=t*t+e*e;var T=s*s;var A=T-b+g;var D=0;if(A>=0){var O=Math.sqrt(A);var S=v-O;var x=v+O;var B=S<0?-1:S<=c?0:1;var P=x<0?-1:x<=c?0:1;var M=B*P;if(M<0){return-1}else if(M===0){if(B===-1){D=2;i=t+x*d;a=(e+x*y)/f;if(l!==null){l.x=i;l.y=a}if(h!==null){h.x=i;h.y=a}if(u!==null){u.x=Math.atan2(a/T*_,i/T);u.y=u.x+Math.PI}}else if(P===1){D=1;t=t+S*d;e=(e+S*y)/f;if(l!==null){l.x=t;l.y=e}if(h!==null){h.x=t;h.y=e}if(u!==null){u.x=Math.atan2(e/T*_,t/T);u.y=u.x+Math.PI}}else{D=3;if(l!==null){l.x=t+S*d;l.y=(e+S*y)/f;if(u!==null){u.x=Math.atan2(l.y/T*_,l.x/T)}}if(h!==null){h.x=t+x*d;h.y=(e+x*y)/f;if(u!==null){u.y=Math.atan2(h.y/T*_,h.x/T)}}}}}return D};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.type=1};e.prototype.containsPoint=function(t,e){var i=this.width*.5;if(t>=-i&&t<=i){var a=this.height*.5;if(e>=-a&&e<=a){e*=i/a;return Math.sqrt(t*t+e*e)<=i}}return false};e.prototype.intersectsSegment=function(t,i,a,r,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}var l=e.ellipseIntersectsSegment(t,i,a,r,0,0,this.width*.5,this.height*.5,n,s,o);return l};return e}(e);t.EllipseBoundingBoxData=a;var r=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.vertices=[];e.weight=null;return e}e.toString=function(){return"[class dragonBones.PolygonBoundingBoxData]"};e.polygonIntersectsSegment=function(t,e,i,a,r,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}if(t===i){t=i+1e-6}if(e===a){e=a+1e-6}var l=r.length;var h=t-i;var u=e-a;var f=t*a-e*i;var _=0;var m=r[l-2];var p=r[l-1];var c=0;var d=0;var y=0;var v=0;var g=0;var b=0;for(var T=0;T=m&&P<=A||P>=A&&P<=m)&&(h===0||P>=t&&P<=i||P>=i&&P<=t)){var M=(f*S-u*x)/B;if((M>=p&&M<=D||M>=D&&M<=p)&&(u===0||M>=e&&M<=a||M>=a&&M<=e)){if(s!==null){var E=P-t;if(E<0){E=-E}if(_===0){c=E;d=E;y=P;v=M;g=P;b=M;if(o!==null){o.x=Math.atan2(D-p,A-m)-Math.PI*.5;o.y=o.x}}else{if(Ed){d=E;g=P;b=M;if(o!==null){o.y=Math.atan2(D-p,A-m)-Math.PI*.5}}}_++}else{y=P;v=M;g=P;b=M;_++;if(o!==null){o.x=Math.atan2(D-p,A-m)-Math.PI*.5;o.y=o.x}break}}}m=A;p=D}if(_===1){if(n!==null){n.x=y;n.y=v}if(s!==null){s.x=y;s.y=v}if(o!==null){o.y=o.x+Math.PI}}else if(_>1){_++;if(n!==null){n.x=y;n.y=v}if(s!==null){s.x=g;s.y=b}}return _};e.prototype._onClear=function(){t.prototype._onClear.call(this);if(this.weight!==null){this.weight.returnToPool()}this.type=2;this.x=0;this.y=0;this.vertices.length=0;this.weight=null};e.prototype.containsPoint=function(t,e){var i=false;if(t>=this.x&&t<=this.width&&e>=this.y&&e<=this.height){for(var a=0,r=this.vertices.length,n=r-2;a=e||s=e){var l=this.vertices[n];var h=this.vertices[a];if((e-o)*(l-h)/(s-o)+h0){return}this.cacheFrameRate=Math.max(Math.ceil(t*this.scale),1);var e=Math.ceil(this.cacheFrameRate*this.duration)+1;this.cachedFrames.length=e;for(var i=0,a=this.cacheFrames.length;i=0};e.prototype.addBoneMask=function(t,e,i){if(i===void 0){i=true}var a=t.getBone(e);if(a===null){return}if(this.boneMask.indexOf(e)<0){this.boneMask.push(e)}if(i){for(var r=0,n=t.getBones();r=0){this.boneMask.splice(a,1)}if(i){var r=t.getBone(e);if(r!==null){if(this.boneMask.length>0){for(var n=0,s=t.getBones();n=0&&r.contains(o)){this.boneMask.splice(l,1)}}}else{for(var h=0,u=t.getBones();he._zOrder?1:-1};i.prototype._onClear=function(){if(this._clock!==null){this._clock.remove(this)}for(var t=0,e=this._bones;t=t){i=0}if(this._bones.indexOf(r)>=0){continue}if(r._hasConstraint){var n=false;for(var s=0,o=this._constraints;s=n){continue}var o=i[s];var l=this.getSlot(o.name);if(l!==null){l._setZorder(r)}}this._slotsDirty=true;this._zOrderDirty=!a}};i.prototype._addBoneToBoneList=function(t){if(this._bones.indexOf(t)<0){this._bonesDirty=true;this._bones.push(t)}};i.prototype._removeBoneFromBoneList=function(t){var e=this._bones.indexOf(t);if(e>=0){this._bones.splice(e,1)}};i.prototype._addSlotToSlotList=function(t){if(this._slots.indexOf(t)<0){this._slotsDirty=true;this._slots.push(t)}};i.prototype._removeSlotFromSlotList=function(t){var e=this._slots.indexOf(t);if(e>=0){this._slots.splice(e,1)}};i.prototype._bufferAction=function(t,e){if(this._actions.indexOf(t)<0){if(e){this._actions.push(t)}else{this._actions.unshift(t)}}};i.prototype.dispose=function(){if(this._armatureData!==null){this._lockUpdate=true;this._dragonBones.bufferObject(this)}};i.prototype.init=function(e,i,a,r){if(this._armatureData!==null){return}this._armatureData=e;this._animation=t.BaseObject.borrowObject(t.Animation);this._proxy=i;this._display=a;this._dragonBones=r;this._proxy.dbInit(this);this._animation.init(this);this._animation.animations=this._armatureData.animations};i.prototype.advanceTime=function(t){if(this._lockUpdate){return}if(this._armatureData===null){console.warn("The armature has been disposed.");return}else if(this._armatureData.parent===null){console.warn("The armature data has been disposed.\nPlease make sure dispose armature before call factory.clear().");return}var e=this._cacheFrameIndex;this._animation.advanceTime(t);if(this._bonesDirty){this._bonesDirty=false;this._sortBones()}if(this._slotsDirty){this._slotsDirty=false;this._sortSlots()}if(this._cacheFrameIndex<0||this._cacheFrameIndex!==e){var i=0,a=0;for(i=0,a=this._bones.length;i0){this._lockUpdate=true;for(var r=0,n=this._actions;r0){var i=this.getBone(t);if(i!==null){i.invalidUpdate();if(e){for(var a=0,r=this._slots;a0){if(r!==null||n!==null){if(r!==null){var A=o?r.y-e:r.x-t;if(A<0){A=-A}if(d===null||Ah){h=A;_=n.x;m=n.y;y=b;if(s!==null){c=s.y}}}}else{d=b;break}}}if(d!==null&&r!==null){r.x=u;r.y=f;if(s!==null){s.x=p}}if(y!==null&&n!==null){n.x=_;n.y=m;if(s!==null){s.y=c}}return d};i.prototype.getBone=function(t){for(var e=0,i=this._bones;e0?this.getBone(e):null)};i.prototype.addSlot=function(t,e){var i=this.getBone(e);console.assert(t!==null&&i!==null);t._setArmature(this);t._setParent(i)};i.prototype.addConstraint=function(t){if(this._constraints.indexOf(t)<0){this._constraints.push(t)}};i.prototype.removeBone=function(t){console.assert(t!==null&&t.armature===this);t._setParent(null);t._setArmature(null)};i.prototype.removeSlot=function(t){console.assert(t!==null&&t.armature===this);t._setParent(null);t._setArmature(null)};i.prototype.getBones=function(){return this._bones};i.prototype.getSlots=function(){return this._slots};Object.defineProperty(i.prototype,"flipX",{get:function(){return this._flipX},set:function(t){if(this._flipX===t){return}this._flipX=t;this.invalidUpdate()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"flipY",{get:function(){return this._flipY},set:function(t){if(this._flipY===t){return}this._flipY=t;this.invalidUpdate()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"cacheFrameRate",{get:function(){return this._armatureData.cacheFrameRate},set:function(t){if(this._armatureData.cacheFrameRate!==t){this._armatureData.cacheFrames(t);for(var e=0,i=this._slots;e=0&&this._cachedFrameIndices!==null){var e=this._cachedFrameIndices[t];if(e>=0&&this._cachedFrameIndex===e){this._transformDirty=false}else if(e>=0){this._transformDirty=true;this._cachedFrameIndex=e}else{if(this._hasConstraint){for(var i=0,a=this._armature._constraints;i=0){this._transformDirty=false;this._cachedFrameIndices[t]=this._cachedFrameIndex}else{this._transformDirty=true;this._cachedFrameIndex=-1}}}else{if(this._hasConstraint){for(var n=0,s=this._armature._constraints;n=0;if(this._localDirty){this._updateGlobalTransformMatrix(o)}if(o&&this._cachedFrameIndices!==null){this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global)}}else{this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex)}}else if(this._childrenTransformDirty){this._childrenTransformDirty=false}this._localDirty=true};i.prototype.updateByConstraint=function(){if(this._localDirty){this._localDirty=false;if(this._transformDirty||this._parent!==null&&this._parent._childrenTransformDirty){this._updateGlobalTransformMatrix(true)}this._transformDirty=true}};i.prototype.invalidUpdate=function(){this._transformDirty=true};i.prototype.contains=function(t){if(t===this){return false}var e=t;while(e!==this&&e!==null){e=e.parent}return e===this};Object.defineProperty(i.prototype,"boneData",{get:function(){return this._boneData},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(t){if(this._visible===t){return}this._visible=t;for(var e=0,i=this._armature.getSlots();e=0&&this._rawDisplayDatas!==null&&this._displayIndex=0&&this._displayIndex=0&&this._displayIndex=0&&this._rawDisplayDatas!==null&&this._displayIndex0){for(var o=0,l=n;o0){if(this._displayList.length!==e.length){this._displayList.length=e.length}for(var i=0,a=e.length;i0){this._displayList.length=0}if(this._displayIndex>=0&&this._displayIndex=0&&this._cachedFrameIndices!==null){var e=this._cachedFrameIndices[t];if(e>=0&&this._cachedFrameIndex===e){this._transformDirty=false}else if(e>=0){this._transformDirty=true;this._cachedFrameIndex=e}else if(this._transformDirty||this._parent._childrenTransformDirty){this._transformDirty=true;this._cachedFrameIndex=-1}else if(this._cachedFrameIndex>=0){this._transformDirty=false;this._cachedFrameIndices[t]=this._cachedFrameIndex}else{this._transformDirty=true;this._cachedFrameIndex=-1}}else if(this._transformDirty||this._parent._childrenTransformDirty){t=-1;this._transformDirty=true;this._cachedFrameIndex=-1}if(this._display===null){return}if(this._visibleDirty){this._visibleDirty=false;this._updateVisible()}if(this._blendModeDirty){this._blendModeDirty=false;this._updateBlendMode()}if(this._colorDirty){this._colorDirty=false;this._updateColor()}if(this._meshData!==null&&this._display===this._meshDisplay){var i=this._meshData.weight!==null;if(this._meshDirty||i&&this._isMeshBonesUpdate()){this._meshDirty=false;this._updateMesh()}if(i){if(this._transformDirty){this._transformDirty=false;this._updateTransform(true)}return}}if(this._transformDirty){this._transformDirty=false;if(this._cachedFrameIndex<0){var a=t>=0;this._updateGlobalTransformMatrix(a);if(a&&this._cachedFrameIndices!==null){this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global)}}else{this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex)}this._updateTransform(false)}};i.prototype.updateTransformAndMatrix=function(){if(this._transformDirty){this._transformDirty=false;this._updateGlobalTransformMatrix(false)}};i.prototype.replaceDisplayData=function(t,e){if(e===void 0){e=-1}if(e<0){if(this._displayIndex<0){e=0}else{e=this._displayIndex}}if(this._displayDatas.length<=e){this._displayDatas.length=e+1;for(var i=0,a=this._displayDatas.length;i0){if(l===1||l===2){if(n!==null){this.globalTransformMatrix.transformPoint(n.x,n.y,n);if(s!==null){s.x=n.x;s.y=n.y}}else if(s!==null){this.globalTransformMatrix.transformPoint(s.x,s.y,s)}}else{if(n!==null){this.globalTransformMatrix.transformPoint(n.x,n.y,n)}if(s!==null){this.globalTransformMatrix.transformPoint(s.x,s.y,s)}}if(o!==null){this.globalTransformMatrix.transformPoint(Math.cos(o.x),Math.sin(o.x),i._helpPoint,true);o.x=Math.atan2(i._helpPoint.y,i._helpPoint.x);this.globalTransformMatrix.transformPoint(Math.cos(o.y),Math.sin(o.y),i._helpPoint,true);o.y=Math.atan2(i._helpPoint.y,i._helpPoint.x)}}return l};i.prototype.invalidUpdate=function(){this._displayDirty=true;this._transformDirty=true};Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(t){if(this._visible===t){return}this._visible=t;this._updateVisible()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"displayIndex",{get:function(){return this._displayIndex},set:function(t){if(this._setDisplayIndex(t)){this.update(-1)}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"name",{get:function(){return this._slotData.name},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"displayList",{get:function(){return this._displayList.concat()},set:function(e){var i=this._displayList.concat();var a=new Array;if(this._setDisplayList(e)){this.update(-1)}for(var r=0,n=i;r0){this._animatebles[e-i]=r;this._animatebles[e]=null}r.advanceTime(t)}else{i++}}if(i>0){a=this._animatebles.length;for(;e=0){this._animatebles[e]=null;t.clock=null}};t.prototype.clear=function(){for(var t=0,e=this._animatebles;t0&&i._subFadeState>0){this._armature._dragonBones.bufferObject(i);this._animationStates.length=0;this._lastAnimationState=null}else{var a=i._animationData;var r=a.cacheFrameRate;if(this._animationDirty&&r>0){this._animationDirty=false;for(var n=0,s=this._armature.getBones();n1){for(var f=0,_=0;f0&&i._subFadeState>0){_++;this._armature._dragonBones.bufferObject(i);this._animationDirty=true;if(this._lastAnimationState===i){this._lastAnimationState=null}}else{if(_>0){this._animationStates[f-_]=i}i.advanceTime(t,0)}if(f===e-1&&_>0){this._animationStates.length-=_;if(this._lastAnimationState===null&&this._animationStates.length>0){this._lastAnimationState=this._animationStates[this._animationStates.length-1]}}}this._armature._cacheFrameIndex=-1}else{this._armature._cacheFrameIndex=-1}};i.prototype.reset=function(){for(var t=0,e=this._animationStates;t1){if(e.position<0){e.position%=a.duration;e.position=a.duration-e.position}else if(e.position===a.duration){e.position-=1e-6}else if(e.position>a.duration){e.position%=a.duration}if(e.duration>0&&e.position+e.duration>a.duration){e.duration=a.duration-e.position}if(e.playTimes<0){e.playTimes=a.playTimes}}else{e.playTimes=1;e.position=0;if(e.duration>0){e.duration=0}}if(e.duration===0){e.duration=-1}this._fadeOut(e);var o=t.BaseObject.borrowObject(t.AnimationState);o.init(this._armature,a,e);this._animationDirty=true;this._armature._cacheFrameIndex=-1;if(this._animationStates.length>0){var l=false;for(var h=0,u=this._animationStates.length;h=this._animationStates[h].layer){}else{l=true;this._animationStates.splice(h+1,0,o);break}}if(!l){this._animationStates.push(o)}}else{this._animationStates.push(o)}for(var f=0,_=this._armature.getSlots();f<_.length;f++){var m=_[f];var p=m.childArmature;if(p!==null&&p.inheritAnimation&&p.animation.hasAnimation(i)&&p.animation.getState(i)===null){p.animation.fadeIn(i)}}if(e.fadeInTime<=0){this._armature.advanceTime(0)}this._lastAnimationState=o;return o};i.prototype.play=function(t,e){if(t===void 0){t=null}if(e===void 0){e=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=e;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t!==null?t:"";if(t!==null&&t.length>0){this.playConfig(this._animationConfig)}else if(this._lastAnimationState===null){var i=this._armature.armatureData.defaultAnimation;if(i!==null){this._animationConfig.animation=i.name;this.playConfig(this._animationConfig)}}else if(!this._lastAnimationState.isPlaying&&!this._lastAnimationState.isCompleted){this._lastAnimationState.play()}else{this._animationConfig.animation=this._lastAnimationState.name;this.playConfig(this._animationConfig)}return this._lastAnimationState};i.prototype.fadeIn=function(t,e,i,a,r,n){if(e===void 0){e=-1}if(i===void 0){i=-1}if(a===void 0){a=0}if(r===void 0){r=null}if(n===void 0){n=3}this._animationConfig.clear();this._animationConfig.fadeOutMode=n;this._animationConfig.playTimes=i;this._animationConfig.layer=a;this._animationConfig.fadeInTime=e;this._animationConfig.animation=t;this._animationConfig.group=r!==null?r:"";return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByTime=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.position=e;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByFrame=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;var a=t in this._animations?this._animations[t]:null;if(a!==null){this._animationConfig.position=a.duration*e/a.frameCount}return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByProgress=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;var a=t in this._animations?this._animations[t]:null;if(a!==null){this._animationConfig.position=a.duration*(e>0?e:0)}return this.playConfig(this._animationConfig)};i.prototype.gotoAndStopByTime=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByTime(t,e,1);if(i!==null){i.stop()}return i};i.prototype.gotoAndStopByFrame=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByFrame(t,e,1);if(i!==null){i.stop()}return i};i.prototype.gotoAndStopByProgress=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByProgress(t,e,1);if(i!==null){i.stop()}return i};i.prototype.getState=function(t){var e=this._animationStates.length;while(e--){var i=this._animationStates[e];if(i.name===t){return i}}return null};i.prototype.hasAnimation=function(t){return t in this._animations};i.prototype.getStates=function(){return this._animationStates};Object.defineProperty(i.prototype,"isPlaying",{get:function(){for(var t=0,e=this._animationStates;t0},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"lastAnimationName",{get:function(){return this._lastAnimationState!==null?this._lastAnimationState.name:""},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationNames",{get:function(){return this._animationNames},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations},set:function(t){if(this._animations===t){return}this._animationNames.length=0;for(var e in this._animations){delete this._animations[e]}for(var e in t){this._animationNames.push(e);this._animations[e]=t[e]}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationConfig",{get:function(){this._animationConfig.clear();return this._animationConfig},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"lastAnimationState",{get:function(){return this._lastAnimationState},enumerable:true,configurable:true});i.prototype.gotoAndPlay=function(t,e,i,a,r,n,s,o,l){if(e===void 0){e=-1}if(i===void 0){i=-1}if(a===void 0){a=-1}if(r===void 0){r=0}if(n===void 0){n=null}if(s===void 0){s=3}if(o===void 0){o=true}if(l===void 0){l=true}o;l;this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.fadeOutMode=s;this._animationConfig.playTimes=a;this._animationConfig.layer=r;this._animationConfig.fadeInTime=e;this._animationConfig.animation=t;this._animationConfig.group=n!==null?n:"";var h=this._animations[t];if(h&&i>0){this._animationConfig.timeScale=h.duration/i}return this.playConfig(this._animationConfig)};i.prototype.gotoAndStop=function(t,e){if(e===void 0){e=0}return this.gotoAndStopByTime(t,e)};Object.defineProperty(i.prototype,"animationList",{get:function(){return this._animationNames},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationDataList",{get:function(){var t=[];for(var e=0,i=this._animationNames.length;e0;if(this._subFadeState<0){this._subFadeState=0;var a=i?t.EventObject.FADE_OUT:t.EventObject.FADE_IN;if(this._armature.eventDispatcher.hasDBEventListener(a)){var r=t.BaseObject.borrowObject(t.EventObject);r.type=a;r.armature=this._armature;r.animationState=this;this._armature._dragonBones.bufferEvent(r)}}if(e<0){e=-e}this._fadeTime+=e;if(this._fadeTime>=this.fadeTotalTime){this._subFadeState=1;this._fadeProgress=i?0:1}else if(this._fadeTime>0){this._fadeProgress=i?1-this._fadeTime/this.fadeTotalTime:this._fadeTime/this.fadeTotalTime}else{this._fadeProgress=i?1:0}if(this._subFadeState>0){if(!i){this._playheadState|=1;this._fadeState=0}var a=i?t.EventObject.FADE_OUT_COMPLETE:t.EventObject.FADE_IN_COMPLETE;if(this._armature.eventDispatcher.hasDBEventListener(a)){var r=t.BaseObject.borrowObject(t.EventObject);r.type=a;r.armature=this._armature;r.animationState=this;this._armature._dragonBones.bufferEvent(r)}}};a.prototype._blendBoneTimline=function(t){var e=this._weightResult>0?this._weightResult:-this._weightResult;var i=t.bone;var a=t.bonePose.result;var r=i.animationPose;if(!i._blendDirty){i._blendDirty=true;i._blendLayer=this.layer;i._blendLayerWeight=e;i._blendLeftWeight=1;r.x=a.x*e;r.y=a.y*e;r.rotation=a.rotation*e;r.skew=a.skew*e;r.scaleX=(a.scaleX-1)*e+1;r.scaleY=(a.scaleY-1)*e+1}else{e*=i._blendLeftWeight;i._blendLayerWeight+=e;r.x+=a.x*e;r.y+=a.y*e;r.rotation+=a.rotation*e;r.skew+=a.skew*e;r.scaleX+=(a.scaleX-1)*e;r.scaleY+=(a.scaleY-1)*e}if(this._fadeState!==0||this._subFadeState!==0){i._transformDirty=true}};a.prototype.init=function(e,i,a){if(this._armature!==null){return}this._armature=e;this._animationData=i;this.resetToPose=a.resetToPose;this.additiveBlending=a.additiveBlending;this.displayControl=a.displayControl;this.actionEnabled=a.actionEnabled;this.layer=a.layer;this.playTimes=a.playTimes;this.timeScale=a.timeScale;this.fadeTotalTime=a.fadeInTime;this.autoFadeOutTime=a.autoFadeOutTime;this.weight=a.weight;this.name=a.name.length>0?a.name:a.animation;this.group=a.group;if(a.pauseFadeIn){this._playheadState=2}else{this._playheadState=3}if(a.duration<0){this._position=0;this._duration=this._animationData.duration;if(a.position!==0){if(this.timeScale>=0){this._time=a.position}else{this._time=a.position-this._duration}}else{this._time=0}}else{this._position=a.position;this._duration=a.duration;this._time=0}if(this.timeScale<0&&this._time===0){this._time=-1e-6}if(this.fadeTotalTime<=0){this._fadeProgress=.999999}if(a.boneMask.length>0){this._boneMask.length=a.boneMask.length;for(var r=0,n=this._boneMask.length;r0;var r=true;var n=true;var s=this._time;this._weightResult=this.weight*this._fadeProgress;if(this._actionTimeline.playState<=0){this._actionTimeline.update(s)}if(a){var o=i*2;this._actionTimeline.currentTime=Math.floor(this._actionTimeline.currentTime*o)/o}if(this._zOrderTimeline!==null&&this._zOrderTimeline.playState<=0){this._zOrderTimeline.update(s)}if(a){var l=Math.floor(this._actionTimeline.currentTime*i);if(this._armature._cacheFrameIndex===l){r=false;n=false}else{this._armature._cacheFrameIndex=l;if(this._animationData.cachedFrames[l]){n=false}else{this._animationData.cachedFrames[l]=true}}}if(r){if(n){var h=null;var u=null;for(var f=0,_=this._boneTimelines.length;f<_;++f){var m=this._boneTimelines[f];if(h!==m.bone){if(h!==null){this._blendBoneTimline(u);if(h._blendDirty){if(h._blendLeftWeight>0){if(h._blendLayer!==this.layer){if(h._blendLayerWeight>=h._blendLeftWeight){h._blendLeftWeight=0;h=null}else{h._blendLayer=this.layer;h._blendLeftWeight-=h._blendLayerWeight;h._blendLayerWeight=0}}}else{h=null}}}h=m.bone}if(h!==null){if(m.playState<=0){m.update(s)}if(f===_-1){this._blendBoneTimline(m)}else{u=m}}}}if(this.displayControl){for(var f=0,_=this._slotTimelines.length;f<_;++f){var m=this._slotTimelines[f];var p=m.slot.displayController;if(p===null||p===this.name||p===this.group){if(m.playState<=0){m.update(s)}}}}for(var f=0,_=this._constraintTimelines.length;f<_;++f){var m=this._constraintTimelines[f];if(m.playState<=0){m.update(s)}}}if(this._fadeState===0){if(this._subFadeState>0){this._subFadeState=0;if(this._poseTimelines.length>0){for(var c=0,d=this._poseTimelines;c0){if(this.autoFadeOutTime>=0){this.fadeOut(this.autoFadeOutTime)}}}};a.prototype.play=function(){this._playheadState=3};a.prototype.stop=function(){this._playheadState&=1};a.prototype.fadeOut=function(t,e){if(e===void 0){e=true}if(t<0){t=0}if(e){this._playheadState&=2}if(this._fadeState>0){if(t>this.fadeTotalTime-this._fadeTime){return}}else{this._fadeState=1;this._subFadeState=-1;if(t<=0||this._fadeProgress<=0){this._fadeProgress=1e-6}for(var i=0,a=this._boneTimelines;i1e-6?t/this._fadeProgress:0;this._fadeTime=this.fadeTotalTime*(1-this._fadeProgress)};a.prototype.containsBoneMask=function(t){return this._boneMask.length===0||this._boneMask.indexOf(t)>=0};a.prototype.addBoneMask=function(t,e){if(e===void 0){e=true}var i=this._armature.getBone(t);if(i===null){return}if(this._boneMask.indexOf(t)<0){this._boneMask.push(t)}if(e){for(var a=0,r=this._armature.getBones();a=0){this._boneMask.splice(i,1)}if(e){var a=this._armature.getBone(t);if(a!==null){var r=this._armature.getBones();if(this._boneMask.length>0){for(var n=0,s=r;n=0&&a.contains(o)){this._boneMask.splice(l,1)}}}else{for(var h=0,u=r;h0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"isFadeComplete",{get:function(){return this._fadeState===0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"isPlaying",{get:function(){return(this._playheadState&2)!==0&&this._actionTimeline.playState<=0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"isCompleted",{get:function(){return this._actionTimeline.playState>0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"currentPlayTimes",{get:function(){return this._actionTimeline.currentPlayTimes},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"totalTime",{get:function(){return this._duration},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"currentTime",{get:function(){return this._actionTimeline.currentTime},set:function(t){var e=this._actionTimeline.currentPlayTimes-(this._actionTimeline.playState>0?1:0);if(t<0||this._duration0&&e===this.playTimes-1&&t===this._duration){t=this._duration-1e-6}if(this._time===t){return}this._time=t;this._actionTimeline.setCurrentTime(this._time);if(this._zOrderTimeline!==null){this._zOrderTimeline.playState=-1}for(var i=0,a=this._boneTimelines;i=0?1:-1;this.currentPlayTimes=1;this.currentTime=this._actionTimeline.currentTime}else if(this._actionTimeline===null||this._timeScale!==1||this._timeOffset!==0){var r=this._animationState.playTimes;var n=r*this._duration;t*=this._timeScale;if(this._timeOffset!==0){t+=this._timeOffset*this._animationData.duration}if(r>0&&(t>=n||t<=-n)){if(this.playState<=0&&this._animationState._playheadState===3){this.playState=1}this.currentPlayTimes=r;if(t<0){this.currentTime=0}else{this.currentTime=this._duration}}else{if(this.playState!==0&&this._animationState._playheadState===3){this.playState=0}if(t<0){t=-t;this.currentPlayTimes=Math.floor(t/this._duration);this.currentTime=this._duration-t%this._duration}else{this.currentPlayTimes=Math.floor(t/this._duration);this.currentTime=t%this._duration}}this.currentTime+=this._position}else{this.playState=this._actionTimeline.playState;this.currentPlayTimes=this._actionTimeline.currentPlayTimes;this.currentTime=this._actionTimeline.currentTime}if(this.currentPlayTimes===i&&this.currentTime===a){return false}if(e<0&&this.playState!==e||this.playState<=0&&this.currentPlayTimes!==i){this._frameIndex=-1}return true};e.prototype.init=function(t,e,i){this._armature=t;this._animationState=e;this._timelineData=i;this._actionTimeline=this._animationState._actionTimeline;if(this===this._actionTimeline){this._actionTimeline=null}this._animationData=this._animationState._animationData;this._frameRate=this._animationData.parent.frameRate;this._frameRateR=1/this._frameRate;this._position=this._animationState._position;this._duration=this._animationState._duration;this._dragonBonesData=this._animationData.parent.parent;if(this._timelineData!==null){this._frameIntArray=this._dragonBonesData.frameIntArray;this._frameFloatArray=this._dragonBonesData.frameFloatArray;this._frameArray=this._dragonBonesData.frameArray;this._timelineArray=this._dragonBonesData.timelineArray;this._frameIndices=this._dragonBonesData.frameIndices;this._frameCount=this._timelineArray[this._timelineData.offset+2];this._frameValueOffset=this._timelineArray[this._timelineData.offset+4];this._timeScale=100/this._timelineArray[this._timelineData.offset+0];this._timeOffset=this._timelineArray[this._timelineData.offset+1]*.01}};e.prototype.fadeOut=function(){};e.prototype.update=function(t){if(this._setCurrentTime(t)){if(this._frameCount>1){var e=Math.floor(this.currentTime*this._frameRate);var i=this._frameIndices[this._timelineData.frameIndicesOffset+e];if(this._frameIndex!==i){this._frameIndex=i;this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+this._frameIndex];this._onArriveAtFrame()}}else if(this._frameIndex<0){this._frameIndex=0;if(this._timelineData!==null){this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5]}this._onArriveAtFrame()}if(this._tweenState!==0){this._onUpdateFrame()}}};return e}(t.BaseObject);t.TimelineState=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e._getEasingValue=function(t,e,i){var a=e;switch(t){case 3:a=Math.pow(e,2);break;case 4:a=1-Math.pow(1-e,2);break;case 5:a=.5*(1-Math.cos(e*Math.PI));break}return(a-e)*i+e};e._getEasingCurveValue=function(t,e,i,a){if(t<=0){return 0}else if(t>=1){return 1}var r=i+1;var n=Math.floor(t*r);var s=n===0?0:e[a+n-1];var o=n===r-1?1e4:e[a+n];return(s+(o-s)*(t*r-n))*1e-4};e.prototype._onClear=function(){t.prototype._onClear.call(this);this._tweenType=0;this._curveCount=0;this._framePosition=0;this._frameDurationR=0;this._tweenProgress=0;this._tweenEasing=0};e.prototype._onArriveAtFrame=function(){if(this._frameCount>1&&(this._frameIndex!==this._frameCount-1||this._animationState.playTimes===0||this._animationState.currentPlayTimes0){this._frameDurationR=1/e}else{this._frameDurationR=0}}}else{this._tweenState=1}};e.prototype._onUpdateFrame=function(){if(this._tweenState===2){this._tweenProgress=(this.currentTime-this._framePosition)*this._frameDurationR;if(this._tweenType===2){this._tweenProgress=e._getEasingCurveValue(this._tweenProgress,this._frameArray,this._curveCount,this._frameOffset+3)}else if(this._tweenType!==1){this._tweenProgress=e._getEasingValue(this._tweenType,this._tweenProgress,this._tweenEasing)}}else{this._tweenProgress=0}};return e}(e);t.TweenTimelineState=i;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.bone=null;this.bonePose=null};return e}(i);t.BoneTimelineState=a;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.slot=null};return e}(i);t.SlotTimelineState=r;var n=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.constraint=null};return e}(i);t.ConstraintTimelineState=n})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.ActionTimelineState]"};i.prototype._onCrossFrame=function(e){var i=this._armature.eventDispatcher;if(this._animationState.actionEnabled){var a=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+e];var r=this._frameArray[a+1];var n=this._animationData.parent.actions;for(var s=0;s0){if(n.hasDBEventListener(t.EventObject.COMPLETE)){h=t.BaseObject.borrowObject(t.EventObject);h.type=t.EventObject.COMPLETE;h.armature=this._armature;h.animationState=this._animationState}}}if(this._frameCount>1){var u=this._timelineData;var f=Math.floor(this.currentTime*this._frameRate);var _=this._frameIndices[u.frameIndicesOffset+f];if(this._frameIndex!==_){var m=this._frameIndex;this._frameIndex=_;if(this._timelineArray!==null){this._frameOffset=this._animationData.frameOffset+this._timelineArray[u.offset+5+this._frameIndex];if(o){if(m<0){var p=Math.floor(r*this._frameRate);m=this._frameIndices[u.frameIndicesOffset+p];if(this.currentPlayTimes===a){if(m===_){m=-1}}}while(m>=0){var c=this._animationData.frameOffset+this._timelineArray[u.offset+5+m];var d=this._frameArray[c]/this._frameRate;if(this._position<=d&&d<=this._position+this._duration){this._onCrossFrame(m)}if(l!==null&&m===0){this._armature._dragonBones.bufferEvent(l);l=null}if(m>0){m--}else{m=this._frameCount-1}if(m===_){break}}}else{if(m<0){var p=Math.floor(r*this._frameRate);m=this._frameIndices[u.frameIndicesOffset+p];var c=this._animationData.frameOffset+this._timelineArray[u.offset+5+m];var d=this._frameArray[c]/this._frameRate;if(this.currentPlayTimes===a){if(r<=d){if(m>0){m--}else{m=this._frameCount-1}}else if(m===_){m=-1}}}while(m>=0){if(m=0){var t=this._frameArray[this._frameOffset+1];if(t>0){this._armature._sortZOrder(this._frameArray,this._frameOffset+2)}else{this._armature._sortZOrder(null,0)}}};e.prototype._onUpdateFrame=function(){};return e}(t.TimelineState);t.ZOrderTimelineState=i;var a=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.BoneAllTimelineState]"};i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var t=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*6;var i=this._armature._armatureData.scale;var a=this._frameFloatArray;var r=this.bonePose.current;var n=this.bonePose.delta;r.x=a[t++]*i;r.y=a[t++]*i;r.rotation=a[t++];r.skew=a[t++];r.scaleX=a[t++];r.scaleY=a[t++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){t=this._animationData.frameFloatOffset+this._frameValueOffset}n.x=a[t++]*i-r.x;n.y=a[t++]*i-r.y;n.rotation=a[t++]-r.rotation;n.skew=a[t++]-r.skew;n.scaleX=a[t++]-r.scaleX;n.scaleY=a[t++]-r.scaleY}else{n.x=0;n.y=0;n.rotation=0;n.skew=0;n.scaleX=0;n.scaleY=0}}else{var r=this.bonePose.current;var n=this.bonePose.delta;r.x=0;r.y=0;r.rotation=0;r.skew=0;r.scaleX=1;r.scaleY=1;n.x=0;n.y=0;n.rotation=0;n.skew=0;n.scaleX=0;n.scaleY=0}};i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.bonePose.current;var i=this.bonePose.delta;var a=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}a.x=t.x+i.x*this._tweenProgress;a.y=t.y+i.y*this._tweenProgress;a.rotation=t.rotation+i.rotation*this._tweenProgress;a.skew=t.skew+i.skew*this._tweenProgress;a.scaleX=t.scaleX+i.scaleX*this._tweenProgress;a.scaleY=t.scaleY+i.scaleY*this._tweenProgress};i.prototype.fadeOut=function(){var e=this.bonePose.result;e.rotation=t.Transform.normalizeRadian(e.rotation);e.skew=t.Transform.normalizeRadian(e.skew)};return i}(t.BoneTimelineState);t.BoneAllTimelineState=a;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.BoneTranslateTimelineState]"};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*2;var i=this._armature._armatureData.scale;var a=this._frameFloatArray;var r=this.bonePose.current;var n=this.bonePose.delta;r.x=a[e++]*i;r.y=a[e++]*i;if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){e=this._animationData.frameFloatOffset+this._frameValueOffset}n.x=a[e++]*i-r.x;n.y=a[e++]*i-r.y}else{n.x=0;n.y=0}}else{var r=this.bonePose.current;var n=this.bonePose.delta;r.x=0;r.y=0;n.x=0;n.y=0}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);var e=this.bonePose.current;var i=this.bonePose.delta;var a=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}a.x=e.x+i.x*this._tweenProgress;a.y=e.y+i.y*this._tweenProgress};return e}(t.BoneTimelineState);t.BoneTranslateTimelineState=r;var n=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.BoneRotateTimelineState]"};i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var t=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*2;var i=this._frameFloatArray;var a=this.bonePose.current;var r=this.bonePose.delta;a.rotation=i[t++];a.skew=i[t++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){t=this._animationData.frameFloatOffset+this._frameValueOffset}r.rotation=i[t++]-a.rotation;r.skew=i[t++]-a.skew}else{r.rotation=0;r.skew=0}}else{var a=this.bonePose.current;var r=this.bonePose.delta;a.rotation=0;a.skew=0;r.rotation=0;r.skew=0}};i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.bonePose.current;var i=this.bonePose.delta;var a=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}a.rotation=t.rotation+i.rotation*this._tweenProgress;a.skew=t.skew+i.skew*this._tweenProgress};i.prototype.fadeOut=function(){var e=this.bonePose.result;e.rotation=t.Transform.normalizeRadian(e.rotation);e.skew=t.Transform.normalizeRadian(e.skew)};return i}(t.BoneTimelineState);t.BoneRotateTimelineState=n;var s=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.BoneScaleTimelineState]"};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*2;var i=this._frameFloatArray;var a=this.bonePose.current;var r=this.bonePose.delta;a.scaleX=i[e++];a.scaleY=i[e++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){e=this._animationData.frameFloatOffset+this._frameValueOffset}r.scaleX=i[e++]-a.scaleX;r.scaleY=i[e++]-a.scaleY}else{r.scaleX=0;r.scaleY=0}}else{var a=this.bonePose.current;var r=this.bonePose.delta;a.scaleX=1;a.scaleY=1;r.scaleX=0;r.scaleY=0}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);var e=this.bonePose.current;var i=this.bonePose.delta;var a=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}a.scaleX=e.scaleX+i.scaleX*this._tweenProgress;a.scaleY=e.scaleY+i.scaleY*this._tweenProgress};return e}(t.BoneTimelineState);t.BoneScaleTimelineState=s;var o=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.SlotDislayTimelineState]"};e.prototype._onArriveAtFrame=function(){if(this.playState>=0){var t=this._timelineData!==null?this._frameArray[this._frameOffset+1]:this.slot._slotData.displayIndex;if(this.slot.displayIndex!==t){this.slot._setDisplayIndex(t,true)}}};return e}(t.SlotTimelineState);t.SlotDislayTimelineState=o;var l=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e._current=[0,0,0,0,0,0,0,0];e._delta=[0,0,0,0,0,0,0,0];e._result=[0,0,0,0,0,0,0,0];return e}e.toString=function(){return"[class dragonBones.SlotColorTimelineState]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this._dirty=false};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._dragonBonesData.intArray;var i=this._frameIntArray;var a=this._animationData.frameIntOffset+this._frameValueOffset+this._frameIndex*1;var r=i[a];if(r<0){r+=32767}this._current[0]=e[r++];this._current[1]=e[r++];this._current[2]=e[r++];this._current[3]=e[r++];this._current[4]=e[r++];this._current[5]=e[r++];this._current[6]=e[r++];this._current[7]=e[r++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){r=i[this._animationData.frameIntOffset+this._frameValueOffset]}else{r=i[a+1*1]}if(r<0){r+=32767}this._delta[0]=e[r++]-this._current[0];this._delta[1]=e[r++]-this._current[1];this._delta[2]=e[r++]-this._current[2];this._delta[3]=e[r++]-this._current[3];this._delta[4]=e[r++]-this._current[4];this._delta[5]=e[r++]-this._current[5];this._delta[6]=e[r++]-this._current[6];this._delta[7]=e[r++]-this._current[7]}}else{var n=this.slot._slotData.color;this._current[0]=n.alphaMultiplier*100;this._current[1]=n.redMultiplier*100;this._current[2]=n.greenMultiplier*100;this._current[3]=n.blueMultiplier*100;this._current[4]=n.alphaOffset;this._current[5]=n.redOffset;this._current[6]=n.greenOffset;this._current[7]=n.blueOffset}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);this._dirty=true;if(this._tweenState!==2){this._tweenState=0}this._result[0]=(this._current[0]+this._delta[0]*this._tweenProgress)*.01;this._result[1]=(this._current[1]+this._delta[1]*this._tweenProgress)*.01;this._result[2]=(this._current[2]+this._delta[2]*this._tweenProgress)*.01;this._result[3]=(this._current[3]+this._delta[3]*this._tweenProgress)*.01;this._result[4]=this._current[4]+this._delta[4]*this._tweenProgress;this._result[5]=this._current[5]+this._delta[5]*this._tweenProgress;this._result[6]=this._current[6]+this._delta[6]*this._tweenProgress;this._result[7]=this._current[7]+this._delta[7]*this._tweenProgress};e.prototype.fadeOut=function(){this._tweenState=0;this._dirty=false};e.prototype.update=function(e){t.prototype.update.call(this,e);if(this._tweenState!==0||this._dirty){var i=this.slot._colorTransform;if(this._animationState._fadeState!==0||this._animationState._subFadeState!==0){if(i.alphaMultiplier!==this._result[0]||i.redMultiplier!==this._result[1]||i.greenMultiplier!==this._result[2]||i.blueMultiplier!==this._result[3]||i.alphaOffset!==this._result[4]||i.redOffset!==this._result[5]||i.greenOffset!==this._result[6]||i.blueOffset!==this._result[7]){var a=Math.pow(this._animationState._fadeProgress,4);i.alphaMultiplier+=(this._result[0]-i.alphaMultiplier)*a;i.redMultiplier+=(this._result[1]-i.redMultiplier)*a;i.greenMultiplier+=(this._result[2]-i.greenMultiplier)*a;i.blueMultiplier+=(this._result[3]-i.blueMultiplier)*a;i.alphaOffset+=(this._result[4]-i.alphaOffset)*a;i.redOffset+=(this._result[5]-i.redOffset)*a;i.greenOffset+=(this._result[6]-i.greenOffset)*a;i.blueOffset+=(this._result[7]-i.blueOffset)*a;this.slot._colorDirty=true}}else if(this._dirty){this._dirty=false;if(i.alphaMultiplier!==this._result[0]||i.redMultiplier!==this._result[1]||i.greenMultiplier!==this._result[2]||i.blueMultiplier!==this._result[3]||i.alphaOffset!==this._result[4]||i.redOffset!==this._result[5]||i.greenOffset!==this._result[6]||i.blueOffset!==this._result[7]){i.alphaMultiplier=this._result[0];i.redMultiplier=this._result[1];i.greenMultiplier=this._result[2];i.blueMultiplier=this._result[3];i.alphaOffset=this._result[4];i.redOffset=this._result[5];i.greenOffset=this._result[6];i.blueOffset=this._result[7];this.slot._colorDirty=true}}}};return e}(t.SlotTimelineState);t.SlotColorTimelineState=l;var h=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e._current=[];e._delta=[];e._result=[];return e}e.toString=function(){return"[class dragonBones.SlotFFDTimelineState]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.meshOffset=0;this._dirty=false;this._frameFloatOffset=0;this._valueCount=0;this._ffdCount=0;this._valueOffset=0;this._current.length=0;this._delta.length=0;this._result.length=0};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*this._valueCount;var i=this._armature._armatureData.scale;var a=this._frameFloatArray;if(this._tweenState===2){var r=e+this._valueCount;if(this._frameIndex===this._frameCount-1){r=this._animationData.frameFloatOffset+this._frameValueOffset}for(var n=0;n255){return encodeURI(r)}}}return r}return String(r)}return a};a.prototype._getCurvePoint=function(t,e,i,a,r,n,s,o,l,h){var u=1-l;var f=u*u;var _=l*l;var m=u*f;var p=3*l*f;var c=3*u*_;var d=l*_;h.x=m*t+p*i+c*r+d*s;h.y=m*e+p*a+c*n+d*o};a.prototype._samplingEasingCurve=function(t,e){var i=t.length;var a=-2;for(var r=0,n=e.length;r=0&&a+61e-4){var v=(y+d)*.5;this._getCurvePoint(l,h,u,f,_,m,p,c,v,this._helpPoint);if(s-this._helpPoint.x>0){d=v}else{y=v}}e[r]=this._helpPoint.y}};a.prototype._parseActionDataInFrame=function(t,e,i,r){if(a.EVENT in t){this._mergeActionFrame(t[a.EVENT],e,10,i,r)}if(a.SOUND in t){this._mergeActionFrame(t[a.SOUND],e,11,i,r)}if(a.ACTION in t){this._mergeActionFrame(t[a.ACTION],e,0,i,r)}if(a.EVENTS in t){this._mergeActionFrame(t[a.EVENTS],e,10,i,r)}if(a.ACTIONS in t){this._mergeActionFrame(t[a.ACTIONS],e,0,i,r)}};a.prototype._mergeActionFrame=function(e,a,r,n,s){var o=t.DragonBones.webAssembly?this._armature.actions.size():this._armature.actions.length;var l=this._parseActionData(e,r,n,s);var h=0;var u=null;for(var f=0,_=l;f<_.length;f++){var m=_[f];this._armature.addAction(m,false)}if(this._actionFrames.length===0){u=new i;u.frameStart=0;this._actionFrames.push(u);u=null}for(var p=0,c=this._actionFrames;pa){break}h++}if(u===null){u=new i;u.frameStart=a;this._actionFrames.splice(h+1,0,u)}for(var y=0;y0){var p=r.getBone(_);if(p!==null){m.parent=p}else{if(!(_ in this._cacheBones)){this._cacheBones[_]=[]}this._cacheBones[_].push(m)}}if(m.name in this._cacheBones){for(var c=0,d=this._cacheBones[m.name];c0){n.root=i.parent}return n};a.prototype._parseSlot=function(e,i){var r=t.BaseObject.borrowObject(t.SlotData);r.displayIndex=a._getNumber(e,a.DISPLAY_INDEX,0);r.zOrder=i;r.name=a._getString(e,a.NAME,"");r.parent=this._armature.getBone(a._getString(e,a.PARENT,""));if(a.BLEND_MODE in e&&typeof e[a.BLEND_MODE]==="string"){r.blendMode=a._getBlendMode(e[a.BLEND_MODE])}else{r.blendMode=a._getNumber(e,a.BLEND_MODE,0)}if(a.COLOR in e){r.color=t.SlotData.createColor();this._parseColorTransform(e[a.COLOR],r.color)}else{r.color=t.SlotData.DEFAULT_COLOR}if(a.ACTIONS in e){this._slotChildActions[r.name]=this._parseActionData(e[a.ACTIONS],0,null,null)}return r};a.prototype._parseSkin=function(e){var i=t.BaseObject.borrowObject(t.SkinData);i.name=a._getString(e,a.NAME,a.DEFAULT_NAME);if(i.name.length===0){i.name=a.DEFAULT_NAME}if(a.SLOT in e){var r=e[a.SLOT];this._skin=i;for(var n=0,s=r;n0?r:i;this._parsePivot(e,o);break;case 1:var l=s=t.BaseObject.borrowObject(t.ArmatureDisplayData);l.name=i;l.path=r.length>0?r:i;l.inheritAnimation=true;if(a.ACTIONS in e){var h=this._parseActionData(e[a.ACTIONS],0,null,null);for(var u=0,f=h;u0?r:i;y.inheritAnimation=a._getBoolean(e,a.INHERIT_FFD,true);this._parsePivot(e,y);if(d.length>0){var v=a._getString(e,a.SKIN,"");var g=this._slot.name;if(v.length===0){v=a.DEFAULT_NAME}if(!(v in this._cacheMeshs)){this._cacheMeshs[v]={}}var b=this._cacheMeshs[v];if(!(g in b)){b[g]={}}var T=b[g];if(!(d in T)){T[d]=[]}T[d].push(y)}else{this._parseMesh(e,y)}break;case 3:var A=this._parseBoundingBox(e);if(A!==null){var D=s=t.BaseObject.borrowObject(t.BoundingBoxDisplayData);D.name=i;D.path=r.length>0?r:i;D.boundingBox=A}break}if(s!==null){if(a.TRANSFORM in e){this._parseTransform(e[a.TRANSFORM],s.transform,this._armature.scale)}}return s};a.prototype._parsePivot=function(t,e){if(a.PIVOT in t){var i=t[a.PIVOT];e.pivot.x=a._getNumber(i,a.X,0);e.pivot.y=a._getNumber(i,a.Y,0)}else{e.pivot.x=.5;e.pivot.y=.5}};a.prototype._parseMesh=function(e,i){var r=e[a.VERTICES];var n=e[a.UVS];var s=e[a.TRIANGLES];var o=Math.floor(r.length/2);var l=Math.floor(s.length/3);var h=this._floatArray.length;var u=h+o*2;var f=this._intArray.length;i.offset=f;this._intArray.length+=1+1+1+1+l*3;this._intArray[f+0]=o;this._intArray[f+1]=l;this._intArray[f+2]=h;for(var _=0,m=l*3;_i.width){i.width=l}if(hi.height){i.height=h}}}}else{console.warn("Data error.\n Please reexport DragonBones Data to fixed the bug.")}return i};a.prototype._parseAnimation=function(e){var i=t.BaseObject.borrowObject(t.AnimationData);i.frameCount=Math.max(a._getNumber(e,a.DURATION,1),1);i.playTimes=a._getNumber(e,a.PLAY_TIMES,1);i.duration=i.frameCount/this._armature.frameRate;i.fadeInTime=a._getNumber(e,a.FADE_IN_TIME,0);i.scale=a._getNumber(e,a.SCALE,1);i.name=a._getString(e,a.NAME,a.DEFAULT_NAME);if(i.name.length===0){i.name=a.DEFAULT_NAME}i.frameIntOffset=this._frameIntArray.length;i.frameFloatOffset=this._frameFloatArray.length;i.frameOffset=this._frameArray.length;this._animation=i;if(a.FRAME in e){var r=e[a.FRAME];var n=r.length;if(n>0){for(var s=0,o=0;s0){this._animation.actionTimeline=this._parseTimeline(null,this._actionFrames,"",0,false,false,0,this._parseActionFrame);this._actionFrames.length=0}this._animation=null;return i};a.prototype._parseTimeline=function(e,r,n,s,o,l,h,u){if(e!==null&&n.length>0&&n in e){r=e[n]}if(r===null){return null}var f=r.length;if(f===0){return null}var _=this._frameIntArray.length;var m=this._frameFloatArray.length;var p=t.BaseObject.borrowObject(t.TimelineData);var c=this._timelineArray.length;this._timelineArray.length+=1+1+1+1+1+f;if(e!==null){this._timelineArray[c+0]=Math.round(a._getNumber(e,a.SCALE,1)*100);this._timelineArray[c+1]=Math.round(a._getNumber(e,a.OFFSET,0)*100)}else{this._timelineArray[c+0]=100;this._timelineArray[c+1]=0}this._timelineArray[c+2]=f;this._timelineArray[c+3]=h;if(o){this._timelineArray[c+4]=_-this._animation.frameIntOffset}else if(l){this._timelineArray[c+4]=m-this._animation.frameFloatOffset}else{this._timelineArray[c+4]=0}this._timeline=p;p.type=s;p.offset=c;if(f===1){p.frameIndicesOffset=-1;this._timelineArray[c+5+0]=u.call(this,r[0],0,0)-this._animation.frameOffset}else{var d=this._animation.frameCount+1;var y=this._data.frameIndices;var v=0;if(t.DragonBones.webAssembly){v=y.size();y.resize(v+d,0)}else{v=y.length;y.length+=d}p.frameIndicesOffset=v;for(var g=0,b=0,T=0,A=0;g0){if(a.CURVE in t){var n=i+1;this._helpArray.length=n;this._samplingEasingCurve(t[a.CURVE],this._helpArray);this._frameArray.length+=1+1+this._helpArray.length;this._frameArray[r+1]=2;this._frameArray[r+2]=n;for(var s=0;s0){var s=this._armature.sortedSlots.length;var o=new Array(s-n.length/2);var l=new Array(s);for(var h=0;h0?n>=this._prevRotation:n<=this._prevRotation){this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1}n=this._prevRotation+n-this._prevRotation+t.Transform.PI_D*this._prevClockwise}}this._prevClockwise=a._getNumber(e,a.TWEEN_ROTATE,0);this._prevRotation=n;var s=this._parseTweenFrame(e,i,r);var o=this._frameFloatArray.length;this._frameFloatArray.length+=6;this._frameFloatArray[o++]=this._helpTransform.x;this._frameFloatArray[o++]=this._helpTransform.y;this._frameFloatArray[o++]=n;this._frameFloatArray[o++]=this._helpTransform.skew;this._frameFloatArray[o++]=this._helpTransform.scaleX;this._frameFloatArray[o++]=this._helpTransform.scaleY;this._parseActionDataInFrame(e,i,this._bone,this._slot);return s};a.prototype._parseBoneTranslateFrame=function(t,e,i){var r=this._parseTweenFrame(t,e,i);var n=this._frameFloatArray.length;this._frameFloatArray.length+=2;this._frameFloatArray[n++]=a._getNumber(t,a.X,0);this._frameFloatArray[n++]=a._getNumber(t,a.Y,0);return r};a.prototype._parseBoneRotateFrame=function(e,i,r){var n=a._getNumber(e,a.ROTATE,0)*t.Transform.DEG_RAD;if(i!==0){if(this._prevClockwise===0){n=this._prevRotation+t.Transform.normalizeRadian(n-this._prevRotation)}else{if(this._prevClockwise>0?n>=this._prevRotation:n<=this._prevRotation){this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1}n=this._prevRotation+n-this._prevRotation+t.Transform.PI_D*this._prevClockwise}}this._prevClockwise=a._getNumber(e,a.CLOCK_WISE,0);this._prevRotation=n;var s=this._parseTweenFrame(e,i,r);var o=this._frameFloatArray.length;this._frameFloatArray.length+=2;this._frameFloatArray[o++]=n;this._frameFloatArray[o++]=a._getNumber(e,a.SKEW,0)*t.Transform.DEG_RAD;return s};a.prototype._parseBoneScaleFrame=function(t,e,i){var r=this._parseTweenFrame(t,e,i);var n=this._frameFloatArray.length;this._frameFloatArray.length+=2;this._frameFloatArray[n++]=a._getNumber(t,a.X,1);this._frameFloatArray[n++]=a._getNumber(t,a.Y,1);return r};a.prototype._parseSlotDisplayFrame=function(t,e,i){var r=this._parseFrame(t,e,i);this._frameArray.length+=1;if(a.VALUE in t){this._frameArray[r+1]=a._getNumber(t,a.VALUE,0)}else{this._frameArray[r+1]=a._getNumber(t,a.DISPLAY_INDEX,0)}this._parseActionDataInFrame(t,e,this._slot.parent,this._slot);return r};a.prototype._parseSlotColorFrame=function(t,e,i){var r=this._parseTweenFrame(t,e,i);var n=-1;if(a.VALUE in t||a.COLOR in t){var s=a.VALUE in t?t[a.VALUE]:t[a.COLOR];for(var o in s){o;this._parseColorTransform(s,this._helpColorTransform);n=this._intArray.length;this._intArray.length+=8;this._intArray[n++]=Math.round(this._helpColorTransform.alphaMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.redMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.greenMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.blueMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.alphaOffset);this._intArray[n++]=Math.round(this._helpColorTransform.redOffset);this._intArray[n++]=Math.round(this._helpColorTransform.greenOffset);this._intArray[n++]=Math.round(this._helpColorTransform.blueOffset);n-=8;break}}if(n<0){if(this._defaultColorOffset<0){this._defaultColorOffset=n=this._intArray.length;this._intArray.length+=8;this._intArray[n++]=100;this._intArray[n++]=100;this._intArray[n++]=100;this._intArray[n++]=100;this._intArray[n++]=0;this._intArray[n++]=0;this._intArray[n++]=0;this._intArray[n++]=0}n=this._defaultColorOffset}var l=this._frameIntArray.length;this._frameIntArray.length+=1;this._frameIntArray[l]=n;return r};a.prototype._parseSlotFFDFrame=function(t,e,i){var r=this._frameFloatArray.length;var n=this._parseTweenFrame(t,e,i);var s=a.VERTICES in t?t[a.VERTICES]:null;var o=a._getNumber(t,a.OFFSET,0);var l=this._intArray[this._mesh.offset+0];var h=this._skin.name+"_"+this._slot.name+"_"+this._mesh.name;var u=0;var f=0;var _=0;var m=0;if(this._mesh.weight!==null){var p=this._weightSlotPose[h];this._helpMatrixA.copyFromArray(p,0);this._frameFloatArray.length+=this._mesh.weight.count*2;_=this._mesh.weight.offset+2+this._mesh.weight.bones.length}else{this._frameFloatArray.length+=l*2}for(var c=0;c=s.length){u=0}else{u=s[c-o]}if(c+1=s.length){f=0}else{f=s[c+1-o]}}if(this._mesh.weight!==null){var d=this._weightBonePoses[h];var y=this._intArray[_++];this._helpMatrixA.transformPoint(u,f,this._helpPoint,true);u=this._helpPoint.x;f=this._helpPoint.y;for(var v=0;v=0||a.DATA_VERSIONS.indexOf(n)>=0){var s=t.BaseObject.borrowObject(t.DragonBonesData);s.version=r;s.name=a._getString(e,a.NAME,"");s.frameRate=a._getNumber(e,a.FRAME_RATE,24);if(s.frameRate===0){s.frameRate=24}if(a.ARMATURE in e){this._data=s;this._parseArray(e);var o=e[a.ARMATURE];for(var l=0,h=o;l0){s.stage=s.getArmature(s.armatureNames[0])}this._data=null}if(a.TEXTURE_ATLAS in e){this._rawTextureAtlases=e[a.TEXTURE_ATLAS]}return s}else{console.assert(false,"Nonsupport data version: "+r+"\n"+"Please convert DragonBones data to support version.\n"+"Read more: https://github.com/DragonBones/Tools/")}return null};a.prototype.parseTextureAtlasData=function(e,i,r){if(r===void 0){r=1}console.assert(e!==undefined);if(e===null){if(this._rawTextureAtlases===null||this._rawTextureAtlases.length===0){return false}var n=this._rawTextureAtlases[this._rawTextureAtlasIndex++];this.parseTextureAtlasData(n,i,r);if(this._rawTextureAtlasIndex>=this._rawTextureAtlases.length){this._rawTextureAtlasIndex=0;this._rawTextureAtlases=null}return true}i.width=a._getNumber(e,a.WIDTH,0);i.height=a._getNumber(e,a.HEIGHT,0);i.scale=r===1?1/a._getNumber(e,a.SCALE,1):r;i.name=a._getString(e,a.NAME,"");i.imagePath=a._getString(e,a.IMAGE_PATH,"");if(a.SUB_TEXTURE in e){var s=e[a.SUB_TEXTURE];for(var o=0,l=s.length;o0&&_>0){u.frame=t.TextureData.createRectangle();u.frame.x=a._getNumber(h,a.FRAME_X,0);u.frame.y=a._getNumber(h,a.FRAME_Y,0);u.frame.width=f;u.frame.height=_}i.addTexture(u)}}return true};a.getInstance=function(){if(a._objectDataParserInstance===null){a._objectDataParserInstance=new a}return a._objectDataParserInstance};a._objectDataParserInstance=null;return a}(t.DataParser);t.ObjectDataParser=e;var i=function(){function t(){this.frameStart=0;this.actions=[]}return t}();t.ActionFrame=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.prototype._inRange=function(t,e,i){return e<=t&&t<=i};i.prototype._decodeUTF8=function(t){var e=-1;var i=-1;var a=65533;var r=0;var n="";var s;var o=0;var l=0;var h=0;var u=0;while(t.length>r){var f=t[r++];if(f===e){if(l!==0){s=a}else{s=i}}else{if(l===0){if(this._inRange(f,0,127)){s=f}else{if(this._inRange(f,194,223)){l=1;u=128;o=f-192}else if(this._inRange(f,224,239)){l=2;u=2048;o=f-224}else if(this._inRange(f,240,244)){l=3;u=65536;o=f-240}else{}o=o*Math.pow(64,l);s=null}}else if(!this._inRange(f,128,191)){o=0;l=0;h=0;u=0;r--;s=f}else{h+=1;o=o+(f-128)*Math.pow(64,l-h);if(h!==l){s=null}else{var _=o;var m=u;o=0;l=0;h=0;u=0;if(this._inRange(_,m,1114111)&&!this._inRange(_,55296,57343)){s=_}else{s=f}}}}if(s!==null&&s!==i){if(s<=65535){if(s>0)n+=String.fromCharCode(s)}else{s-=65536;n+=String.fromCharCode(55296+(s>>10&1023));n+=String.fromCharCode(56320+(s&1023))}}}return n};i.prototype._getUTF16Key=function(t){for(var e=0,i=t.length;e255){return encodeURI(t)}}return t};i.prototype._parseBinaryTimeline=function(e,i,a){if(a===void 0){a=null}var r=a!==null?a:t.BaseObject.borrowObject(t.TimelineData);r.type=e;r.offset=i;this._timeline=r;var n=this._timelineArrayBuffer[r.offset+2];if(n===1){r.frameIndicesOffset=-1}else{var s=0;var o=this._animation.frameCount+1;var l=this._data.frameIndices;if(t.DragonBones.webAssembly){s=l.size();l.resize(s+o,0)}else{s=l.length;l.length+=o}r.frameIndicesOffset=s;for(var h=0,u=0,f=0,_=0;h=0){var r=t.BaseObject.borrowObject(t.WeightData);var n=this._intArrayBuffer[i.offset+0];var s=this._intArrayBuffer[a+0];r.offset=a;for(var o=0;o0){if(e in this._dragonBonesDataMap){n=this._dragonBonesDataMap[e];s=n.getArmature(i)}}if(s===null&&(e.length===0||this.autoSearch)){for(var o in this._dragonBonesDataMap){n=this._dragonBonesDataMap[o];if(e.length===0||n.autoSearch){s=n.getArmature(i);if(s!==null){e=o;break}}}}if(s!==null){t.dataName=e;t.textureAtlasName=r;t.data=n;t.armature=s;t.skin=null;if(a.length>0){t.skin=s.getSkin(a);if(t.skin===null&&this.autoSearch){for(var o in this._dragonBonesDataMap){var l=this._dragonBonesDataMap[o];var h=l.getArmature(a);if(h!==null){t.skin=h.defaultSkin;break}}}}if(t.skin===null){t.skin=s.defaultSkin}return true}return false};e.prototype._buildBones=function(e,i){for(var a=0,r=e.armature.sortedBones;a0){s.texture=this._getTextureData(t.textureAtlasName,e.path)}if(i!==null&&i.type===2&&this._isSupportMesh()){n=a.meshDisplay}else{n=a.rawDisplay}break}case 2:{var o=e;if(o.texture===null){o.texture=this._getTextureData(r,o.path)}else if(t!==null&&t.textureAtlasName.length>0){o.texture=this._getTextureData(t.textureAtlasName,o.path)}if(this._isSupportMesh()){n=a.meshDisplay}else{n=a.rawDisplay}break}case 1:{var l=e;var h=this._buildChildArmature(t,a,e);if(h!==null){h.inheritAnimation=l.inheritAnimation;if(!h.inheritAnimation){var u=l.actions.length>0?l.actions:h.armatureData.defaultActions;if(u.length>0){for(var f=0,_=u;f<_.length;f++){var m=_[f];h._bufferAction(m,true)}}else{h.animation.play()}}l.armature=h.armatureData}n=h;break}case 3:break;default:break}return n};e.prototype.parseDragonBonesData=function(t,i,a){if(i===void 0){i=null}if(a===void 0){a=1}var r=t instanceof ArrayBuffer?e._binaryParser:this._dataParser;var n=r.parseDragonBonesData(t,a);while(true){var s=this._buildTextureAtlasData(null,null);if(r.parseTextureAtlasData(null,s,a)){this.addTextureAtlasData(s,i)}else{s.returnToPool();break}}if(n!==null){this.addDragonBonesData(n,i)}return n};e.prototype.parseTextureAtlasData=function(t,e,i,a){if(i===void 0){i=null}if(a===void 0){a=1}var r=this._buildTextureAtlasData(null,null);this._dataParser.parseTextureAtlasData(t,r,a);this._buildTextureAtlasData(r,e||null);this.addTextureAtlasData(r,i);return r};e.prototype.updateTextureAtlasData=function(t,e){var i=this.getTextureAtlasData(t);if(i!==null){for(var a=0,r=i.length;a=0){continue}var h=i.getDisplays(l.name);if(!h){if(a){l.rawDisplayDatas=null;l.displayList=[]}continue}var u=t.DragonBones.webAssembly?h.size():h.length;var f=l.displayList;f.length=u;for(var _=0,m=u;_0};i.prototype.addDBEventListener=function(t,e,i){if(!(t in this._signals)){this._signals[t]=new Phaser.Signal}var a=this._signals[t];a.add(e,i)};i.prototype.removeDBEventListener=function(t,e,i){if(t in this._signals){var a=this._signals[t];a.remove(e,i)}};Object.defineProperty(i.prototype,"armature",{get:function(){return this._armature},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animation",{get:function(){return this._armature.animation},enumerable:true,configurable:true});i.prototype.hasEvent=function(t){return this.hasDBEventListener(t)};i.prototype.addEvent=function(t,e,i){this.addDBEventListener(t,e,i)};i.prototype.removeEvent=function(t,e,i){this.removeDBEventListener(t,e,i)};return i}(Phaser.Sprite);t.PhaserArmatureDisplay=e;Phaser.Image.prototype.updateTransform=function(e){if(!e&&!this.parent&&!this.game){return this}var i=this.parent;if(e){i=e}else if(!this.parent){i=this.game.world}var a=i.worldTransform;var r=this.worldTransform;var n,s,o,l,h,u;if(this.rotation%Phaser.Math.PI2){if(this.rotation!==this.rotationCache){this.rotationCache=this.rotation;this._sr=Math.sin(this.rotation);this._cr=Math.cos(this.rotation)}var f=this.skew%t.Transform.PI_D;if(f>.01||f<-.01){n=this._cr*this.scale.x;s=this._sr*this.scale.x;o=-Math.sin(f+this.rotation)*this.scale.y;l=Math.cos(f+this.rotation)*this.scale.y;h=this.position.x;u=this.position.y}else{n=this._cr*this.scale.x;s=this._sr*this.scale.x;o=-this._sr*this.scale.y;l=this._cr*this.scale.y;h=this.position.x;u=this.position.y}if(this.pivot.x||this.pivot.y){h-=this.pivot.x*n+this.pivot.y*o;u-=this.pivot.x*s+this.pivot.y*l}r.a=n*a.a+s*a.c;r.b=n*a.b+s*a.d;r.c=o*a.a+l*a.c;r.d=o*a.b+l*a.d;r.tx=h*a.a+u*a.c+a.tx;r.ty=h*a.b+u*a.d+a.ty}else{n=this.scale.x;s=0;o=0;l=this.scale.y;h=this.position.x-this.pivot.x*n;u=this.position.y-this.pivot.y*l;r.a=n*a.a;r.b=n*a.b;r.c=l*a.c;r.d=l*a.d;r.tx=h*a.a+u*a.c+a.tx;r.ty=h*a.b+u*a.d+a.ty}n=r.a;s=r.b;o=r.c;l=r.d;var _=n*l-s*o;if(n||s){var m=Math.sqrt(n*n+s*s);this.worldRotation=s>0?Math.acos(n/m):-Math.acos(n/m);this.worldScale.x=m;this.worldScale.y=_/m}else if(o||l){var p=Math.sqrt(o*o+l*l);this.worldRotation=Phaser.Math.HALF_PI-(l>0?Math.acos(-o/p):-Math.acos(o/p));this.worldScale.x=_/p;this.worldScale.y=p}else{this.worldScale.x=0;this.worldScale.y=0}this.worldAlpha=this.alpha*i.worldAlpha;this.worldPosition.x=r.tx;this.worldPosition.y=r.ty;this._currentBounds=null;if(this.transformCallback){this.transformCallback.call(this.transformCallbackContext,r,a)}return this}})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.PhaserSlot]"};i.prototype._onClear=function(){e.prototype._onClear.call(this);this._textureScale=1;this._renderDisplay=null};i.prototype._initDisplay=function(t){t};i.prototype._disposeDisplay=function(t){t.destroy(true)};i.prototype._onUpdateDisplay=function(){this._renderDisplay=this._display?this._display:this._rawDisplay};i.prototype._addDisplay=function(){var t=this._armature.display;t.addChild(this._renderDisplay)};i.prototype._replaceDisplay=function(t){var e=this._armature.display;var i=t;e.addChild(this._renderDisplay);e.swapChildren(this._renderDisplay,i);e.removeChild(i);this._textureScale=1};i.prototype._removeDisplay=function(){this._renderDisplay.parent.removeChild(this._renderDisplay)};i.prototype._updateZOrder=function(){var t=this._armature.display;var e=t.getChildIndex(this._renderDisplay);if(e===this._zOrder){return}t.addChildAt(this._renderDisplay,this._zOrder)};i.prototype._updateVisible=function(){this._renderDisplay.visible=this._parent.visible&&this._visible};i.prototype._updateBlendMode=function(){if(this._renderDisplay instanceof PIXI.Sprite){switch(this._blendMode){case 0:this._renderDisplay.blendMode=PIXI.blendModes.NORMAL;break;case 1:this._renderDisplay.blendMode=PIXI.blendModes.ADD;break;case 3:this._renderDisplay.blendMode=PIXI.blendModes.DARKEN;break;case 4:this._renderDisplay.blendMode=PIXI.blendModes.DIFFERENCE;break;case 6:this._renderDisplay.blendMode=PIXI.blendModes.HARD_LIGHT;break;case 9:this._renderDisplay.blendMode=PIXI.blendModes.LIGHTEN;break;case 10:this._renderDisplay.blendMode=PIXI.blendModes.MULTIPLY;break;case 11:this._renderDisplay.blendMode=PIXI.blendModes.OVERLAY;break;case 12:this._renderDisplay.blendMode=PIXI.blendModes.SCREEN;break;default:break}}};i.prototype._updateColor=function(){this._renderDisplay.alpha=this._colorTransform.alphaMultiplier;if(this._renderDisplay instanceof PIXI.Sprite){var t=(Math.round(this._colorTransform.redMultiplier*255)<<16)+(Math.round(this._colorTransform.greenMultiplier*255)<<8)+Math.round(this._colorTransform.blueMultiplier*255);this._renderDisplay.tint=t}};i.prototype._updateFrame=function(){var e=this._display===this._meshDisplay?this._meshData:null;var i=this._textureData;if(this._displayIndex>=0&&this._display!==null&&i!==null){var a=i.parent;if(this._armature.replacedTexture!==null&&this._rawDisplayDatas!==null&&this._rawDisplayDatas.indexOf(this._displayData)>=0){if(this._armature._replaceTextureAtlasData===null){a=t.BaseObject.borrowObject(t.PhaserTextureAtlasData);a.copyFrom(i.parent);a.renderTexture=this._armature.replacedTexture;this._armature._replaceTextureAtlasData=a}else{a=this._armature._replaceTextureAtlasData}i=a.getTexture(i.name)}var r=i.renderTexture;if(r!==null){if(e!==null){}else{this._textureScale=i.parent.scale*this._armature._armatureData.scale;var n=this._renderDisplay;n.setTexture(r)}this._visibleDirty=true;return}}if(e!==null){}else{var n=this._renderDisplay;n.x=0;n.y=0;n.visible=false}};i.prototype._updateMesh=function(){};i.prototype._updateTransform=function(t){if(t){this._renderDisplay.x=0;this._renderDisplay.y=0;this._renderDisplay.rotation=0;this._renderDisplay.skew=0;this._renderDisplay.scale.x=1;this._renderDisplay.scale.y=1}else{this.updateGlobalTransform();var e=this.global;if(this._renderDisplay===this._rawDisplay||this._renderDisplay===this._meshDisplay){var i=e.x-(this.globalTransformMatrix.a*this._pivotX+this.globalTransformMatrix.c*this._pivotY);var a=e.y-(this.globalTransformMatrix.b*this._pivotX+this.globalTransformMatrix.d*this._pivotY);this._renderDisplay.x=i;this._renderDisplay.y=a}else{this._renderDisplay.x=e.x;this._renderDisplay.y=e.y}this._renderDisplay.rotation=e.rotation;this._renderDisplay.skew=e.skew;this._renderDisplay.scale.x=e.scaleX*this._textureScale;this._renderDisplay.scale.y=e.scaleY*this._textureScale}};return i}(t.Slot);t.PhaserSlot=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(t){if(t===void 0){t=null}var a=e.call(this,t)||this;a._dragonBones=i._dragonBonesInstance;return a}i.init=function(e){if(i._game!==null){return}i._game=e;var a=new t.PhaserArmatureDisplay;i._dragonBonesInstance=new t.DragonBones(a)};Object.defineProperty(i,"factory",{get:function(){if(i._factory===null){i._factory=new i}return i._factory},enumerable:true,configurable:true});i.prototype._isSupportMesh=function(){console.warn("Phaser-ce can not support mesh.");return false};i.prototype._buildTextureAtlasData=function(e,i){if(e){e.renderTexture=i}else{e=t.BaseObject.borrowObject(t.PhaserTextureAtlasData)}return e};i.prototype._buildArmature=function(e){var i=t.BaseObject.borrowObject(t.Armature);var a=new t.PhaserArmatureDisplay;i.init(e.armature,a,a,this._dragonBones);return i};i.prototype._buildSlot=function(e,a,r,n){e;n;var s=t.BaseObject.borrowObject(t.PhaserSlot);var o=new Phaser.Image(i._game,0,0,Phaser.Cache.DEFAULT);s.init(a,r,o,o);return s};i.prototype.buildArmatureDisplay=function(t,e,i,a){if(e===void 0){e=""}if(i===void 0){i=""}if(a===void 0){a=""}var r=this.buildArmature(t,e||"",i||"",a||"");if(r!==null){this._dragonBones.clock.add(r);return r.display}return null};i.prototype.getTextureDisplay=function(t,e){if(e===void 0){e=null}var a=this._getTextureData(e!==null?e:"",t);if(a!==null&&a.renderTexture!==null){return new Phaser.Sprite(i._game,0,0)}return null};Object.defineProperty(i.prototype,"soundEventManager",{get:function(){return this._dragonBones.eventManager},enumerable:true,configurable:true});i._game=null;i._dragonBonesInstance=null;i._factory=null;return i}(t.BaseFactory);t.PhaserFactory=e})(dragonBones||(dragonBones={})); \ No newline at end of file diff --git a/motox3mspooky/assets/lib/nape.min.js b/motox3mspooky/assets/lib/nape.min.js deleted file mode 100644 index 99feba04..00000000 --- a/motox3mspooky/assets/lib/nape.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var bo,cv=function(){return dc.__string_rec(this,"")};function dX(ec,ea){var eb=function(){return eb.method.apply(eb.scope,arguments)};eb.scope=ec;eb.method=ea;return eb}window.js=js={_Boot:{}};window.zpp_nape=zpp_nape={shape:{},constraint:{},geom:{},phys:{},dynamics:{},callbacks:{},util:{},space:{}};window.sandbox=sandbox={};window.nape=nape={shape:{},constraint:{},geom:{},phys:{},dynamics:{},callbacks:{},space:{},util:{}};var bm=bm=function(){};bm.__name__=["Reflect"];bm.field=function(ec,eb){try{return ec[eb]}catch(ea){return null}};bm.fields=function(ed){var ea=[];if(ed!=null){var ec=Object.prototype.hasOwnProperty;for(var eb in ed){if(eb!="__id__"&&eb!="hx__closures__"&&ec.call(ed,eb)){ea.push(eb)}}}return ea};bm.copy=function(ee){var ea={};var ed=0;var ec=bm.fields(ee);while(ed>>=4;if(!(ec>0)){break}}if(eb!=null){while(ea.length=5){return"<...>"}var ee=typeof(ei);if(ee=="function"&&(ei.__name__||ei.__ename__)){ee="object"}switch(ee){case"function":return"";case"object":if(ei instanceof Array){if(ei.__enum__){if(ei.length==2){return ei[0]}var ej=ei[0]+"(";ef+="\t";var eh=2;var ed=ei.length;while(eh0?",":"")+dc.__string_rec(ei[ek],ef)}eb+="]";return eb}var eq;try{eq=ei.toString}catch(er){return"???"}if(eq!=null&&eq!=Object.toString&&typeof(eq)=="function"){var ec=ei.toString();if(ec!="[object Object]"){return ec}}var en=null;var ea="{\n";ef+="\t";var es=ei.hasOwnProperty!=null;for(var en in ei){if(es&&!ei.hasOwnProperty(en)){continue}if(en=="prototype"||en=="__class__"||en=="__super__"||en=="__interfaces__"||en=="__properties__"){continue}if(ea.length!=2){ea+=", \n"}ea+=ef+en+" : "+dc.__string_rec(ei[en],ef)}ef=ef.substring(1);ea+="\n"+ef+"}";return ea;case"string":return ei;default:return String(ei)}};dc.__interfLoop=function(ef,eb){if(ef==null){return false}if(ef==eb){return true}var ea=ef.__interfaces__;if(ea!=null){var ed=0;var ee=ea.length;while(edec.jointMax){eb-=ec.jointMax;ec.scale=1;ea=false}else{ec.scale=0;eb=0;ea=true}}}return ea};aA.prototype.impulse=function(){var ea=new bY(1,1);ea.zpp_inner.x[0*ea.zpp_inner.n]=this.zpp_inner_zn.jAcc;return ea};aA.prototype.bodyImpulse=function(ea){if(!this.zpp_inner.active){return q.get(0,0,0)}else{return this.zpp_inner_zn.bodyImpulse(ea.zpp_inner)}};aA.prototype.visitBodies=function(ea){if((this.zpp_inner_zn.b1==null?null:this.zpp_inner_zn.b1.outer)!=null){ea(this.zpp_inner_zn.b1==null?null:this.zpp_inner_zn.b1.outer)}if((this.zpp_inner_zn.b2==null?null:this.zpp_inner_zn.b2.outer)!=null&&(this.zpp_inner_zn.b2==null?null:this.zpp_inner_zn.b2.outer)!=(this.zpp_inner_zn.b1==null?null:this.zpp_inner_zn.b1.outer)){ea(this.zpp_inner_zn.b2==null?null:this.zpp_inner_zn.b2.outer)}};Object.defineProperty(aA.prototype,"body1",{get:aA.prototype.get_body1,set:aA.prototype.set_body1});Object.defineProperty(aA.prototype,"body2",{get:aA.prototype.get_body2,set:aA.prototype.set_body2});Object.defineProperty(aA.prototype,"jointMin",{get:aA.prototype.get_jointMin,set:aA.prototype.set_jointMin});Object.defineProperty(aA.prototype,"jointMax",{get:aA.prototype.get_jointMax,set:aA.prototype.set_jointMax});Object.defineProperty(aA.prototype,"ratio",{get:aA.prototype.get_ratio,set:aA.prototype.set_ratio});aA.prototype.__class__=aA;var bO=nape.constraint.ConstraintIterator=function(){this.zpp_next=null;this.zpp_critical=false;this.zpp_i=0;this.zpp_inner=null};bO.__name__=["nape","constraint","ConstraintIterator"];bO.get=function(ec){var ea;if(bO.zpp_pool==null){aZ.internal=true;var ed=new bO();aZ.internal=false;ea=ed}else{var eb=bO.zpp_pool;bO.zpp_pool=eb.zpp_next;ea=eb}ea.zpp_i=0;ea.zpp_inner=ec;ea.zpp_critical=false;return ea};bO.prototype.zpp_inner=null;bO.prototype.zpp_i=null;bO.prototype.zpp_critical=null;bO.prototype.zpp_next=null;bO.prototype.hasNext=function(){this.zpp_inner.zpp_inner.valmod();var eb=this.zpp_inner;eb.zpp_inner.valmod();if(eb.zpp_inner.zip_length){eb.zpp_inner.zip_length=false;eb.zpp_inner.user_length=eb.zpp_inner.inner.length}var ea=eb.zpp_inner.user_length;this.zpp_critical=true;if(this.zpp_ithis.zpp_inner.ws2.id){return this.zpp_inner.ws2.outer}else{return this.zpp_inner.ws1.outer}};aD.prototype.get_shape2=function(){if(this.zpp_inner.ws1.id>this.zpp_inner.ws2.id){return this.zpp_inner.ws1.outer}else{return this.zpp_inner.ws2.outer}};aD.prototype.get_body1=function(){if(this.zpp_inner.ws1.id>this.zpp_inner.ws2.id){return this.zpp_inner.b2.outer}else{return this.zpp_inner.b1.outer}};aD.prototype.get_body2=function(){if(this.zpp_inner.ws1.id>this.zpp_inner.ws2.id){return this.zpp_inner.b1.outer}else{return this.zpp_inner.b2.outer}};aD.prototype.get_state=function(){var ea=this.zpp_inner.immState;if(ea==5){if(br.PreFlag_ACCEPT==null){br.internal=true;br.PreFlag_ACCEPT=new bq();br.internal=false}return br.PreFlag_ACCEPT}else{if(ea==1){if(br.PreFlag_ACCEPT_ONCE==null){br.internal=true;br.PreFlag_ACCEPT_ONCE=new bq();br.internal=false}return br.PreFlag_ACCEPT_ONCE}else{if(ea==6){if(br.PreFlag_IGNORE==null){br.internal=true;br.PreFlag_IGNORE=new bq();br.internal=false}return br.PreFlag_IGNORE}else{if(br.PreFlag_IGNORE_ONCE==null){br.internal=true;br.PreFlag_IGNORE_ONCE=new bq();br.internal=false}return br.PreFlag_IGNORE_ONCE}}}};aD.prototype.totalImpulse=function(ea,eb){if(eb==null){eb=false}return q.get(0,0,0)};aD.prototype.toString=function(){var ea=this.zpp_inner.type==j.COL?"CollisionArbiter":this.zpp_inner.type==j.FLUID?"FluidArbiter":"SensorArbiter";if(this.zpp_inner.cleared){return ea+"(object-pooled)"}else{var eb=ea+"("+(this.zpp_inner.ws1.id>this.zpp_inner.ws2.id?this.zpp_inner.ws2.outer:this.zpp_inner.ws1.outer).toString()+"|"+(this.zpp_inner.ws1.id>this.zpp_inner.ws2.id?this.zpp_inner.ws1.outer:this.zpp_inner.ws2.outer).toString()+")"+(this.zpp_inner.type==j.COL?"["+["SD","DD"][this.zpp_inner.colarb.stat?0:1]+"]":"")+"<-";var ed=this.zpp_inner.immState;var ec;if(ed==5){if(br.PreFlag_ACCEPT==null){br.internal=true;br.PreFlag_ACCEPT=new bq();br.internal=false}ec=br.PreFlag_ACCEPT}else{if(ed==1){if(br.PreFlag_ACCEPT_ONCE==null){br.internal=true;br.PreFlag_ACCEPT_ONCE=new bq();br.internal=false}ec=br.PreFlag_ACCEPT_ONCE}else{if(ed==6){if(br.PreFlag_IGNORE==null){br.internal=true;br.PreFlag_IGNORE=new bq();br.internal=false}ec=br.PreFlag_IGNORE}else{if(br.PreFlag_IGNORE_ONCE==null){br.internal=true;br.PreFlag_IGNORE_ONCE=new bq();br.internal=false}ec=br.PreFlag_IGNORE_ONCE}}}return eb+ec.toString()}};Object.defineProperty(aD.prototype,"isSleeping",{get:aD.prototype.get_isSleeping});Object.defineProperty(aD.prototype,"type",{get:aD.prototype.get_type});Object.defineProperty(aD.prototype,"collisionArbiter",{get:aD.prototype.get_collisionArbiter});Object.defineProperty(aD.prototype,"fluidArbiter",{get:aD.prototype.get_fluidArbiter});Object.defineProperty(aD.prototype,"shape1",{get:aD.prototype.get_shape1});Object.defineProperty(aD.prototype,"shape2",{get:aD.prototype.get_shape2});Object.defineProperty(aD.prototype,"body1",{get:aD.prototype.get_body1});Object.defineProperty(aD.prototype,"body2",{get:aD.prototype.get_body2});Object.defineProperty(aD.prototype,"state",{get:aD.prototype.get_state});aD.prototype.__class__=aD;var d0=nape.dynamics.ArbiterIterator=function(){this.zpp_next=null;this.zpp_critical=false;this.zpp_i=0;this.zpp_inner=null};d0.__name__=["nape","dynamics","ArbiterIterator"];d0.get=function(ec){var ea;if(d0.zpp_pool==null){U.internal=true;var ed=new d0();U.internal=false;ea=ed}else{var eb=d0.zpp_pool;d0.zpp_pool=eb.zpp_next;ea=eb}ea.zpp_i=0;ea.zpp_inner=ec;ea.zpp_critical=false;return ea};d0.prototype.zpp_inner=null;d0.prototype.zpp_i=null;d0.prototype.zpp_critical=null;d0.prototype.zpp_next=null;d0.prototype.hasNext=function(){this.zpp_inner.zpp_inner.valmod();var ea=this.zpp_inner.zpp_gl();this.zpp_critical=true;if(this.zpp_ithis.zpp_inner.ws2.id?this.zpp_inner.ws2.outer:this.zpp_inner.ws1.outer).zpp_inner.type!=1||(this.zpp_inner.ws1.id>this.zpp_inner.ws2.id?this.zpp_inner.ws2.outer:this.zpp_inner.ws1.outer).zpp_inner!=ea.polygon)){ea=this.zpp_inner.colarb.__ref_edge2}if(ea==null){return null}else{return ea.wrapper()}};ak.prototype.get_referenceEdge2=function(){var ea=this.zpp_inner.colarb.__ref_edge1;if(ea!=null&&((this.zpp_inner.ws1.id>this.zpp_inner.ws2.id?this.zpp_inner.ws1.outer:this.zpp_inner.ws2.outer).zpp_inner.type!=1||(this.zpp_inner.ws1.id>this.zpp_inner.ws2.id?this.zpp_inner.ws1.outer:this.zpp_inner.ws2.outer).zpp_inner!=ea.polygon)){ea=this.zpp_inner.colarb.__ref_edge2}if(ea==null){return null}else{return ea.wrapper()}};ak.prototype.firstVertex=function(){if(this.zpp_inner.colarb.__ref_edge1!=null!=(this.zpp_inner.colarb.__ref_edge2!=null)){return this.zpp_inner.colarb.__ref_vertex==-1}else{return false}};ak.prototype.secondVertex=function(){if(this.zpp_inner.colarb.__ref_edge1!=null!=(this.zpp_inner.colarb.__ref_edge2!=null)){return this.zpp_inner.colarb.__ref_vertex==1}else{return false}};ak.prototype.normalImpulse=function(ef,eb){if(eb==null){eb=false}var em=0;var ek=0;var ei=0;var en=this.zpp_inner.colarb;if(!eb||en.oc1.fresh){var ea=en.oc1.wrapper().normalImpulse(ef);var eh=ea.zpp_inner;if(eh._validate!=null){eh._validate()}em+=ea.zpp_inner.x;var el=ea.zpp_inner;if(el._validate!=null){el._validate()}ek+=ea.zpp_inner.y;var ej=ea.zpp_inner;if(ej._validate!=null){ej._validate()}ei+=ea.zpp_inner.z;ea.dispose()}if(en.hc2){if(!eb||en.oc2.fresh){var ec=en.oc2.wrapper().normalImpulse(ef);var eg=ec.zpp_inner;if(eg._validate!=null){eg._validate()}em+=ec.zpp_inner.x;var ee=ec.zpp_inner;if(ee._validate!=null){ee._validate()}ek+=ec.zpp_inner.y;var ed=ec.zpp_inner;if(ed._validate!=null){ed._validate()}ei+=ec.zpp_inner.z;ec.dispose()}}return q.get(em,ek,ei)};ak.prototype.tangentImpulse=function(ef,eb){if(eb==null){eb=false}var em=0;var ek=0;var ei=0;var en=this.zpp_inner.colarb;if(!eb||en.oc1.fresh){var ea=en.oc1.wrapper().tangentImpulse(ef);var eh=ea.zpp_inner;if(eh._validate!=null){eh._validate()}em+=ea.zpp_inner.x;var el=ea.zpp_inner;if(el._validate!=null){el._validate()}ek+=ea.zpp_inner.y;var ej=ea.zpp_inner;if(ej._validate!=null){ej._validate()}ei+=ea.zpp_inner.z;ea.dispose()}if(en.hc2){if(!eb||en.oc2.fresh){var ec=en.oc2.wrapper().tangentImpulse(ef);var eg=ec.zpp_inner;if(eg._validate!=null){eg._validate()}em+=ec.zpp_inner.x;var ee=ec.zpp_inner;if(ee._validate!=null){ee._validate()}ek+=ec.zpp_inner.y;var ed=ec.zpp_inner;if(ed._validate!=null){ed._validate()}ei+=ec.zpp_inner.z;ec.dispose()}}return q.get(em,ek,ei)};ak.prototype.totalImpulse=function(ef,eb){if(eb==null){eb=false}var em=0;var ek=0;var ei=0;var en=this.zpp_inner.colarb;if(!eb||en.oc1.fresh){var ea=en.oc1.wrapper().totalImpulse(ef);var eh=ea.zpp_inner;if(eh._validate!=null){eh._validate()}em+=ea.zpp_inner.x;var el=ea.zpp_inner;if(el._validate!=null){el._validate()}ek+=ea.zpp_inner.y;var ej=ea.zpp_inner;if(ej._validate!=null){ej._validate()}ei+=ea.zpp_inner.z;ea.dispose()}if(en.hc2){if(!eb||en.oc2.fresh){var ec=en.oc2.wrapper().totalImpulse(ef);var eg=ec.zpp_inner;if(eg._validate!=null){eg._validate()}em+=ec.zpp_inner.x;var ee=ec.zpp_inner;if(ee._validate!=null){ee._validate()}ek+=ec.zpp_inner.y;var ed=ec.zpp_inner;if(ed._validate!=null){ed._validate()}ei+=ec.zpp_inner.z;ec.dispose()}}return q.get(em,ek,ei)};ak.prototype.rollingImpulse=function(ea,eb){if(eb==null){eb=false}var ec=this.zpp_inner.colarb;if(!eb||ec.oc1.fresh){return ec.oc1.wrapper().rollingImpulse(ea)}else{return 0}};ak.prototype.get_elasticity=function(){var ea=this.zpp_inner.colarb;if(ea.invalidated){ea.invalidated=false;if(!ea.userdef_restitution){if(ea.s1.material.elasticity<=-Infinity||ea.s2.material.elasticity<=-Infinity){ea.restitution=0}else{if(ea.s1.material.elasticity>=Infinity||ea.s2.material.elasticity>=Infinity){ea.restitution=1}else{ea.restitution=(ea.s1.material.elasticity+ea.s2.material.elasticity)/2}}if(ea.restitution<0){ea.restitution=0}if(ea.restitution>1){ea.restitution=1}}if(!ea.userdef_dyn_fric){ea.dyn_fric=Math.sqrt(ea.s1.material.dynamicFriction*ea.s2.material.dynamicFriction)}if(!ea.userdef_stat_fric){ea.stat_fric=Math.sqrt(ea.s1.material.staticFriction*ea.s2.material.staticFriction)}if(!ea.userdef_rfric){ea.rfric=Math.sqrt(ea.s1.material.rollingFriction*ea.s2.material.rollingFriction)}}return ea.restitution};ak.prototype.set_elasticity=function(eb){var ea=this.zpp_inner.colarb;ea.restitution=eb;ea.userdef_restitution=true;var ec=this.zpp_inner.colarb;if(ec.invalidated){ec.invalidated=false;if(!ec.userdef_restitution){if(ec.s1.material.elasticity<=-Infinity||ec.s2.material.elasticity<=-Infinity){ec.restitution=0}else{if(ec.s1.material.elasticity>=Infinity||ec.s2.material.elasticity>=Infinity){ec.restitution=1}else{ec.restitution=(ec.s1.material.elasticity+ec.s2.material.elasticity)/2}}if(ec.restitution<0){ec.restitution=0}if(ec.restitution>1){ec.restitution=1}}if(!ec.userdef_dyn_fric){ec.dyn_fric=Math.sqrt(ec.s1.material.dynamicFriction*ec.s2.material.dynamicFriction)}if(!ec.userdef_stat_fric){ec.stat_fric=Math.sqrt(ec.s1.material.staticFriction*ec.s2.material.staticFriction)}if(!ec.userdef_rfric){ec.rfric=Math.sqrt(ec.s1.material.rollingFriction*ec.s2.material.rollingFriction)}}return ec.restitution};ak.prototype.get_dynamicFriction=function(){var ea=this.zpp_inner.colarb;if(ea.invalidated){ea.invalidated=false;if(!ea.userdef_restitution){if(ea.s1.material.elasticity<=-Infinity||ea.s2.material.elasticity<=-Infinity){ea.restitution=0}else{if(ea.s1.material.elasticity>=Infinity||ea.s2.material.elasticity>=Infinity){ea.restitution=1}else{ea.restitution=(ea.s1.material.elasticity+ea.s2.material.elasticity)/2}}if(ea.restitution<0){ea.restitution=0}if(ea.restitution>1){ea.restitution=1}}if(!ea.userdef_dyn_fric){ea.dyn_fric=Math.sqrt(ea.s1.material.dynamicFriction*ea.s2.material.dynamicFriction)}if(!ea.userdef_stat_fric){ea.stat_fric=Math.sqrt(ea.s1.material.staticFriction*ea.s2.material.staticFriction)}if(!ea.userdef_rfric){ea.rfric=Math.sqrt(ea.s1.material.rollingFriction*ea.s2.material.rollingFriction)}}return ea.dyn_fric};ak.prototype.set_dynamicFriction=function(ea){var eb=this.zpp_inner.colarb;eb.dyn_fric=ea;eb.userdef_dyn_fric=true;var ec=this.zpp_inner.colarb;if(ec.invalidated){ec.invalidated=false;if(!ec.userdef_restitution){if(ec.s1.material.elasticity<=-Infinity||ec.s2.material.elasticity<=-Infinity){ec.restitution=0}else{if(ec.s1.material.elasticity>=Infinity||ec.s2.material.elasticity>=Infinity){ec.restitution=1}else{ec.restitution=(ec.s1.material.elasticity+ec.s2.material.elasticity)/2}}if(ec.restitution<0){ec.restitution=0}if(ec.restitution>1){ec.restitution=1}}if(!ec.userdef_dyn_fric){ec.dyn_fric=Math.sqrt(ec.s1.material.dynamicFriction*ec.s2.material.dynamicFriction)}if(!ec.userdef_stat_fric){ec.stat_fric=Math.sqrt(ec.s1.material.staticFriction*ec.s2.material.staticFriction)}if(!ec.userdef_rfric){ec.rfric=Math.sqrt(ec.s1.material.rollingFriction*ec.s2.material.rollingFriction)}}return ec.dyn_fric};ak.prototype.get_staticFriction=function(){var ea=this.zpp_inner.colarb;if(ea.invalidated){ea.invalidated=false;if(!ea.userdef_restitution){if(ea.s1.material.elasticity<=-Infinity||ea.s2.material.elasticity<=-Infinity){ea.restitution=0}else{if(ea.s1.material.elasticity>=Infinity||ea.s2.material.elasticity>=Infinity){ea.restitution=1}else{ea.restitution=(ea.s1.material.elasticity+ea.s2.material.elasticity)/2}}if(ea.restitution<0){ea.restitution=0}if(ea.restitution>1){ea.restitution=1}}if(!ea.userdef_dyn_fric){ea.dyn_fric=Math.sqrt(ea.s1.material.dynamicFriction*ea.s2.material.dynamicFriction)}if(!ea.userdef_stat_fric){ea.stat_fric=Math.sqrt(ea.s1.material.staticFriction*ea.s2.material.staticFriction)}if(!ea.userdef_rfric){ea.rfric=Math.sqrt(ea.s1.material.rollingFriction*ea.s2.material.rollingFriction)}}return ea.stat_fric};ak.prototype.set_staticFriction=function(ec){var ea=this.zpp_inner.colarb;ea.stat_fric=ec;ea.userdef_stat_fric=true;var eb=this.zpp_inner.colarb;if(eb.invalidated){eb.invalidated=false;if(!eb.userdef_restitution){if(eb.s1.material.elasticity<=-Infinity||eb.s2.material.elasticity<=-Infinity){eb.restitution=0}else{if(eb.s1.material.elasticity>=Infinity||eb.s2.material.elasticity>=Infinity){eb.restitution=1}else{eb.restitution=(eb.s1.material.elasticity+eb.s2.material.elasticity)/2}}if(eb.restitution<0){eb.restitution=0}if(eb.restitution>1){eb.restitution=1}}if(!eb.userdef_dyn_fric){eb.dyn_fric=Math.sqrt(eb.s1.material.dynamicFriction*eb.s2.material.dynamicFriction)}if(!eb.userdef_stat_fric){eb.stat_fric=Math.sqrt(eb.s1.material.staticFriction*eb.s2.material.staticFriction)}if(!eb.userdef_rfric){eb.rfric=Math.sqrt(eb.s1.material.rollingFriction*eb.s2.material.rollingFriction)}}return eb.stat_fric};ak.prototype.get_rollingFriction=function(){var ea=this.zpp_inner.colarb;if(ea.invalidated){ea.invalidated=false;if(!ea.userdef_restitution){if(ea.s1.material.elasticity<=-Infinity||ea.s2.material.elasticity<=-Infinity){ea.restitution=0}else{if(ea.s1.material.elasticity>=Infinity||ea.s2.material.elasticity>=Infinity){ea.restitution=1}else{ea.restitution=(ea.s1.material.elasticity+ea.s2.material.elasticity)/2}}if(ea.restitution<0){ea.restitution=0}if(ea.restitution>1){ea.restitution=1}}if(!ea.userdef_dyn_fric){ea.dyn_fric=Math.sqrt(ea.s1.material.dynamicFriction*ea.s2.material.dynamicFriction)}if(!ea.userdef_stat_fric){ea.stat_fric=Math.sqrt(ea.s1.material.staticFriction*ea.s2.material.staticFriction)}if(!ea.userdef_rfric){ea.rfric=Math.sqrt(ea.s1.material.rollingFriction*ea.s2.material.rollingFriction)}}return ea.rfric};ak.prototype.set_rollingFriction=function(ec){var ea=this.zpp_inner.colarb;ea.rfric=ec;ea.userdef_rfric=true;var eb=this.zpp_inner.colarb;if(eb.invalidated){eb.invalidated=false;if(!eb.userdef_restitution){if(eb.s1.material.elasticity<=-Infinity||eb.s2.material.elasticity<=-Infinity){eb.restitution=0}else{if(eb.s1.material.elasticity>=Infinity||eb.s2.material.elasticity>=Infinity){eb.restitution=1}else{eb.restitution=(eb.s1.material.elasticity+eb.s2.material.elasticity)/2}}if(eb.restitution<0){eb.restitution=0}if(eb.restitution>1){eb.restitution=1}}if(!eb.userdef_dyn_fric){eb.dyn_fric=Math.sqrt(eb.s1.material.dynamicFriction*eb.s2.material.dynamicFriction)}if(!eb.userdef_stat_fric){eb.stat_fric=Math.sqrt(eb.s1.material.staticFriction*eb.s2.material.staticFriction)}if(!eb.userdef_rfric){eb.rfric=Math.sqrt(eb.s1.material.rollingFriction*eb.s2.material.rollingFriction)}}return eb.rfric};Object.defineProperty(ak.prototype,"contacts",{get:ak.prototype.get_contacts});Object.defineProperty(ak.prototype,"normal",{get:ak.prototype.get_normal});Object.defineProperty(ak.prototype,"radius",{get:ak.prototype.get_radius});Object.defineProperty(ak.prototype,"referenceEdge1",{get:ak.prototype.get_referenceEdge1});Object.defineProperty(ak.prototype,"referenceEdge2",{get:ak.prototype.get_referenceEdge2});Object.defineProperty(ak.prototype,"elasticity",{get:ak.prototype.get_elasticity,set:ak.prototype.set_elasticity});Object.defineProperty(ak.prototype,"dynamicFriction",{get:ak.prototype.get_dynamicFriction,set:ak.prototype.set_dynamicFriction});Object.defineProperty(ak.prototype,"staticFriction",{get:ak.prototype.get_staticFriction,set:ak.prototype.set_staticFriction});Object.defineProperty(ak.prototype,"rollingFriction",{get:ak.prototype.get_rollingFriction,set:ak.prototype.set_rollingFriction});ak.prototype.__class__=ak;var d8=nape.dynamics.Contact=function(){this.zpp_inner=null};d8.__name__=["nape","dynamics","Contact"];d8.prototype.zpp_inner=null;d8.prototype.get_arbiter=function(){if(this.zpp_inner.arbiter==null){return null}else{var ea=this.zpp_inner.arbiter.outer;if(ea.zpp_inner.type==j.COL){return ea.zpp_inner.colarb.outer_zn}else{return null}}};d8.prototype.get_penetration=function(){return -this.zpp_inner.dist};d8.prototype.get_position=function(){if(this.zpp_inner.wrap_position==null){this.zpp_inner.getposition()}return this.zpp_inner.wrap_position};d8.prototype.get_fresh=function(){return this.zpp_inner.fresh};d8.prototype.normalImpulse=function(eb){var ed=this.zpp_inner.arbiter.colarb;var ea=this.zpp_inner.inner;var ec=ea.jnAcc;if(eb==null){return q.get(ed.nx*ec,ed.ny*ec)}else{if(eb==ed.b1.outer){return q.get(ed.nx*-ec,ed.ny*-ec,-(ed.ny*ea.r1x-ed.nx*ea.r1y)*ec)}else{return q.get(ed.nx*ec,ed.ny*ec,(ed.ny*ea.r2x-ed.nx*ea.r2y)*ec)}}};d8.prototype.tangentImpulse=function(eb){var ed=this.zpp_inner.arbiter.colarb;var ea=this.zpp_inner.inner;var ec=ea.jtAcc;if(eb==null){return q.get(-ed.ny*ec,ed.nx*ec)}else{if(eb==ed.b1.outer){return q.get(ed.ny*ec,-ed.nx*ec,-(ea.r1x*ed.nx+ea.r1y*ed.ny)*ec)}else{return q.get(-ed.ny*ec,ed.nx*ec,(ea.r2x*ed.nx+ea.r2y*ed.ny)*ec)}}};d8.prototype.rollingImpulse=function(eb){var ec=this.zpp_inner.arbiter.colarb;var ea=this.zpp_inner.arbiter.colarb.jrAcc;if(eb==null){return ea}else{if(eb==ec.b1.outer){return -ea}else{return ea}}};d8.prototype.totalImpulse=function(ec){var eh=this.zpp_inner.arbiter.colarb;var eb=this.zpp_inner.inner;var ed=eb.jnAcc;var eg=eb.jtAcc;var ea=eh.jrAcc;if(ec==null){return q.get(eh.nx*ed-eh.ny*eg,eh.ny*ed+eh.nx*eg,ea)}else{var ef=eh.nx*ed-eh.ny*eg;var ee=eh.ny*ed+eh.nx*eg;if(ec==eh.b1.outer){return q.get(-ef,-ee,-(ee*eb.r1x-ef*eb.r1y)-ea)}else{return q.get(ef,ee,ee*eb.r2x-ef*eb.r2y+ea)}}};d8.prototype.get_friction=function(){return this.zpp_inner.inner.friction};d8.prototype.toString=function(){if(this.zpp_inner.arbiter==null||this.zpp_inner.arbiter.cleared){return"{object-pooled}"}else{return"{Contact}"}};Object.defineProperty(d8.prototype,"arbiter",{get:d8.prototype.get_arbiter});Object.defineProperty(d8.prototype,"penetration",{get:d8.prototype.get_penetration});Object.defineProperty(d8.prototype,"position",{get:d8.prototype.get_position});Object.defineProperty(d8.prototype,"fresh",{get:d8.prototype.get_fresh});Object.defineProperty(d8.prototype,"friction",{get:d8.prototype.get_friction});d8.prototype.__class__=d8;var d5=nape.dynamics.ContactIterator=function(){this.zpp_next=null;this.zpp_critical=false;this.zpp_i=0;this.zpp_inner=null};d5.__name__=["nape","dynamics","ContactIterator"];d5.get=function(ec){var ea;if(d5.zpp_pool==null){aB.internal=true;var ed=new d5();aB.internal=false;ea=ed}else{var eb=d5.zpp_pool;d5.zpp_pool=eb.zpp_next;ea=eb}ea.zpp_i=0;ea.zpp_inner=ec;ea.zpp_critical=false;return ea};d5.prototype.zpp_inner=null;d5.prototype.zpp_i=null;d5.prototype.zpp_critical=null;d5.prototype.zpp_next=null;d5.prototype.hasNext=function(){this.zpp_inner.zpp_inner.valmod();var ed=this.zpp_inner;ed.zpp_inner.valmod();if(ed.zpp_inner.zip_length){ed.zpp_inner.zip_length=false;ed.zpp_inner.user_length=0;var eb=ed.zpp_inner.inner.next;while(eb!=null){var ea=eb;if(ea.active&&ea.arbiter.active){ed.zpp_inner.user_length++}eb=eb.next}}var ec=ed.zpp_inner.user_length;this.zpp_critical=true;if(this.zpp_i1e+100){ez=eX;break}if(eX>0){if(eX>ez){ez=eX;ea=fz}}else{if(ez<0&&eX>ez){ez=eX;ea=fz}}f0=f0.next}if(ez<1e+100){var fR=ea.gp0;var fP=ea.gp1;var eL=fu.worldCOMy*ea.gnormx-fu.worldCOMx*ea.gnormy;if(eL<=fR.y*ea.gnormx-fR.x*ea.gnormy){var f6=0;var fZ=0;f6=fu.worldCOMx-fR.x;fZ=fu.worldCOMy-fR.y;var fG=Math.sqrt(f6*f6+fZ*fZ);ez=fG-fu.radius;if(ez<1e+100){if(fG==0){f6=1;fZ=0}else{var ge=1/fG;f6*=ge;fZ*=ge}fp.x=fR.x+f6*0;fp.y=fR.y+fZ*0;var gd=-fu.radius;fo.x=fu.worldCOMx+f6*gd;fo.y=fu.worldCOMy+fZ*gd;eq.x=f6;eq.y=fZ}}else{if(eL>=fP.y*ea.gnormx-fP.x*ea.gnormy){var f5=0;var fX=0;f5=fu.worldCOMx-fP.x;fX=fu.worldCOMy-fP.y;var fF=Math.sqrt(f5*f5+fX*fX);ez=fF-fu.radius;if(ez<1e+100){if(fF==0){f5=1;fX=0}else{var gc=1/fF;f5*=gc;fX*=gc}fp.x=fP.x+f5*0;fp.y=fP.y+fX*0;var gb=-fu.radius;fo.x=fu.worldCOMx+f5*gb;fo.y=fu.worldCOMy+fX*gb;eq.x=f5;eq.y=fX}}else{var f9=-fu.radius;fo.x=fu.worldCOMx+ea.gnormx*f9;fo.y=fu.worldCOMy+ea.gnormy*f9;var f8=-ez;fp.x=fo.x+ea.gnormx*f8;fp.y=fo.y+ea.gnormy*f8;eq.x=ea.gnormx;eq.y=ea.gnormy}}}if(eZ){eq.x=-eq.x;eq.y=-eq.y}fn=ez}else{var fK=ep.polygon;var fI=en.polygon;var fy=-1e+100;var gq=null;var gp=null;var eU=0;var fT=fK.edges.head;while(fT!=null){var go=fT.elt;var gj=1e+100;var fS=fI.gverts.next;while(fS!=null){var fe=fS;var fq=go.gnormx*fe.x+go.gnormy*fe.y;if(fq1e+100){fy=gj;break}if(gj>0){if(gj>fy){fy=gj;gq=go;eU=1}}else{if(fy<0&&gj>fy){fy=gj;gq=go;eU=1}}fT=fT.next}if(fy<1e+100){var fQ=fI.edges.head;while(fQ!=null){var gn=fQ.elt;var fs=1e+100;var fO=fK.gverts.next;while(fO!=null){var fN=fO;var fd=gn.gnormx*fN.x+gn.gnormy*fN.y;if(fd1e+100){fy=fs;break}if(fs>0){if(fs>fy){fy=fs;gp=gn;eU=2}}else{if(fy<0&&fs>fy){fy=fs;gp=gn;eU=2}}fQ=fQ.next}if(fy<1e+100){var fh;var fV;if(eU==1){fh=fI;fV=gq}else{fh=fK;fV=gp;var eM=fp;fp=fo;fo=eM;eZ=!eZ}var fU=null;var fr=1e+100;var fM=fh.edges.head;while(fM!=null){var gl=fM.elt;var fc=fV.gnormx*gl.gnormx+fV.gnormy*gl.gnormy;if(fc=0){var e5=fV.gp0;var es=fV.gp1;var fk=fU.gp0;var fj=fU.gp1;var e4=0;var e3=0;var ei=0;var eh=0;e4=es.x-e5.x;e3=es.y-e5.y;ei=fj.x-fk.x;eh=fj.y-fk.y;var e9=1/(e4*e4+e3*e3);var eW=1/(ei*ei+eh*eh);var eI=-(e4*(e5.x-fk.x)+e3*(e5.y-fk.y))*e9;var gm=-(e4*(e5.x-fj.x)+e3*(e5.y-fj.y))*e9;var eQ=-(ei*(fk.x-e5.x)+eh*(fk.y-e5.y))*eW;var ed=-(ei*(fk.x-es.x)+eh*(fk.y-es.y))*eW;if(eI<0){eI=0}else{if(eI>1){eI=1}}if(gm<0){gm=0}else{if(gm>1){gm=1}}if(eQ<0){eQ=0}else{if(eQ>1){eQ=1}}if(ed<0){ed=0}else{if(ed>1){ed=1}}var e0=0;var eY=0;var f7=eI;e0=e5.x+e4*f7;eY=e5.y+e3*f7;var el=0;var ej=0;var eK=gm;el=e5.x+e4*eK;ej=e5.y+e3*eK;var eT=0;var eP=0;var eG=eQ;eT=fk.x+ei*eG;eP=fk.y+eh*eG;var ef=0;var ec=0;var eE=ed;ef=fk.x+ei*eE;ec=fk.y+eh*eE;var fw=fk.x;var ft=fk.y;var eF=0;var eD=0;eF=e0-fw;eD=eY-ft;var fB=eF*eF+eD*eD;var eV=fj.x;var eg=fj.y;var eB=0;var gk=0;eB=el-eV;gk=ej-eg;var fA=eB*eB+gk*gk;var eS=e5.x;var ee=e5.y;var ey=0;var gi=0;ey=eT-eS;gi=eP-ee;var fb=ey*ey+gi*gi;var eO=es.x;var eb=es.y;var ew=0;var gh=0;ew=ef-eO;gh=ec-eb;var fa=ew*ew+gh*gh;var fJ=0;var fH=0;var eu=null;if(fBP.epsilon){fx+=eo*eA;fv+=em*eA}var ex=(-fV.tp0-fY)*ga;if(ex<-P.epsilon){e8+=eo*ex;e7+=em*ex}var fL=fx*fV.gnormx+fv*fV.gnormy-fV.gprojection;var fl=e8*fV.gnormx+e7*fV.gnormy-fV.gprojection;if(fL0){while(ea-->0){this.zpp_inner.vertices=this.zpp_inner.vertices.next}}else{if(ea<0){while(ea++<0){this.zpp_inner.vertices=this.zpp_inner.vertices.prev}}}}return this};a7.prototype.skipBackwards=function(ea){return this.skipForward(-ea)};a7.prototype.erase=function(ef){while(ef!=0&&this.zpp_inner.vertices!=null){var ed=this.zpp_inner.vertices;if(ef>0){var ec;if(this.zpp_inner.vertices!=null&&this.zpp_inner.vertices.prev==this.zpp_inner.vertices){this.zpp_inner.vertices.next=this.zpp_inner.vertices.prev=null;ec=this.zpp_inner.vertices=null}else{var eg=this.zpp_inner.vertices.next;this.zpp_inner.vertices.prev.next=this.zpp_inner.vertices.next;this.zpp_inner.vertices.next.prev=this.zpp_inner.vertices.prev;this.zpp_inner.vertices.next=this.zpp_inner.vertices.prev=null;this.zpp_inner.vertices=null;ec=eg}this.zpp_inner.vertices=ec;--ef}else{if(ef<0){var ee;if(this.zpp_inner.vertices!=null&&this.zpp_inner.vertices.prev==this.zpp_inner.vertices){this.zpp_inner.vertices.next=this.zpp_inner.vertices.prev=null;ee=null}else{var eb=this.zpp_inner.vertices.prev;this.zpp_inner.vertices.prev.next=this.zpp_inner.vertices.next;this.zpp_inner.vertices.next.prev=this.zpp_inner.vertices.prev;this.zpp_inner.vertices.next=this.zpp_inner.vertices.prev=null;this.zpp_inner.vertices=null;ee=eb}this.zpp_inner.vertices=ee;++ef}}if(ed.wrap!=null){ed.wrap.zpp_inner._inuse=false;var eh=ed.wrap;var ea=eh.zpp_inner;eh.zpp_inner.outer=null;eh.zpp_inner=null;eh.zpp_pool=au.poolVec2;au.poolVec2=eh;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea._isimmutable=null;ea._validate=null;ea._invalidate=null;ea.next=bB.zpp_pool;bB.zpp_pool=ea;ed.wrap=null}ed.prev=ed.next=null;ed.next=dr.zpp_pool;dr.zpp_pool=ed}return this};a7.prototype.clear=function(){while(this.zpp_inner.vertices!=null){var eb=this.zpp_inner.vertices;var ec;if(this.zpp_inner.vertices!=null&&this.zpp_inner.vertices.prev==this.zpp_inner.vertices){this.zpp_inner.vertices.next=this.zpp_inner.vertices.prev=null;ec=this.zpp_inner.vertices=null}else{var ed=this.zpp_inner.vertices.next;this.zpp_inner.vertices.prev.next=this.zpp_inner.vertices.next;this.zpp_inner.vertices.next.prev=this.zpp_inner.vertices.prev;this.zpp_inner.vertices.next=this.zpp_inner.vertices.prev=null;this.zpp_inner.vertices=null;ec=ed}this.zpp_inner.vertices=ec;if(eb.wrap!=null){eb.wrap.zpp_inner._inuse=false;var ee=eb.wrap;var ea=ee.zpp_inner;ee.zpp_inner.outer=null;ee.zpp_inner=null;ee.zpp_pool=au.poolVec2;au.poolVec2=ee;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea._isimmutable=null;ea._validate=null;ea._invalidate=null;ea.next=bB.zpp_pool;bB.zpp_pool=ea;eb.wrap=null}eb.prev=eb.next=null;eb.next=dr.zpp_pool;dr.zpp_pool=eb}return this};a7.prototype.copy=function(){var ec=a7.get();var ei=this.zpp_inner.vertices;var ed=this.zpp_inner.vertices;if(ei!=null){var ea=ei;while(true){var eh=ea;var eg=eh.x;var ee=eh.y;var ef;if(dr.zpp_pool==null){ef=new dr()}else{ef=dr.zpp_pool;dr.zpp_pool=ef.next;ef.next=null}ef.forced=false;ef.x=eg;ef.y=ee;var eb=ef;if(ec.zpp_inner.vertices==null){ec.zpp_inner.vertices=eb.prev=eb.next=eb}else{eb.prev=ec.zpp_inner.vertices;eb.next=ec.zpp_inner.vertices.next;ec.zpp_inner.vertices.next.prev=eb;ec.zpp_inner.vertices.next=eb}ec.zpp_inner.vertices=eb;ea=ea.next;if(!(ea!=ed)){break}}}return ec.skipForward(1)};a7.prototype.dispose=function(){this.clear();var ea=this;ea.zpp_pool=au.poolGeomPoly;au.poolGeomPoly=ea};a7.prototype.toString=function(){var ec="GeomPoly[";var ed=this.zpp_inner.vertices;var ea=this.zpp_inner.vertices;if(ed!=null){var ee=ed;while(true){var eb=ee;if(eb!=this.zpp_inner.vertices){ec+=","}ec+="{"+eb.x+","+eb.y+"}";ee=ee.next;if(!(ee!=ea)){break}}}return ec+"]"};a7.prototype.area=function(){if(this.zpp_inner.vertices==null||this.zpp_inner.vertices.next==null||this.zpp_inner.vertices.prev==this.zpp_inner.vertices.next){return 0}else{var ee=0;var ed=this.zpp_inner.vertices;var ea=this.zpp_inner.vertices;if(ed!=null){var ef=ed;while(true){var eb=ef;ee+=eb.x*(eb.next.y-eb.prev.y);ef=ef.next;if(!(ef!=ea)){break}}}var ec=ee*0.5;if(ec<0){return -ec}else{return ec}}};a7.prototype.winding=function(){if(this.zpp_inner.vertices==null||this.zpp_inner.vertices.next==null||this.zpp_inner.vertices.prev==this.zpp_inner.vertices.next){if(br.Winding_UNDEFINED==null){br.internal=true;br.Winding_UNDEFINED=new X();br.internal=false}return br.Winding_UNDEFINED}else{var ee=0;var ed=this.zpp_inner.vertices;var ea=this.zpp_inner.vertices;if(ed!=null){var ef=ed;while(true){var ec=ef;ee+=ec.x*(ec.next.y-ec.prev.y);ef=ef.next;if(!(ef!=ea)){break}}}var eb=ee*0.5;if(eb>0){if(br.Winding_CLOCKWISE==null){br.internal=true;br.Winding_CLOCKWISE=new X();br.internal=false}return br.Winding_CLOCKWISE}else{if(eb==0){if(br.Winding_UNDEFINED==null){br.internal=true;br.Winding_UNDEFINED=new X();br.internal=false}return br.Winding_UNDEFINED}else{if(br.Winding_ANTICLOCKWISE==null){br.internal=true;br.Winding_ANTICLOCKWISE=new X();br.internal=false}return br.Winding_ANTICLOCKWISE}}}};a7.prototype.contains=function(ek){var ed=ek.zpp_inner;if(ed._validate!=null){ed._validate()}var ej=ek.zpp_inner.x;var ef=ek.zpp_inner;if(ef._validate!=null){ef._validate()}var ei=ek.zpp_inner.y;var ee=false;var el=this.zpp_inner.vertices;var eg=this.zpp_inner.vertices;if(el!=null){var ec=el;while(true){var eb=ec;var ea=eb.prev;if((eb.y=ei||ea.y=ei)&&(eb.x<=ej||ea.x<=ej)){if(eb.x+(ei-eb.y)/(ea.y-eb.y)*(ea.x-eb.x)0){ei=true}else{if(eb<0){ec=true}}if(ei&&ec){ee=false;break}ed=ed.next;if(!(ed!=eh)){break}}}return ee}};a7.prototype.isSimple=function(){if(this.zpp_inner.vertices==null||this.zpp_inner.vertices.next==null||this.zpp_inner.vertices.prev==this.zpp_inner.vertices.next){return true}else{return bv.isSimple(this.zpp_inner.vertices)}};a7.prototype.isMonotone=function(){if(this.zpp_inner.vertices==null||this.zpp_inner.vertices.next==null||this.zpp_inner.vertices.prev==this.zpp_inner.vertices.next){return true}else{return aE.isMonotone(this.zpp_inner.vertices)}};a7.prototype.isDegenerate=function(){if(this.zpp_inner.vertices==null||this.zpp_inner.vertices.next==null||this.zpp_inner.vertices.prev==this.zpp_inner.vertices.next){return true}else{return this.area()eh){eh=ed.x}if(ed.y>eg){eg=ed.y}ef=ef.next;if(!(ef!=ea)){break}}}return new S(ec,eb,eh-ec,eg-eb)};a7.prototype.top=function(){var eb=this.zpp_inner.vertices;var em=this.zpp_inner.vertices.next;var eh=this.zpp_inner.vertices;if(em!=null){var ea=em;while(true){var el=ea;if(el.yej.y){ej=el}ea=ea.next;if(!(ea!=eg)){break}}}if(ej.wrap==null){var ek=ej.x;var ei=ej.y;var ee;if(au.poolVec2==null){ee=new r()}else{ee=au.poolVec2;au.poolVec2=ee.zpp_pool;ee.zpp_pool=null}if(ee.zpp_inner==null){var eh;if(bB.zpp_pool==null){eh=new bB()}else{eh=bB.zpp_pool;bB.zpp_pool=eh.next;eh.next=null}eh.weak=false;eh._immutable=false;eh.x=ek;eh.y=ei;ee.zpp_inner=eh;ee.zpp_inner.outer=ee}else{var eb;var ec=ee.zpp_inner;if(ec._validate!=null){ec._validate()}if(ee.zpp_inner.x==ek){var ef=ee.zpp_inner;if(ef._validate!=null){ef._validate()}eb=ee.zpp_inner.y==ei}else{eb=false}if(!eb){ee.zpp_inner.x=ek;ee.zpp_inner.y=ei;var ed=ee.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}ee.zpp_inner.weak=false;ej.wrap=ee;ej.wrap.zpp_inner._inuse=true;ej.wrap.zpp_inner._invalidate=dX(ej,ej.modwrap);ej.wrap.zpp_inner._validate=dX(ej,ej.getwrap)}return ej.wrap};a7.prototype.left=function(){var eb=this.zpp_inner.vertices;var em=this.zpp_inner.vertices.next;var eh=this.zpp_inner.vertices;if(em!=null){var ea=em;while(true){var el=ea;if(el.xej.x){ej=el}ea=ea.next;if(!(ea!=eg)){break}}}if(ej.wrap==null){var ek=ej.x;var ei=ej.y;var ee;if(au.poolVec2==null){ee=new r()}else{ee=au.poolVec2;au.poolVec2=ee.zpp_pool;ee.zpp_pool=null}if(ee.zpp_inner==null){var eh;if(bB.zpp_pool==null){eh=new bB()}else{eh=bB.zpp_pool;bB.zpp_pool=eh.next;eh.next=null}eh.weak=false;eh._immutable=false;eh.x=ek;eh.y=ei;ee.zpp_inner=eh;ee.zpp_inner.outer=ee}else{var eb;var ec=ee.zpp_inner;if(ec._validate!=null){ec._validate()}if(ee.zpp_inner.x==ek){var ef=ee.zpp_inner;if(ef._validate!=null){ef._validate()}eb=ee.zpp_inner.y==ei}else{eb=false}if(!eb){ee.zpp_inner.x=ek;ee.zpp_inner.y=ei;var ed=ee.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}ee.zpp_inner.weak=false;ej.wrap=ee;ej.wrap.zpp_inner._inuse=true;ej.wrap.zpp_inner._invalidate=dX(ej,ej.modwrap);ej.wrap.zpp_inner._validate=dX(ej,ej.getwrap)}return ej.wrap};a7.prototype.__class__=a7;var bL=nape.geom.GeomPolyIterator=function(){this.zpp_next=null;this.zpp_critical=false;this.zpp_i=0;this.zpp_inner=null};bL.__name__=["nape","geom","GeomPolyIterator"];bL.get=function(ec){var ea;if(bL.zpp_pool==null){dl.internal=true;var ed=new bL();dl.internal=false;ea=ed}else{var eb=bL.zpp_pool;bL.zpp_pool=eb.zpp_next;ea=eb}ea.zpp_i=0;ea.zpp_inner=ec;ea.zpp_critical=false;return ea};bL.prototype.zpp_inner=null;bL.prototype.zpp_i=null;bL.prototype.zpp_critical=null;bL.prototype.zpp_next=null;bL.prototype.hasNext=function(){this.zpp_inner.zpp_inner.valmod();var eb=this.zpp_inner;eb.zpp_inner.valmod();if(eb.zpp_inner.zip_length){eb.zpp_inner.zip_length=false;eb.zpp_inner.user_length=eb.zpp_inner.inner.length}var ea=eb.zpp_inner.user_length;this.zpp_critical=true;if(this.zpp_iP.illConditionedThreshold*ea};cI.prototype.inverse=function(){var ea=1/(this.zpp_inner.a*this.zpp_inner.d-this.zpp_inner.b*this.zpp_inner.c);return new cI(this.zpp_inner.d*ea,-this.zpp_inner.b*ea,-this.zpp_inner.c*ea,this.zpp_inner.a*ea,(this.zpp_inner.b*this.zpp_inner.ty-this.zpp_inner.d*this.zpp_inner.tx)*ea,(this.zpp_inner.c*this.zpp_inner.tx-this.zpp_inner.a*this.zpp_inner.ty)*ea)};cI.prototype.transpose=function(){return new cI(this.zpp_inner.a,this.zpp_inner.c,this.zpp_inner.b,this.zpp_inner.d,-this.zpp_inner.a*this.zpp_inner.tx-this.zpp_inner.c*this.zpp_inner.ty,-this.zpp_inner.b*this.zpp_inner.tx-this.zpp_inner.d*this.zpp_inner.ty)};cI.prototype.concat=function(ea){return new cI(ea.zpp_inner.a*this.zpp_inner.a+ea.zpp_inner.b*this.zpp_inner.c,ea.zpp_inner.a*this.zpp_inner.b+ea.zpp_inner.b*this.zpp_inner.d,ea.zpp_inner.c*this.zpp_inner.a+ea.zpp_inner.d*this.zpp_inner.c,ea.zpp_inner.c*this.zpp_inner.b+ea.zpp_inner.d*this.zpp_inner.d,ea.zpp_inner.a*this.zpp_inner.tx+ea.zpp_inner.b*this.zpp_inner.ty+ea.zpp_inner.tx,ea.zpp_inner.c*this.zpp_inner.tx+ea.zpp_inner.d*this.zpp_inner.ty+ea.zpp_inner.ty)};cI.prototype.transform=function(eu,el,ef){if(ef==null){ef=false}if(el==null){el=false}var eG;if(el){var ex=eu.zpp_inner;if(ex._validate!=null){ex._validate()}var eE=eu.zpp_inner.x*this.zpp_inner.a;var eD=eu.zpp_inner;if(eD._validate!=null){eD._validate()}var eh=eE+eu.zpp_inner.y*this.zpp_inner.b;var eC=eu.zpp_inner;if(eC._validate!=null){eC._validate()}var ep=eu.zpp_inner.x*this.zpp_inner.c;var eA=eu.zpp_inner;if(eA._validate!=null){eA._validate()}var eg=ep+eu.zpp_inner.y*this.zpp_inner.d;var ee;if(au.poolVec2==null){ee=new r()}else{ee=au.poolVec2;au.poolVec2=ee.zpp_pool;ee.zpp_pool=null}if(ee.zpp_inner==null){var ed;if(bB.zpp_pool==null){ed=new bB()}else{ed=bB.zpp_pool;bB.zpp_pool=ed.next;ed.next=null}ed.weak=false;ed._immutable=false;ed.x=eh;ed.y=eg;ee.zpp_inner=ed;ee.zpp_inner.outer=ee}else{var em;var ez=ee.zpp_inner;if(ez._validate!=null){ez._validate()}if(ee.zpp_inner.x==eh){var ey=ee.zpp_inner;if(ey._validate!=null){ey._validate()}em=ee.zpp_inner.y==eg}else{em=false}if(!em){ee.zpp_inner.x=eh;ee.zpp_inner.y=eg;var ew=ee.zpp_inner;if(ew._invalidate!=null){ew._invalidate(ew)}}}ee.zpp_inner.weak=ef;eG=ee}else{var et=eu.zpp_inner;if(et._validate!=null){et._validate()}var ek=eu.zpp_inner.x*this.zpp_inner.a;var er=eu.zpp_inner;if(er._validate!=null){er._validate()}var eB=ek+eu.zpp_inner.y*this.zpp_inner.b+this.zpp_inner.tx;var eo=eu.zpp_inner;if(eo._validate!=null){eo._validate()}var ej=eu.zpp_inner.x*this.zpp_inner.c;var ev=eu.zpp_inner;if(ev._validate!=null){ev._validate()}var ea=ej+eu.zpp_inner.y*this.zpp_inner.d+this.zpp_inner.ty;var ec;if(au.poolVec2==null){ec=new r()}else{ec=au.poolVec2;au.poolVec2=ec.zpp_pool;ec.zpp_pool=null}if(ec.zpp_inner==null){var eb;if(bB.zpp_pool==null){eb=new bB()}else{eb=bB.zpp_pool;bB.zpp_pool=eb.next;eb.next=null}eb.weak=false;eb._immutable=false;eb.x=eB;eb.y=ea;ec.zpp_inner=eb;ec.zpp_inner.outer=ec}else{var ei;var es=ec.zpp_inner;if(es._validate!=null){es._validate()}if(ec.zpp_inner.x==eB){var eq=ec.zpp_inner;if(eq._validate!=null){eq._validate()}ei=ec.zpp_inner.y==ea}else{ei=false}if(!ei){ec.zpp_inner.x=eB;ec.zpp_inner.y=ea;var en=ec.zpp_inner;if(en._invalidate!=null){en._invalidate(en)}}}ec.zpp_inner.weak=ef;eG=ec}if(eu.zpp_inner.weak){var eF=eu.zpp_inner;eu.zpp_inner.outer=null;eu.zpp_inner=null;eu.zpp_pool=au.poolVec2;au.poolVec2=eu;if(eF.outer!=null){eF.outer.zpp_inner=null;eF.outer=null}eF._isimmutable=null;eF._validate=null;eF._invalidate=null;eF.next=bB.zpp_pool;bB.zpp_pool=eF}return eG};cI.prototype.inverseTransform=function(es,el,ef){if(ef==null){ef=false}if(el==null){el=false}var eC=1/(this.zpp_inner.a*this.zpp_inner.d-this.zpp_inner.b*this.zpp_inner.c);var eF;if(el){var ev=es.zpp_inner;if(ev._validate!=null){ev._validate()}var eD=es.zpp_inner.x*this.zpp_inner.d;var eB=es.zpp_inner;if(eB._validate!=null){eB._validate()}var eh=(eD-es.zpp_inner.y*this.zpp_inner.b)*eC;var eA=es.zpp_inner;if(eA._validate!=null){eA._validate()}var eo=es.zpp_inner.y*this.zpp_inner.a;var ey=es.zpp_inner;if(ey._validate!=null){ey._validate()}var eg=(eo-es.zpp_inner.x*this.zpp_inner.c)*eC;var ee;if(au.poolVec2==null){ee=new r()}else{ee=au.poolVec2;au.poolVec2=ee.zpp_pool;ee.zpp_pool=null}if(ee.zpp_inner==null){var ed;if(bB.zpp_pool==null){ed=new bB()}else{ed=bB.zpp_pool;bB.zpp_pool=ed.next;ed.next=null}ed.weak=false;ed._immutable=false;ed.x=eh;ed.y=eg;ee.zpp_inner=ed;ee.zpp_inner.outer=ee}else{var em;var ex=ee.zpp_inner;if(ex._validate!=null){ex._validate()}if(ee.zpp_inner.x==eh){var ew=ee.zpp_inner;if(ew._validate!=null){ew._validate()}em=ee.zpp_inner.y==eg}else{em=false}if(!em){ee.zpp_inner.x=eh;ee.zpp_inner.y=eg;var eu=ee.zpp_inner;if(eu._invalidate!=null){eu._invalidate(eu)}}}ee.zpp_inner.weak=ef;eF=ee}else{var er=es.zpp_inner;if(er._validate!=null){er._validate()}var ej=es.zpp_inner.x-this.zpp_inner.tx;var ep=es.zpp_inner;if(ep._validate!=null){ep._validate()}var ei=es.zpp_inner.y-this.zpp_inner.ty;var ez=(ej*this.zpp_inner.d-ei*this.zpp_inner.b)*eC;var ea=(ei*this.zpp_inner.a-ej*this.zpp_inner.c)*eC;var ec;if(au.poolVec2==null){ec=new r()}else{ec=au.poolVec2;au.poolVec2=ec.zpp_pool;ec.zpp_pool=null}if(ec.zpp_inner==null){var eb;if(bB.zpp_pool==null){eb=new bB()}else{eb=bB.zpp_pool;bB.zpp_pool=eb.next;eb.next=null}eb.weak=false;eb._immutable=false;eb.x=ez;eb.y=ea;ec.zpp_inner=eb;ec.zpp_inner.outer=ec}else{var ek;var en=ec.zpp_inner;if(en._validate!=null){en._validate()}if(ec.zpp_inner.x==ez){var et=ec.zpp_inner;if(et._validate!=null){et._validate()}ek=ec.zpp_inner.y==ea}else{ek=false}if(!ek){ec.zpp_inner.x=ez;ec.zpp_inner.y=ea;var eq=ec.zpp_inner;if(eq._invalidate!=null){eq._invalidate(eq)}}}ec.zpp_inner.weak=ef;eF=ec}if(es.zpp_inner.weak){var eE=es.zpp_inner;es.zpp_inner.outer=null;es.zpp_inner=null;es.zpp_pool=au.poolVec2;au.poolVec2=es;if(eE.outer!=null){eE.outer.zpp_inner=null;eE.outer=null}eE._isimmutable=null;eE._validate=null;eE._invalidate=null;eE.next=bB.zpp_pool;bB.zpp_pool=eE}return eF};cI.prototype.toString=function(){return"{ a: "+this.zpp_inner.a+" b: "+this.zpp_inner.b+" c: "+this.zpp_inner.c+" d: "+this.zpp_inner.d+" tx: "+this.zpp_inner.tx+" ty: "+this.zpp_inner.ty+" }"};cI.prototype.equiorthogonal=function(){if(this.singular()){return false}else{var ea=this.zpp_inner.a*this.zpp_inner.b+this.zpp_inner.c*this.zpp_inner.d;if(ea*ea0){et=-et}var ea=Math.sin(et);var eb=Math.cos(et);var eu=this.zpp_inner.a*eb-this.zpp_inner.c*ea;var ed=this.zpp_inner.b*eb+this.zpp_inner.d*ea;this.zpp_inner.c=this.zpp_inner.c*eb+this.zpp_inner.a*ea;var ep=this.zpp_inner;if(ep._invalidate!=null){ep._invalidate()}this.zpp_inner.a=eu;var eo=this.zpp_inner;if(eo._invalidate!=null){eo._invalidate()}this.zpp_inner.d=this.zpp_inner.d*eb-this.zpp_inner.b*ea;var el=this.zpp_inner;if(el._invalidate!=null){el._invalidate()}this.zpp_inner.b=ed;var ek=this.zpp_inner;if(ek._invalidate!=null){ek._invalidate()}var ej=this.zpp_inner;if(ej._invalidate!=null){ej._invalidate()}}return this};cI.prototype.orthogonalise=function(){if(!this.orthogonal()){var ef=Math.sqrt(this.zpp_inner.a*this.zpp_inner.a+this.zpp_inner.c*this.zpp_inner.c);var ee=Math.sqrt(this.zpp_inner.b*this.zpp_inner.b+this.zpp_inner.d*this.zpp_inner.d);ef=1/ef;ee=1/ee;var ec=this;ec.zpp_inner.a=ec.zpp_inner.a*ef;var em=ec.zpp_inner;if(em._invalidate!=null){em._invalidate()}var ei=this;ei.zpp_inner.c=ei.zpp_inner.c*ef;var er=ei.zpp_inner;if(er._invalidate!=null){er._invalidate()}var eh=this;eh.zpp_inner.b=eh.zpp_inner.b*ee;var eq=eh.zpp_inner;if(eq._invalidate!=null){eq._invalidate()}var eg=this;eg.zpp_inner.d=eg.zpp_inner.d*ee;var ep=eg.zpp_inner;if(ep._invalidate!=null){ep._invalidate()}var es=0.25*Math.PI-0.5*Math.acos((this.zpp_inner.a*this.zpp_inner.b+this.zpp_inner.c*this.zpp_inner.d)/1);if(this.zpp_inner.a*this.zpp_inner.d-this.zpp_inner.b*this.zpp_inner.c>0){es=-es}var ea=Math.sin(es);var eb=Math.cos(es);var et=this.zpp_inner.a*eb-this.zpp_inner.c*ea;var ed=this.zpp_inner.b*eb+this.zpp_inner.d*ea;this.zpp_inner.c=this.zpp_inner.c*eb+this.zpp_inner.a*ea;var eo=this.zpp_inner;if(eo._invalidate!=null){eo._invalidate()}this.zpp_inner.a=et;var en=this.zpp_inner;if(en._invalidate!=null){en._invalidate()}this.zpp_inner.d=this.zpp_inner.d*eb-this.zpp_inner.b*ea;var el=this.zpp_inner;if(el._invalidate!=null){el._invalidate()}this.zpp_inner.b=ed;var ek=this.zpp_inner;if(ek._invalidate!=null){ek._invalidate()}var ej=this.zpp_inner;if(ej._invalidate!=null){ej._invalidate()}}return this};Object.defineProperty(cI.prototype,"a",{get:cI.prototype.get_a,set:cI.prototype.set_a});Object.defineProperty(cI.prototype,"b",{get:cI.prototype.get_b,set:cI.prototype.set_b});Object.defineProperty(cI.prototype,"c",{get:cI.prototype.get_c,set:cI.prototype.set_c});Object.defineProperty(cI.prototype,"d",{get:cI.prototype.get_d,set:cI.prototype.set_d});Object.defineProperty(cI.prototype,"tx",{get:cI.prototype.get_tx,set:cI.prototype.set_tx});Object.defineProperty(cI.prototype,"ty",{get:cI.prototype.get_ty,set:cI.prototype.set_ty});Object.defineProperty(cI.prototype,"determinant",{get:cI.prototype.get_determinant});cI.prototype.__class__=cI;var bY=nape.geom.MatMN=function(ea,eb){this.zpp_inner=null;this.zpp_inner=new bI(ea,eb);this.zpp_inner.outer=this};bY.__name__=["nape","geom","MatMN"];bY.prototype.zpp_inner=null;bY.prototype.get_rows=function(){return this.zpp_inner.m};bY.prototype.get_cols=function(){return this.zpp_inner.n};bY.prototype.x=function(eb,ea){return this.zpp_inner.x[eb*this.zpp_inner.n+ea]};bY.prototype.setx=function(ec,eb,ea){return this.zpp_inner.x[ec*this.zpp_inner.n+eb]=ea};bY.prototype.toString=function(){var eb="{ ";var ea=true;var ef=0;var eg=this.zpp_inner.m;while(ef0.0001){ek.axisx=Math.sin(ek.rot);ek.axisy=Math.cos(ek.rot)}else{var ea=ed*ed;var eb=1-0.5*ea;var ee=1-ea*ea/8;var ef=(eb*ek.axisx+ed*ek.axisy)*ee;ek.axisy=(eb*ek.axisy-ed*ek.axisx)*ee;ek.axisx=ef}}}var ec=ek.shapes.head;while(ec!=null){var el=ec.elt;if(el.type==1){el.polygon.invalidate_gverts();el.polygon.invalidate_gaxi()}el.invalidate_worldCOM();ec=ec.next}ek.zip_worldCOM=true;ek.zip_axis=true;var eh=ek.shapes.head;while(eh!=null){var ei=eh.elt;if(ei.type==1){ei.polygon.invalidate_gverts();ei.polygon.invalidate_gaxi()}ei.invalidate_worldCOM();eh=eh.next}ek.zip_worldCOM=true;ek.sweepTime=0;return this};at.prototype.isStatic=function(){return this.zpp_inner.type==1};at.prototype.isDynamic=function(){return this.zpp_inner.type==2};at.prototype.isKinematic=function(){return this.zpp_inner.type==3};at.prototype.get_shapes=function(){return this.zpp_inner.wrap_shapes};at.prototype.get_compound=function(){if(this.zpp_inner.compound==null){return null}else{return this.zpp_inner.compound.outer}};at.prototype.set_compound=function(ea){if((this.zpp_inner.compound==null?null:this.zpp_inner.compound.outer)!=ea){if((this.zpp_inner.compound==null?null:this.zpp_inner.compound.outer)!=null){(this.zpp_inner.compound==null?null:this.zpp_inner.compound.outer).zpp_inner.wrap_bodies.remove(this)}if(ea!=null){var eb=ea.zpp_inner.wrap_bodies;if(eb.zpp_inner.reverse_flag){eb.push(this)}else{eb.unshift(this)}}}if(this.zpp_inner.compound==null){return null}else{return this.zpp_inner.compound.outer}};at.prototype.get_space=function(){if(this.zpp_inner.space==null){return null}else{return this.zpp_inner.space.outer}};at.prototype.set_space=function(ea){this.zpp_inner.immutable_midstep("Body::space");if((this.zpp_inner.space==null?null:this.zpp_inner.space.outer)!=ea){if((this.zpp_inner.space==null?null:this.zpp_inner.space.outer)!=null){this.zpp_inner.component.woken=false}if((this.zpp_inner.space==null?null:this.zpp_inner.space.outer)!=null){(this.zpp_inner.space==null?null:this.zpp_inner.space.outer).zpp_inner.wrap_bodies.remove(this)}if(ea!=null){var eb=ea.zpp_inner.wrap_bodies;if(eb.zpp_inner.reverse_flag){eb.push(this)}else{eb.unshift(this)}}}if(this.zpp_inner.space==null){return null}else{return this.zpp_inner.space.outer}};at.prototype.get_arbiters=function(){if(this.zpp_inner.wrap_arbiters==null){this.zpp_inner.wrap_arbiters=U.get(this.zpp_inner.arbiters,true)}return this.zpp_inner.wrap_arbiters};at.prototype.get_isSleeping=function(){return this.zpp_inner.component.sleeping};at.prototype.get_constraints=function(){if(this.zpp_inner.wrap_constraints==null){this.zpp_inner.wrap_constraints=aZ.get(this.zpp_inner.constraints,true)}return this.zpp_inner.wrap_constraints};at.prototype.copy=function(){return this.zpp_inner.copy()};at.prototype.get_position=function(){if(this.zpp_inner.wrap_pos==null){this.zpp_inner.setupPosition()}return this.zpp_inner.wrap_pos};at.prototype.set_position=function(ec){if(this.zpp_inner.wrap_pos==null){this.zpp_inner.setupPosition()}var ee=this.zpp_inner.wrap_pos;var eh=ec.zpp_inner;if(eh._validate!=null){eh._validate()}var ej=ec.zpp_inner.x;var eg=ec.zpp_inner;if(eg._validate!=null){eg._validate()}var ei=ec.zpp_inner.y;var ea;var ef=ee.zpp_inner;if(ef._validate!=null){ef._validate()}if(ee.zpp_inner.x==ej){var ed=ee.zpp_inner;if(ed._validate!=null){ed._validate()}ea=ee.zpp_inner.y==ei}else{ea=false}if(!ea){ee.zpp_inner.x=ej;ee.zpp_inner.y=ei;var eb=ee.zpp_inner;if(eb._invalidate!=null){eb._invalidate(eb)}}if(ec.zpp_inner.weak){var ek=ec.zpp_inner;ec.zpp_inner.outer=null;ec.zpp_inner=null;ec.zpp_pool=au.poolVec2;au.poolVec2=ec;if(ek.outer!=null){ek.outer.zpp_inner=null;ek.outer=null}ek._isimmutable=null;ek._validate=null;ek._invalidate=null;ek.next=bB.zpp_pool;bB.zpp_pool=ek}if(this.zpp_inner.wrap_pos==null){this.zpp_inner.setupPosition()}return this.zpp_inner.wrap_pos};at.prototype.get_velocity=function(){if(this.zpp_inner.wrap_vel==null){this.zpp_inner.setupVelocity()}return this.zpp_inner.wrap_vel};at.prototype.set_velocity=function(ea){if(this.zpp_inner.wrap_vel==null){this.zpp_inner.setupVelocity()}var ee=this.zpp_inner.wrap_vel;var eh=ea.zpp_inner;if(eh._validate!=null){eh._validate()}var ej=ea.zpp_inner.x;var eg=ea.zpp_inner;if(eg._validate!=null){eg._validate()}var ei=ea.zpp_inner.y;var eb;var ef=ee.zpp_inner;if(ef._validate!=null){ef._validate()}if(ee.zpp_inner.x==ej){var ed=ee.zpp_inner;if(ed._validate!=null){ed._validate()}eb=ee.zpp_inner.y==ei}else{eb=false}if(!eb){ee.zpp_inner.x=ej;ee.zpp_inner.y=ei;var ec=ee.zpp_inner;if(ec._invalidate!=null){ec._invalidate(ec)}}if(ea.zpp_inner.weak){var ek=ea.zpp_inner;ea.zpp_inner.outer=null;ea.zpp_inner=null;ea.zpp_pool=au.poolVec2;au.poolVec2=ea;if(ek.outer!=null){ek.outer.zpp_inner=null;ek.outer=null}ek._isimmutable=null;ek._validate=null;ek._invalidate=null;ek.next=bB.zpp_pool;bB.zpp_pool=ek}if(this.zpp_inner.wrap_vel==null){this.zpp_inner.setupVelocity()}return this.zpp_inner.wrap_vel};at.prototype.setVelocityFromTarget=function(ee,ec,el){var eq=1/el;if(this.zpp_inner.wrap_vel==null){this.zpp_inner.setupVelocity()}var ej=this.zpp_inner.wrap_vel;if(this.zpp_inner.wrap_pos==null){this.zpp_inner.setupPosition()}var ed=ee.sub(this.zpp_inner.wrap_pos,true).muleq(eq);var em=ed.zpp_inner;if(em._validate!=null){em._validate()}var eo=ed.zpp_inner.x;var ek=ed.zpp_inner;if(ek._validate!=null){ek._validate()}var en=ed.zpp_inner.y;var ef;var ei=ej.zpp_inner;if(ei._validate!=null){ei._validate()}if(ej.zpp_inner.x==eo){var eh=ej.zpp_inner;if(eh._validate!=null){eh._validate()}ef=ej.zpp_inner.y==en}else{ef=false}if(!ef){ej.zpp_inner.x=eo;ej.zpp_inner.y=en;var eg=ej.zpp_inner;if(eg._invalidate!=null){eg._invalidate(eg)}}if(ed.zpp_inner.weak){var ep=ed.zpp_inner;ed.zpp_inner.outer=null;ed.zpp_inner=null;ed.zpp_pool=au.poolVec2;au.poolVec2=ed;if(ep.outer!=null){ep.outer.zpp_inner=null;ep.outer=null}ep._isimmutable=null;ep._validate=null;ep._invalidate=null;ep.next=bB.zpp_pool;bB.zpp_pool=ep}var eb=(ec-this.zpp_inner.rot)*eq;if(this.zpp_inner.angvel!=eb){this.zpp_inner.angvel=eb;this.zpp_inner.wake()}if(ee.zpp_inner.weak){var ea=ee.zpp_inner;ee.zpp_inner.outer=null;ee.zpp_inner=null;ee.zpp_pool=au.poolVec2;au.poolVec2=ee;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea._isimmutable=null;ea._validate=null;ea._invalidate=null;ea.next=bB.zpp_pool;bB.zpp_pool=ea}return this};at.prototype.get_kinematicVel=function(){if(this.zpp_inner.wrap_kinvel==null){this.zpp_inner.setupkinvel()}return this.zpp_inner.wrap_kinvel};at.prototype.set_kinematicVel=function(eh){if(this.zpp_inner.wrap_kinvel==null){this.zpp_inner.setupkinvel()}var ed=this.zpp_inner.wrap_kinvel;var eg=eh.zpp_inner;if(eg._validate!=null){eg._validate()}var ej=eh.zpp_inner.x;var ef=eh.zpp_inner;if(ef._validate!=null){ef._validate()}var ei=eh.zpp_inner.y;var ea;var ee=ed.zpp_inner;if(ee._validate!=null){ee._validate()}if(ed.zpp_inner.x==ej){var ec=ed.zpp_inner;if(ec._validate!=null){ec._validate()}ea=ed.zpp_inner.y==ei}else{ea=false}if(!ea){ed.zpp_inner.x=ej;ed.zpp_inner.y=ei;var eb=ed.zpp_inner;if(eb._invalidate!=null){eb._invalidate(eb)}}if(eh.zpp_inner.weak){var ek=eh.zpp_inner;eh.zpp_inner.outer=null;eh.zpp_inner=null;eh.zpp_pool=au.poolVec2;au.poolVec2=eh;if(ek.outer!=null){ek.outer.zpp_inner=null;ek.outer=null}ek._isimmutable=null;ek._validate=null;ek._invalidate=null;ek.next=bB.zpp_pool;bB.zpp_pool=ek}if(this.zpp_inner.wrap_kinvel==null){this.zpp_inner.setupkinvel()}return this.zpp_inner.wrap_kinvel};at.prototype.get_surfaceVel=function(){if(this.zpp_inner.wrap_svel==null){this.zpp_inner.setupsvel()}return this.zpp_inner.wrap_svel};at.prototype.set_surfaceVel=function(ed){if(this.zpp_inner.wrap_svel==null){this.zpp_inner.setupsvel()}var ee=this.zpp_inner.wrap_svel;var eh=ed.zpp_inner;if(eh._validate!=null){eh._validate()}var ej=ed.zpp_inner.x;var eg=ed.zpp_inner;if(eg._validate!=null){eg._validate()}var ei=ed.zpp_inner.y;var ea;var ef=ee.zpp_inner;if(ef._validate!=null){ef._validate()}if(ee.zpp_inner.x==ej){var ec=ee.zpp_inner;if(ec._validate!=null){ec._validate()}ea=ee.zpp_inner.y==ei}else{ea=false}if(!ea){ee.zpp_inner.x=ej;ee.zpp_inner.y=ei;var eb=ee.zpp_inner;if(eb._invalidate!=null){eb._invalidate(eb)}}if(ed.zpp_inner.weak){var ek=ed.zpp_inner;ed.zpp_inner.outer=null;ed.zpp_inner=null;ed.zpp_pool=au.poolVec2;au.poolVec2=ed;if(ek.outer!=null){ek.outer.zpp_inner=null;ek.outer=null}ek._isimmutable=null;ek._validate=null;ek._invalidate=null;ek.next=bB.zpp_pool;bB.zpp_pool=ek}if(this.zpp_inner.wrap_svel==null){this.zpp_inner.setupsvel()}return this.zpp_inner.wrap_svel};at.prototype.get_force=function(){if(this.zpp_inner.wrap_force==null){this.zpp_inner.setupForce()}return this.zpp_inner.wrap_force};at.prototype.set_force=function(ea){if(this.zpp_inner.wrap_force==null){this.zpp_inner.setupForce()}var ee=this.zpp_inner.wrap_force;var eh=ea.zpp_inner;if(eh._validate!=null){eh._validate()}var ej=ea.zpp_inner.x;var eg=ea.zpp_inner;if(eg._validate!=null){eg._validate()}var ei=ea.zpp_inner.y;var eb;var ef=ee.zpp_inner;if(ef._validate!=null){ef._validate()}if(ee.zpp_inner.x==ej){var ed=ee.zpp_inner;if(ed._validate!=null){ed._validate()}eb=ee.zpp_inner.y==ei}else{eb=false}if(!eb){ee.zpp_inner.x=ej;ee.zpp_inner.y=ei;var ec=ee.zpp_inner;if(ec._invalidate!=null){ec._invalidate(ec)}}if(ea.zpp_inner.weak){var ek=ea.zpp_inner;ea.zpp_inner.outer=null;ea.zpp_inner=null;ea.zpp_pool=au.poolVec2;au.poolVec2=ea;if(ek.outer!=null){ek.outer.zpp_inner=null;ek.outer=null}ek._isimmutable=null;ek._validate=null;ek._invalidate=null;ek.next=bB.zpp_pool;bB.zpp_pool=ek}if(this.zpp_inner.wrap_force==null){this.zpp_inner.setupForce()}return this.zpp_inner.wrap_force};at.prototype.get_constraintVelocity=function(){if(this.zpp_inner.wrapcvel==null){this.zpp_inner.setup_cvel()}return this.zpp_inner.wrapcvel};at.prototype.get_rotation=function(){return this.zpp_inner.rot};at.prototype.set_rotation=function(eb){this.zpp_inner.immutable_midstep("Body::rotation");if(this.zpp_inner.rot!=eb){this.zpp_inner.rot=eb;var ed=this.zpp_inner;ed.zip_axis=true;var ea=ed.shapes.head;while(ea!=null){var ec=ea.elt;if(ec.type==1){ec.polygon.invalidate_gverts();ec.polygon.invalidate_gaxi()}ec.invalidate_worldCOM();ea=ea.next}ed.zip_worldCOM=true;this.zpp_inner.wake()}return this.zpp_inner.rot};at.prototype.get_angularVel=function(){return this.zpp_inner.angvel};at.prototype.set_angularVel=function(ea){if(this.zpp_inner.angvel!=ea){this.zpp_inner.angvel=ea;this.zpp_inner.wake()}return this.zpp_inner.angvel};at.prototype.get_kinAngVel=function(){return this.zpp_inner.kinangvel};at.prototype.set_kinAngVel=function(ea){if(this.zpp_inner.kinangvel!=ea){this.zpp_inner.kinangvel=ea;this.zpp_inner.wake()}return this.zpp_inner.kinangvel};at.prototype.get_torque=function(){return this.zpp_inner.torque};at.prototype.set_torque=function(ea){if(this.zpp_inner.torque!=ea){this.zpp_inner.torque=ea;this.zpp_inner.wake()}return this.zpp_inner.torque};at.prototype.get_bounds=function(){return this.zpp_inner.aabb.wrapper()};at.prototype.get_allowMovement=function(){return !this.zpp_inner.nomove};at.prototype.set_allowMovement=function(ea){this.zpp_inner.immutable_midstep("Body::"+(ea==null?"null":""+ea));if(!this.zpp_inner.nomove!=ea){this.zpp_inner.nomove=!ea;this.zpp_inner.invalidate_mass()}return !this.zpp_inner.nomove};at.prototype.get_allowRotation=function(){return !this.zpp_inner.norotate};at.prototype.set_allowRotation=function(ea){this.zpp_inner.immutable_midstep("Body::"+(ea==null?"null":""+ea));if(!this.zpp_inner.norotate!=ea){this.zpp_inner.norotate=!ea;this.zpp_inner.invalidate_inertia()}return !this.zpp_inner.norotate};at.prototype.get_massMode=function(){if(br.MassMode_DEFAULT==null){br.internal=true;br.MassMode_DEFAULT=new by();br.internal=false}var ea=br.MassMode_DEFAULT;if(br.MassMode_FIXED==null){br.internal=true;br.MassMode_FIXED=new by();br.internal=false}return[ea,br.MassMode_FIXED][this.zpp_inner.massMode]};at.prototype.set_massMode=function(ea){this.zpp_inner.immutable_midstep("Body::massMode");var eb;if(br.MassMode_DEFAULT==null){br.internal=true;br.MassMode_DEFAULT=new by();br.internal=false}if(ea==br.MassMode_DEFAULT){eb=0}else{eb=1}this.zpp_inner.massMode=eb;this.zpp_inner.invalidate_mass();if(br.MassMode_DEFAULT==null){br.internal=true;br.MassMode_DEFAULT=new by();br.internal=false}var ec=br.MassMode_DEFAULT;if(br.MassMode_FIXED==null){br.internal=true;br.MassMode_FIXED=new by();br.internal=false}return[ec,br.MassMode_FIXED][this.zpp_inner.massMode]};at.prototype.get_constraintMass=function(){if(!this.zpp_inner.world){this.zpp_inner.validate_mass()}return this.zpp_inner.smass};at.prototype.get_mass=function(){this.zpp_inner.validate_mass();return this.zpp_inner.cmass};at.prototype.set_mass=function(ea){this.zpp_inner.immutable_midstep("Body::mass");this.zpp_inner.massMode=1;this.zpp_inner.cmass=ea;this.zpp_inner.invalidate_mass();this.zpp_inner.validate_mass();return this.zpp_inner.cmass};at.prototype.get_gravMassMode=function(){if(br.GravMassMode_DEFAULT==null){br.internal=true;br.GravMassMode_DEFAULT=new cw();br.internal=false}var ea=br.GravMassMode_DEFAULT;if(br.GravMassMode_FIXED==null){br.internal=true;br.GravMassMode_FIXED=new cw();br.internal=false}var eb=br.GravMassMode_FIXED;if(br.GravMassMode_SCALED==null){br.internal=true;br.GravMassMode_SCALED=new cw();br.internal=false}return[ea,eb,br.GravMassMode_SCALED][this.zpp_inner.massMode]};at.prototype.set_gravMassMode=function(ea){this.zpp_inner.immutable_midstep("Body::gravMassMode");var eb;if(br.GravMassMode_SCALED==null){br.internal=true;br.GravMassMode_SCALED=new cw();br.internal=false}if(ea==br.GravMassMode_SCALED){eb=2}else{if(br.GravMassMode_DEFAULT==null){br.internal=true;br.GravMassMode_DEFAULT=new cw();br.internal=false}if(ea==br.GravMassMode_DEFAULT){eb=0}else{eb=1}}this.zpp_inner.gravMassMode=eb;this.zpp_inner.invalidate_gravMass();if(br.GravMassMode_DEFAULT==null){br.internal=true;br.GravMassMode_DEFAULT=new cw();br.internal=false}var ed=br.GravMassMode_DEFAULT;if(br.GravMassMode_FIXED==null){br.internal=true;br.GravMassMode_FIXED=new cw();br.internal=false}var ec=br.GravMassMode_FIXED;if(br.GravMassMode_SCALED==null){br.internal=true;br.GravMassMode_SCALED=new cw();br.internal=false}return[ed,ec,br.GravMassMode_SCALED][this.zpp_inner.massMode]};at.prototype.get_gravMass=function(){this.zpp_inner.validate_gravMass();return this.zpp_inner.gravMass};at.prototype.set_gravMass=function(ea){this.zpp_inner.immutable_midstep("Body::gravMass");this.zpp_inner.gravMassMode=1;this.zpp_inner.gravMass=ea;this.zpp_inner.invalidate_gravMass();this.zpp_inner.validate_gravMass();return this.zpp_inner.gravMass};at.prototype.get_gravMassScale=function(){this.zpp_inner.validate_gravMassScale();return this.zpp_inner.gravMassScale};at.prototype.set_gravMassScale=function(ea){this.zpp_inner.immutable_midstep("Body::gravMassScale");this.zpp_inner.gravMassMode=2;this.zpp_inner.gravMassScale=ea;this.zpp_inner.invalidate_gravMassScale();this.zpp_inner.validate_gravMassScale();return this.zpp_inner.gravMassScale};at.prototype.get_inertiaMode=function(){if(br.InertiaMode_DEFAULT==null){br.internal=true;br.InertiaMode_DEFAULT=new be();br.internal=false}var ea=br.InertiaMode_DEFAULT;if(br.InertiaMode_FIXED==null){br.internal=true;br.InertiaMode_FIXED=new be();br.internal=false}return[ea,br.InertiaMode_FIXED][this.zpp_inner.inertiaMode]};at.prototype.set_inertiaMode=function(ec){this.zpp_inner.immutable_midstep("Body::inertiaMode");var ea;if(br.InertiaMode_FIXED==null){br.internal=true;br.InertiaMode_FIXED=new be();br.internal=false}if(ec==br.InertiaMode_FIXED){ea=1}else{ea=0}this.zpp_inner.inertiaMode=ea;this.zpp_inner.invalidate_inertia();if(br.InertiaMode_DEFAULT==null){br.internal=true;br.InertiaMode_DEFAULT=new be();br.internal=false}var eb=br.InertiaMode_DEFAULT;if(br.InertiaMode_FIXED==null){br.internal=true;br.InertiaMode_FIXED=new be();br.internal=false}return[eb,br.InertiaMode_FIXED][this.zpp_inner.inertiaMode]};at.prototype.get_constraintInertia=function(){if(!this.zpp_inner.world){this.zpp_inner.validate_inertia()}return this.zpp_inner.sinertia};at.prototype.get_inertia=function(){this.zpp_inner.validate_inertia();return this.zpp_inner.cinertia};at.prototype.set_inertia=function(ea){this.zpp_inner.immutable_midstep("Body::inertia");this.zpp_inner.inertiaMode=1;this.zpp_inner.cinertia=ea;this.zpp_inner.invalidate_inertia();this.zpp_inner.validate_inertia();return this.zpp_inner.cinertia};at.prototype.connectedBodies=function(eb,ea){if(eb==null){eb=-1}return this.zpp_inner.connectedBodies(eb,ea)};at.prototype.interactingBodies=function(eb,ed,ea){if(ed==null){ed=-1}var ec;if(eb==null){ec=j.COL|j.SENSOR|j.FLUID}else{if(br.InteractionType_COLLISION==null){br.internal=true;br.InteractionType_COLLISION=new b3();br.internal=false}if(eb==br.InteractionType_COLLISION){ec=j.COL}else{if(br.InteractionType_SENSOR==null){br.internal=true;br.InteractionType_SENSOR=new b3();br.internal=false}if(eb==br.InteractionType_SENSOR){ec=j.SENSOR}else{ec=j.FLUID}}}return this.zpp_inner.interactingBodies(ec,ed,ea)};at.prototype.crushFactor=function(){var ec=0;var ek;if(au.poolVec2==null){ek=new r()}else{ek=au.poolVec2;au.poolVec2=ek.zpp_pool;ek.zpp_pool=null}if(ek.zpp_inner==null){var es;if(bB.zpp_pool==null){es=new bB()}else{es=bB.zpp_pool;bB.zpp_pool=es.next;es.next=null}es.weak=false;es._immutable=false;es.x=0;es.y=0;ek.zpp_inner=es;ek.zpp_inner.outer=ek}else{var ey;var eb=ek.zpp_inner;if(eb._validate!=null){eb._validate()}if(ek.zpp_inner.x==0){var ew=ek.zpp_inner;if(ew._validate!=null){ew._validate()}ey=ek.zpp_inner.y==0}else{ey=false}if(!ey){ek.zpp_inner.x=0;ek.zpp_inner.y=0;var ev=ek.zpp_inner;if(ev._invalidate!=null){ev._invalidate(ev)}}}ek.zpp_inner.weak=false;var eE=ek;if(this.zpp_inner.wrap_arbiters==null){this.zpp_inner.wrap_arbiters=U.get(this.zpp_inner.arbiters,true)}var eQ=this.zpp_inner.wrap_arbiters.iterator();while(true){eQ.zpp_inner.zpp_inner.valmod();var ed=eQ.zpp_inner.zpp_gl();eQ.zpp_critical=true;var eT;if(eQ.zpp_i0){if(this.zpp_inner.type==0){var eg=eh.zpp_inner;if(eg._validate!=null){eg._validate()}var eb=eh.zpp_inner.x;var ef=eh.zpp_inner;if(ef._validate!=null){ef._validate()}this.zpp_inner.circle.__translate(eb,eh.zpp_inner.y)}else{var ee=eh.zpp_inner;if(ee._validate!=null){ee._validate()}var ed=eh.zpp_inner.x;var ec=eh.zpp_inner;if(ec._validate!=null){ec._validate()}this.zpp_inner.polygon.__translate(ed,eh.zpp_inner.y)}}if(eh.zpp_inner.weak){var ea=eh.zpp_inner;eh.zpp_inner.outer=null;eh.zpp_inner=null;eh.zpp_pool=au.poolVec2;au.poolVec2=eh;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea._isimmutable=null;ea._validate=null;ea._invalidate=null;ea.next=bB.zpp_pool;bB.zpp_pool=ea}return this};ck.prototype.scale=function(eb,ea){this.zpp_inner.immutable_midstep("Shape::scale()");if(this.zpp_inner.type==0){var ec=eb*eb-ea*ea;if(ec*ecei.id}else{ee=false}}else{ee=true}}else{ee=true}if(ee){if(ec.space==this.manager.space){var ef=this.listeners;var eg;if(aF.zpp_pool==null){eg=new aF()}else{eg=aF.zpp_pool;aF.zpp_pool=eg.next;eg.next=null}eg.elt=ec;var ej=eg;if(eh==null){ej.next=ef.head;ef.head=ej}else{ej.next=eh.next;eh.next=ej}ef.pushmod=ef.modified=true;ef.length++;eh=ej}ea=ea.next}else{eh=ed;ed=ed.next}}}eb=eb.next}};cC.prototype.bodylisteners=null;cC.prototype.zip_bodylisteners=null;cC.prototype.invalidate_bodylisteners=function(){this.zip_bodylisteners=true};cC.prototype.validate_bodylisteners=function(){if(this.zip_bodylisteners){this.zip_bodylisteners=false;this.realvalidate_bodylisteners()}};cC.prototype.realvalidate_bodylisteners=function(){this.bodylisteners.clear();var eb=this.cbTypes.head;while(eb!=null){var ei=null;var ee=this.bodylisteners.head;var ea=eb.elt.bodylisteners.head;while(ea!=null){var ed=ea.elt;if(ee!=null&&ee.elt==ed){ea=ea.next;ei=ee;ee=ee.next}else{var ef;if(ee!=null){var ek=ee.elt;if(ed.precedence<=ek.precedence){if(ed.precedence==ek.precedence){ef=ed.id>ek.id}else{ef=false}}else{ef=true}}else{ef=true}if(ef){var ec;var eg=ed.options;if(!eg.nonemptyintersection(this.cbTypes,eg.excludes)){ec=ed.space==this.manager.space}else{ec=false}if(ec){var ej=this.bodylisteners;var eh;if(aT.zpp_pool==null){eh=new aT()}else{eh=aT.zpp_pool;aT.zpp_pool=eh.next;eh.next=null}eh.elt=ed;var el=eh;if(ei==null){el.next=ej.head;ej.head=el}else{el.next=ei.next;ei.next=el}ej.pushmod=ej.modified=true;ej.length++;ei=el}ea=ea.next}else{ei=ee;ee=ee.next}}}eb=eb.next}};cC.prototype.conlisteners=null;cC.prototype.zip_conlisteners=null;cC.prototype.invalidate_conlisteners=function(){this.zip_conlisteners=true};cC.prototype.validate_conlisteners=function(){if(this.zip_conlisteners){this.zip_conlisteners=false;this.realvalidate_conlisteners()}};cC.prototype.realvalidate_conlisteners=function(){this.conlisteners.clear();var eb=this.cbTypes.head;while(eb!=null){var ei=null;var ee=this.conlisteners.head;var ea=eb.elt.conlisteners.head;while(ea!=null){var ed=ea.elt;if(ee!=null&&ee.elt==ed){ea=ea.next;ei=ee;ee=ee.next}else{var ef;if(ee!=null){var ek=ee.elt;if(ed.precedence<=ek.precedence){if(ed.precedence==ek.precedence){ef=ed.id>ek.id}else{ef=false}}else{ef=true}}else{ef=true}if(ef){var ec;var eg=ed.options;if(!eg.nonemptyintersection(this.cbTypes,eg.excludes)){ec=ed.space==this.manager.space}else{ec=false}if(ec){var ej=this.conlisteners;var eh;if(aR.zpp_pool==null){eh=new aR()}else{eh=aR.zpp_pool;aR.zpp_pool=eh.next;eh.next=null}eh.elt=ed;var el=eh;if(ei==null){el.next=ej.head;ej.head=el}else{el.next=ei.next;ei.next=el}ej.pushmod=ej.modified=true;ej.length++;ei=el}ea=ea.next}else{ei=ee;ee=ee.next}}}eb=eb.next}};cC.prototype.validate=function(){if(this.zip_listeners){this.zip_listeners=false;this.realvalidate_listeners()}if(this.zip_bodylisteners){this.zip_bodylisteners=false;this.realvalidate_bodylisteners()}if(this.zip_conlisteners){this.zip_conlisteners=false;this.realvalidate_conlisteners()}};cC.prototype.interactors=null;cC.prototype.wrap_interactors=null;cC.prototype.constraints=null;cC.prototype.wrap_constraints=null;cC.prototype.addConstraint=function(ea){this.constraints.add(ea)};cC.prototype.addInteractor=function(ea){this.interactors.add(ea)};cC.prototype.remConstraint=function(ea){this.constraints.remove(ea)};cC.prototype.remInteractor=function(ea){this.interactors.remove(ea)};cC.prototype.free=function(){this.listeners.clear();this.zip_listeners=true;this.bodylisteners.clear();this.zip_bodylisteners=true;this.conlisteners.clear();this.zip_conlisteners=true;while(this.cbTypes.head!=null){this.cbTypes.pop_unsafe().cbsets.remove(this)}};cC.prototype.alloc=function(){};cC.prototype.__class__=cC;var ar=zpp_nape.callbacks.ZPP_CbSetPair=function(){this.listeners=null;this.zip_listeners=false;this.next=null;this.b=null;this.a=null;this.listeners=new cp()};ar.__name__=["zpp_nape","callbacks","ZPP_CbSetPair"];ar.get=function(eb,ea){var ec;if(ar.zpp_pool==null){ec=new ar()}else{ec=ar.zpp_pool;ar.zpp_pool=ec.next;ec.next=null}ec.zip_listeners=true;if(cC.setlt(eb,ea)){ec.a=eb;ec.b=ea}else{ec.a=ea;ec.b=eb}return ec};ar.setlt=function(ea,eb){if(!cC.setlt(ea.a,eb.a)){if(ea.a==eb.a){return cC.setlt(ea.b,eb.b)}else{return false}}else{return true}};ar.prototype.a=null;ar.prototype.b=null;ar.prototype.next=null;ar.prototype.free=function(){this.a=this.b=null;this.listeners.clear()};ar.prototype.alloc=function(){this.zip_listeners=true};ar.prototype.compatible=function(eb){var ec;var ee=eb.options1;var ea=this.a.cbTypes;if(ee.nonemptyintersection(ea,ee.includes)&&!ee.nonemptyintersection(ea,ee.excludes)){var eg=eb.options2;var ej=this.b.cbTypes;if(eg.nonemptyintersection(ej,eg.includes)){ec=!eg.nonemptyintersection(ej,eg.excludes)}else{ec=false}}else{ec=false}if(!ec){var ef=eb.options2;var ei=this.a.cbTypes;if(ef.nonemptyintersection(ei,ef.includes)&&!ef.nonemptyintersection(ei,ef.excludes)){var ed=eb.options1;var eh=this.b.cbTypes;if(ed.nonemptyintersection(eh,ed.includes)){return !ed.nonemptyintersection(eh,ed.excludes)}else{return false}}else{return false}}else{return true}};ar.prototype.zip_listeners=null;ar.prototype.listeners=null;ar.prototype.invalidate=function(){this.zip_listeners=true};ar.prototype.validate=function(){if(this.zip_listeners){this.zip_listeners=false;this.__validate()}};ar.prototype.__validate=function(){this.listeners.clear();var ek=this.a.listeners.head;var ee=this.b.listeners.head;while(ek!=null&&ee!=null){var ea=ek.elt;var ej=ee.elt;if(ea==ej){var ed;var ec;var eg=ea.options1;var eb=this.a.cbTypes;if(eg.nonemptyintersection(eb,eg.includes)&&!eg.nonemptyintersection(eb,eg.excludes)){var ei=ea.options2;var en=this.b.cbTypes;if(ei.nonemptyintersection(en,ei.includes)){ec=!ei.nonemptyintersection(en,ei.excludes)}else{ec=false}}else{ec=false}if(!ec){var eh=ea.options2;var em=this.a.cbTypes;if(eh.nonemptyintersection(em,eh.includes)&&!eh.nonemptyintersection(em,eh.excludes)){var ef=ea.options1;var el=this.b.cbTypes;if(ef.nonemptyintersection(el,ef.includes)){ed=!ef.nonemptyintersection(el,ef.excludes)}else{ed=false}}else{ed=false}}else{ed=true}if(ed){this.listeners.add(ea)}ek=ek.next;ee=ee.next}else{if(ea.precedence>ej.precedence||ea.precedence==ej.precedence&&ea.id>ej.id){ek=ek.next}else{ee=ee.next}}}};ar.prototype.empty_intersection=function(){return this.listeners.head==null};ar.prototype.single_intersection=function(ea){var eb=this.listeners.head;if(eb!=null&&eb.elt==ea){return eb.next==null}else{return false}};ar.prototype.forall=function(ed,eb){var ec=this.listeners.head;while(ec!=null){var ea=ec.elt;if(ea.event==ed){eb(ea)}ec=ec.next}};ar.prototype.__class__=ar;var cp=zpp_nape.util.ZNPList_ZPP_InteractionListener=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};cp.__name__=["zpp_nape","util","ZNPList_ZPP_InteractionListener"];cp.prototype.head=null;cp.prototype.begin=function(){return this.head};cp.prototype.modified=null;cp.prototype.pushmod=null;cp.prototype.length=null;cp.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};cp.prototype.add=function(ec){var eb;if(aF.zpp_pool==null){eb=new aF()}else{eb=aF.zpp_pool;aF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};cp.prototype.inlined_add=function(ec){var eb;if(aF.zpp_pool==null){eb=new aF()}else{eb=aF.zpp_pool;aF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};cp.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};cp.prototype.insert=function(ed,ec){var eb;if(aF.zpp_pool==null){eb=new aF()}else{eb=aF.zpp_pool;aF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};cp.prototype.inlined_insert=function(ed,ec){var eb;if(aF.zpp_pool==null){eb=new aF()}else{eb=aF.zpp_pool;aF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};cp.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aF.zpp_pool;aF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};cp.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aF.zpp_pool;aF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};cp.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};cp.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};cp.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aF.zpp_pool;aF.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};cp.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};cp.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aF.zpp_pool;aF.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};cp.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=aF.zpp_pool;aF.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};cp.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aF.zpp_pool;aF.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};cp.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aF.zpp_pool;aF.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};cp.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};cp.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aF.zpp_pool;aF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};cp.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aF.zpp_pool;aF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};cp.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};cp.prototype.empty=function(){return this.head==null};cp.prototype.size=function(){return this.length};cp.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};cp.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};cp.prototype.front=function(){return this.head.elt};cp.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};cp.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};cp.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};cp.prototype.__class__=cp;var bh=zpp_nape.util.ZNPList_ZPP_BodyListener=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bh.__name__=["zpp_nape","util","ZNPList_ZPP_BodyListener"];bh.prototype.head=null;bh.prototype.begin=function(){return this.head};bh.prototype.modified=null;bh.prototype.pushmod=null;bh.prototype.length=null;bh.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bh.prototype.add=function(ec){var eb;if(aT.zpp_pool==null){eb=new aT()}else{eb=aT.zpp_pool;aT.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bh.prototype.inlined_add=function(ec){var eb;if(aT.zpp_pool==null){eb=new aT()}else{eb=aT.zpp_pool;aT.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bh.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bh.prototype.insert=function(ed,ec){var eb;if(aT.zpp_pool==null){eb=new aT()}else{eb=aT.zpp_pool;aT.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bh.prototype.inlined_insert=function(ed,ec){var eb;if(aT.zpp_pool==null){eb=new aT()}else{eb=aT.zpp_pool;aT.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bh.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aT.zpp_pool;aT.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bh.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aT.zpp_pool;aT.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bh.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bh.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bh.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aT.zpp_pool;aT.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bh.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bh.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aT.zpp_pool;aT.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bh.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=aT.zpp_pool;aT.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bh.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aT.zpp_pool;aT.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bh.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aT.zpp_pool;aT.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bh.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bh.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aT.zpp_pool;aT.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bh.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aT.zpp_pool;aT.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bh.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bh.prototype.empty=function(){return this.head==null};bh.prototype.size=function(){return this.length};bh.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bh.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bh.prototype.front=function(){return this.head.elt};bh.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bh.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bh.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bh.prototype.__class__=bh;var cY=zpp_nape.util.ZNPList_ZPP_ConstraintListener=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};cY.__name__=["zpp_nape","util","ZNPList_ZPP_ConstraintListener"];cY.prototype.head=null;cY.prototype.begin=function(){return this.head};cY.prototype.modified=null;cY.prototype.pushmod=null;cY.prototype.length=null;cY.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};cY.prototype.add=function(ec){var eb;if(aR.zpp_pool==null){eb=new aR()}else{eb=aR.zpp_pool;aR.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};cY.prototype.inlined_add=function(ec){var eb;if(aR.zpp_pool==null){eb=new aR()}else{eb=aR.zpp_pool;aR.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};cY.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};cY.prototype.insert=function(ed,ec){var eb;if(aR.zpp_pool==null){eb=new aR()}else{eb=aR.zpp_pool;aR.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};cY.prototype.inlined_insert=function(ed,ec){var eb;if(aR.zpp_pool==null){eb=new aR()}else{eb=aR.zpp_pool;aR.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};cY.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aR.zpp_pool;aR.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};cY.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aR.zpp_pool;aR.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};cY.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};cY.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};cY.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aR.zpp_pool;aR.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};cY.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};cY.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aR.zpp_pool;aR.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};cY.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=aR.zpp_pool;aR.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};cY.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aR.zpp_pool;aR.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};cY.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aR.zpp_pool;aR.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};cY.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};cY.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aR.zpp_pool;aR.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};cY.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aR.zpp_pool;aR.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};cY.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};cY.prototype.empty=function(){return this.head==null};cY.prototype.size=function(){return this.length};cY.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};cY.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};cY.prototype.front=function(){return this.head.elt};cY.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};cY.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};cY.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};cY.prototype.__class__=cY;var m=zpp_nape.util.ZNPList_ZPP_Constraint=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};m.__name__=["zpp_nape","util","ZNPList_ZPP_Constraint"];m.prototype.head=null;m.prototype.begin=function(){return this.head};m.prototype.modified=null;m.prototype.pushmod=null;m.prototype.length=null;m.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};m.prototype.add=function(ec){var eb;if(cx.zpp_pool==null){eb=new cx()}else{eb=cx.zpp_pool;cx.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};m.prototype.inlined_add=function(ec){var eb;if(cx.zpp_pool==null){eb=new cx()}else{eb=cx.zpp_pool;cx.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};m.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};m.prototype.insert=function(ed,ec){var eb;if(cx.zpp_pool==null){eb=new cx()}else{eb=cx.zpp_pool;cx.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};m.prototype.inlined_insert=function(ed,ec){var eb;if(cx.zpp_pool==null){eb=new cx()}else{eb=cx.zpp_pool;cx.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};m.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cx.zpp_pool;cx.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};m.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cx.zpp_pool;cx.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};m.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};m.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};m.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cx.zpp_pool;cx.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};m.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};m.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cx.zpp_pool;cx.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};m.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cx.zpp_pool;cx.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};m.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cx.zpp_pool;cx.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};m.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cx.zpp_pool;cx.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};m.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};m.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cx.zpp_pool;cx.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};m.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cx.zpp_pool;cx.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};m.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};m.prototype.empty=function(){return this.head==null};m.prototype.size=function(){return this.length};m.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};m.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};m.prototype.front=function(){return this.head.elt};m.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};m.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};m.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};m.prototype.__class__=m;var bn=zpp_nape.util.ZNPList_ZPP_Interactor=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bn.__name__=["zpp_nape","util","ZNPList_ZPP_Interactor"];bn.prototype.head=null;bn.prototype.begin=function(){return this.head};bn.prototype.modified=null;bn.prototype.pushmod=null;bn.prototype.length=null;bn.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bn.prototype.add=function(ec){var eb;if(g.zpp_pool==null){eb=new g()}else{eb=g.zpp_pool;g.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bn.prototype.inlined_add=function(ec){var eb;if(g.zpp_pool==null){eb=new g()}else{eb=g.zpp_pool;g.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bn.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bn.prototype.insert=function(ed,ec){var eb;if(g.zpp_pool==null){eb=new g()}else{eb=g.zpp_pool;g.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bn.prototype.inlined_insert=function(ed,ec){var eb;if(g.zpp_pool==null){eb=new g()}else{eb=g.zpp_pool;g.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bn.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=g.zpp_pool;g.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bn.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=g.zpp_pool;g.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bn.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bn.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bn.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=g.zpp_pool;g.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bn.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bn.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=g.zpp_pool;g.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bn.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=g.zpp_pool;g.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bn.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=g.zpp_pool;g.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bn.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=g.zpp_pool;g.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bn.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bn.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=g.zpp_pool;g.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bn.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=g.zpp_pool;g.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bn.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bn.prototype.empty=function(){return this.head==null};bn.prototype.size=function(){return this.length};bn.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bn.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bn.prototype.front=function(){return this.head.elt};bn.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bn.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bn.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bn.prototype.__class__=bn;var af=zpp_nape.util.ZNPList_ZPP_CbSet=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};af.__name__=["zpp_nape","util","ZNPList_ZPP_CbSet"];af.prototype.head=null;af.prototype.begin=function(){return this.head};af.prototype.modified=null;af.prototype.pushmod=null;af.prototype.length=null;af.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};af.prototype.add=function(ec){var eb;if(cO.zpp_pool==null){eb=new cO()}else{eb=cO.zpp_pool;cO.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};af.prototype.inlined_add=function(ec){var eb;if(cO.zpp_pool==null){eb=new cO()}else{eb=cO.zpp_pool;cO.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};af.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};af.prototype.insert=function(ed,ec){var eb;if(cO.zpp_pool==null){eb=new cO()}else{eb=cO.zpp_pool;cO.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};af.prototype.inlined_insert=function(ed,ec){var eb;if(cO.zpp_pool==null){eb=new cO()}else{eb=cO.zpp_pool;cO.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};af.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cO.zpp_pool;cO.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};af.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cO.zpp_pool;cO.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};af.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};af.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};af.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cO.zpp_pool;cO.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};af.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};af.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cO.zpp_pool;cO.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};af.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cO.zpp_pool;cO.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};af.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cO.zpp_pool;cO.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};af.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cO.zpp_pool;cO.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};af.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};af.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cO.zpp_pool;cO.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};af.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cO.zpp_pool;cO.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};af.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};af.prototype.empty=function(){return this.head==null};af.prototype.size=function(){return this.length};af.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};af.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};af.prototype.front=function(){return this.head.elt};af.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};af.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};af.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};af.prototype.__class__=af;var db=zpp_nape.callbacks.ZPP_CbType=function(){this.conlisteners=null;this.bodylisteners=null;this.listeners=null;this.cbsets=null;this.id=0;this.userData=null;this.outer=null;this.id=cr.CbType();this.listeners=new cp();this.bodylisteners=new bh();this.conlisteners=new cY();this.constraints=new m();this.interactors=new bn();this.cbsets=new af()};db.__name__=["zpp_nape","callbacks","ZPP_CbType"];db.setlt=function(eb,ea){return eb.ided.precedence||eg.precedence==ed.precedence&&eg.id>ed.id){break}ec=ea;ea=ea.next}var ee=this.listeners;var ef;if(aF.zpp_pool==null){ef=new aF()}else{ef=aF.zpp_pool;aF.zpp_pool=ef.next;ef.next=null}ef.elt=eg;var ei=ef;if(ec==null){ei.next=ee.head;ee.head=ei}else{ei.next=ec.next;ec.next=ei}ee.pushmod=ee.modified=true;ee.length++;var eh=this.cbsets.head;while(eh!=null){var eb=eh.elt;eb.zip_listeners=true;eb.invalidate_pairs();eh=eh.next}};db.prototype.removeint=function(eb){this.listeners.remove(eb);var ec=this.cbsets.head;while(ec!=null){var ea=ec.elt;ea.zip_listeners=true;ea.invalidate_pairs();ec=ec.next}};db.prototype.invalidateint=function(){var eb=this.cbsets.head;while(eb!=null){var ea=eb.elt;ea.zip_listeners=true;ea.invalidate_pairs();eb=eb.next}};db.prototype.bodylisteners=null;db.prototype.addbody=function(ea){var eg=null;var ee=this.bodylisteners.head;while(ee!=null){var ed=ee.elt;if(ea.precedence>ed.precedence||ea.precedence==ed.precedence&&ea.id>ed.id){break}eg=ee;ee=ee.next}var eh=this.bodylisteners;var ec;if(aT.zpp_pool==null){ec=new aT()}else{ec=aT.zpp_pool;aT.zpp_pool=ec.next;ec.next=null}ec.elt=ea;var eb=ec;if(eg==null){eb.next=eh.head;eh.head=eb}else{eb.next=eg.next;eg.next=eb}eh.pushmod=eh.modified=true;eh.length++;var ef=this.cbsets.head;while(ef!=null){ef.elt.zip_bodylisteners=true;ef=ef.next}};db.prototype.removebody=function(ea){this.bodylisteners.remove(ea);var eb=this.cbsets.head;while(eb!=null){eb.elt.zip_bodylisteners=true;eb=eb.next}};db.prototype.invalidatebody=function(){var ea=this.cbsets.head;while(ea!=null){ea.elt.zip_bodylisteners=true;ea=ea.next}};db.prototype.conlisteners=null;db.prototype.addconstraint=function(ea){var eg=null;var ee=this.conlisteners.head;while(ee!=null){var ed=ee.elt;if(ea.precedence>ed.precedence||ea.precedence==ed.precedence&&ea.id>ed.id){break}eg=ee;ee=ee.next}var eh=this.conlisteners;var ec;if(aR.zpp_pool==null){ec=new aR()}else{ec=aR.zpp_pool;aR.zpp_pool=ec.next;ec.next=null}ec.elt=ea;var eb=ec;if(eg==null){eb.next=eh.head;eh.head=eb}else{eb.next=eg.next;eg.next=eb}eh.pushmod=eh.modified=true;eh.length++;var ef=this.cbsets.head;while(ef!=null){ef.elt.zip_conlisteners=true;ef=ef.next}};db.prototype.removeconstraint=function(ea){this.conlisteners.remove(ea);var eb=this.cbsets.head;while(eb!=null){eb.elt.zip_conlisteners=true;eb=eb.next}};db.prototype.invalidateconstraint=function(){var ea=this.cbsets.head;while(ea!=null){ea.elt.zip_conlisteners=true;ea=ea.next}};db.prototype.__class__=db;var br=zpp_nape.util.ZPP_Flags=function(){};br.__name__=["zpp_nape","util","ZPP_Flags"];br.GravMassMode_DEFAULT=null;br.GravMassMode_FIXED=null;br.GravMassMode_SCALED=null;br.InertiaMode_DEFAULT=null;br.InertiaMode_FIXED=null;br.MassMode_DEFAULT=null;br.MassMode_FIXED=null;br.BodyType_STATIC=null;br.BodyType_DYNAMIC=null;br.BodyType_KINEMATIC=null;br.ListenerType_BODY=null;br.PreFlag_ACCEPT=null;br.ListenerType_CONSTRAINT=null;br.PreFlag_IGNORE=null;br.ListenerType_INTERACTION=null;br.PreFlag_ACCEPT_ONCE=null;br.ListenerType_PRE=null;br.PreFlag_IGNORE_ONCE=null;br.CbEvent_BEGIN=null;br.InteractionType_COLLISION=null;br.CbEvent_ONGOING=null;br.InteractionType_SENSOR=null;br.CbEvent_END=null;br.InteractionType_FLUID=null;br.CbEvent_WAKE=null;br.InteractionType_ANY=null;br.CbEvent_SLEEP=null;br.CbEvent_BREAK=null;br.CbEvent_PRE=null;br.Winding_UNDEFINED=null;br.Winding_CLOCKWISE=null;br.Winding_ANTICLOCKWISE=null;br.ValidationResult_VALID=null;br.ValidationResult_DEGENERATE=null;br.ValidationResult_CONCAVE=null;br.ValidationResult_SELF_INTERSECTING=null;br.ShapeType_CIRCLE=null;br.ShapeType_POLYGON=null;br.Broadphase_DYNAMIC_AABB_TREE=null;br.Broadphase_SWEEP_AND_PRUNE=null;br.ArbiterType_COLLISION=null;br.ArbiterType_SENSOR=null;br.ArbiterType_FLUID=null;br.prototype.__class__=br;var cc=zpp_nape.callbacks.ZPP_Listener=function(){this.space=null;this.interaction=null;this.constraint=null;this.body=null;this.precedence=0;this.event=0;this.type=0;this.id=0;this.outer=null;this.id=cr.Listener()};cc.__name__=["zpp_nape","callbacks","ZPP_Listener"];cc.setlt=function(eb,ea){if(eb.precedence<=ea.precedence){if(eb.precedence==ea.precedence){return eb.id>ea.id}else{return false}}else{return true}};cc.prototype.outer=null;cc.prototype.id=null;cc.prototype.type=null;cc.prototype.event=null;cc.prototype.precedence=null;cc.prototype.body=null;cc.prototype.constraint=null;cc.prototype.interaction=null;cc.prototype.space=null;cc.prototype.swapEvent=function(ea){};cc.prototype.invalidate_precedence=function(){};cc.prototype.addedToSpace=function(){};cc.prototype.removedFromSpace=function(){};cc.prototype.__class__=cc;var bW=zpp_nape.callbacks.ZPP_BodyListener=function(ea,ec,eb){this.handler=null;this.options=null;this.outer_zn=null;cc.call(this);this.event=ec;this.handler=eb;this.body=this;this.type=0;this.options=ea.zpp_inner};bW.__name__=["zpp_nape","callbacks","ZPP_BodyListener"];bW.__super__=cc;bW.prototype=Object.create(cc.prototype);bW.prototype.outer_zn=null;bW.prototype.options=null;bW.prototype.handler=null;bW.prototype.addedToSpace=function(){this.options.handler=dX(this,this.cbtype_change);var ea=this.options.includes.head;while(ea!=null){var ec=ea.elt;var eb=null;var eh=ec.bodylisteners.head;while(eh!=null){var ed=eh.elt;if(this.precedence>ed.precedence||this.precedence==ed.precedence&&this.id>ed.id){break}eb=eh;eh=eh.next}var ee=ec.bodylisteners;var ef;if(aT.zpp_pool==null){ef=new aT()}else{ef=aT.zpp_pool;aT.zpp_pool=ef.next;ef.next=null}ef.elt=this;var ei=ef;if(eb==null){ei.next=ee.head;ee.head=ei}else{ei.next=eb.next;eb.next=ei}ee.pushmod=ee.modified=true;ee.length++;var eg=ec.cbsets.head;while(eg!=null){eg.elt.zip_bodylisteners=true;eg=eg.next}ea=ea.next}};bW.prototype.removedFromSpace=function(){var eb=this.options.includes.head;while(eb!=null){var ea=eb.elt;ea.bodylisteners.remove(this);var ec=ea.cbsets.head;while(ec!=null){ec.elt.zip_bodylisteners=true;ec=ec.next}eb=eb.next}this.options.handler=null};bW.prototype.cbtype_change=function(ee,ei,el){this.removedFromSpace();var ef=this.options;if(ei){if(el){var ed=null;var eb=ef.includes.head;while(eb!=null){if(ee.ided.precedence||this.precedence==ed.precedence&&this.id>ed.id){break}eb=eh;eh=eh.next}var ee=ec.conlisteners;var ef;if(aR.zpp_pool==null){ef=new aR()}else{ef=aR.zpp_pool;aR.zpp_pool=ef.next;ef.next=null}ef.elt=this;var ei=ef;if(eb==null){ei.next=ee.head;ee.head=ei}else{ei.next=eb.next;eb.next=ei}ee.pushmod=ee.modified=true;ee.length++;var eg=ec.cbsets.head;while(eg!=null){eg.elt.zip_conlisteners=true;eg=eg.next}ea=ea.next}};O.prototype.removedFromSpace=function(){var eb=this.options.includes.head;while(eb!=null){var ea=eb.elt;ea.conlisteners.remove(this);var ec=ea.cbsets.head;while(ec!=null){ec.elt.zip_conlisteners=true;ec=ec.next}eb=eb.next}this.options.handler=null};O.prototype.cbtype_change=function(ee,ei,el){this.removedFromSpace();var ef=this.options;if(ei){if(el){var ed=null;var eb=ef.includes.head;while(eb!=null){if(ee.id0&&ea.next!=null){this.erase(ea)}return ea.next};x.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=b.zpp_pool;b.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};x.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=b.zpp_pool;b.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};x.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};x.prototype.empty=function(){return this.head==null};x.prototype.size=function(){return this.length};x.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};x.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};x.prototype.front=function(){return this.head.elt};x.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};x.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};x.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};x.prototype.__class__=x;var c1=zpp_nape.callbacks.ZPP_InteractionListener=function(ed,ec,eb,ea){this.handlerp=null;this.pure=false;this.allowSleepingCallbacks=false;this.handleri=null;this.options2=null;this.options1=null;this.itype=0;this.outer_znp=null;this.outer_zni=null;cc.call(this);this.type=ea;this.interaction=this;this.event=eb;this.options1=ed.zpp_inner;this.options2=ec.zpp_inner;this.allowSleepingCallbacks=false};c1.__name__=["zpp_nape","callbacks","ZPP_InteractionListener"];c1.__super__=cc;c1.prototype=Object.create(cc.prototype);c1.prototype.outer_zni=null;c1.prototype.outer_znp=null;c1.prototype.itype=null;c1.prototype.options1=null;c1.prototype.options2=null;c1.prototype.handleri=null;c1.prototype.allowSleepingCallbacks=null;c1.prototype.pure=null;c1.prototype.handlerp=null;c1.prototype.setInteractionType=function(ea){this.itype=ea};c1.prototype.wake=function(){var ee=this.options1.includes.head;var ed=this.options2.includes.head;while(ee!=null&&ed!=null){var ec=ee.elt;var eb=ed.elt;if(ec==eb){var ea=ec.interactors.head;while(ea!=null){ea.elt.wake();ea=ea.next}ee=ee.next;ed=ed.next}else{if(ec.ideS.precedence||eV.precedence==eS.precedence&&eV.id>eS.id){break}es=ej;ej=ej.next}var eh=eg.listeners;var eA;if(aF.zpp_pool==null){eA=new aF()}else{eA=aF.zpp_pool;aF.zpp_pool=eA.next;eA.next=null}eA.elt=eV;var ei=eA;if(es==null){ei.next=eh.head;eh.head=ei}else{ei.next=es.next;es.next=ei}eh.pushmod=eh.modified=true;eh.length++;var ez=eg.cbsets.head;while(ez!=null){var eB=ez.elt;eB.zip_listeners=true;eB.invalidate_pairs();ez=ez.next}if(eN){var ey=eg.interactors.head;while(ey!=null){ey.elt.wake();ey=ey.next}}el=el.next;ek=ek.next}else{if(eg.ideU.precedence||eV.precedence==eU.precedence&&eV.id>eU.id){break}eq=ex;ex=ex.next}var eP=eg.listeners;var eG;if(aF.zpp_pool==null){eG=new aF()}else{eG=aF.zpp_pool;aF.zpp_pool=eG.next;eG.next=null}eG.elt=eV;var ee=eG;if(eq==null){ee.next=eP.head;eP.head=ee}else{ee.next=eq.next;eq.next=ee}eP.pushmod=eP.modified=true;eP.length++;var ew=eg.cbsets.head;while(ew!=null){var ed=ew.elt;ed.zip_listeners=true;ed.invalidate_pairs();ew=ew.next}if(eN){var ev=eg.interactors.head;while(ev!=null){ev.elt.wake();ev=ev.next}}el=el.next}else{var eo=null;var eu=ef.listeners.head;while(eu!=null){var eT=eu.elt;if(eV.precedence>eT.precedence||eV.precedence==eT.precedence&&eV.id>eT.id){break}eo=eu;eu=eu.next}var eM=ef.listeners;var eE;if(aF.zpp_pool==null){eE=new aF()}else{eE=aF.zpp_pool;aF.zpp_pool=eE.next;eE.next=null}eE.elt=eV;var ec=eE;if(eo==null){ec.next=eM.head;eM.head=ec}else{ec.next=eo.next;eo.next=ec}eM.pushmod=eM.modified=true;eM.length++;var et=ef.cbsets.head;while(et!=null){var eb=et.elt;eb.zip_listeners=true;eb.invalidate_pairs();et=et.next}if(eN){var er=ef.interactors.head;while(er!=null){er.elt.wake();er=er.next}}ek=ek.next}}}while(el!=null){var e0=el.elt;var en=null;var ep=e0.listeners.head;while(ep!=null){var eR=ep.elt;if(eV.precedence>eR.precedence||eV.precedence==eR.precedence&&eV.id>eR.id){break}en=ep;ep=ep.next}var eK=e0.listeners;var eD;if(aF.zpp_pool==null){eD=new aF()}else{eD=aF.zpp_pool;aF.zpp_pool=eD.next;eD.next=null}eD.elt=eV;var ea=eD;if(en==null){ea.next=eK.head;eK.head=ea}else{ea.next=en.next;en.next=ea}eK.pushmod=eK.modified=true;eK.length++;var eO=e0.cbsets.head;while(eO!=null){var eY=eO.elt;eY.zip_listeners=true;eY.invalidate_pairs();eO=eO.next}if(eN){var eL=e0.interactors.head;while(eL!=null){eL.elt.wake();eL=eL.next}}el=el.next}while(ek!=null){var eX=ek.elt;var em=null;var eJ=eX.listeners.head;while(eJ!=null){var eQ=eJ.elt;if(eV.precedence>eQ.precedence||eV.precedence==eQ.precedence&&eV.id>eQ.id){break}em=eJ;eJ=eJ.next}var eI=eX.listeners;var eC;if(aF.zpp_pool==null){eC=new aF()}else{eC=aF.zpp_pool;aF.zpp_pool=eC.next;eC.next=null}eC.elt=eV;var eZ=eC;if(em==null){eZ.next=eI.head;eI.head=eZ}else{eZ.next=em.next;em.next=eZ}eI.pushmod=eI.modified=true;eI.length++;var eH=eX.cbsets.head;while(eH!=null){var eW=eH.elt;eW.zip_listeners=true;eW.invalidate_pairs();eH=eH.next}if(eN){var eF=eX.interactors.head;while(eF!=null){eF.elt.wake();eF=eF.next}}ek=ek.next}this.options1.handler=dX(this,this.cbtype_change1);this.options2.handler=dX(this,this.cbtype_change2);this.with_uniquesets(true)};c1.prototype.removedFromSpace=function(){var eg=this;this.with_uniquesets(false);var eq=this.type==3;var ef=this.options1.includes.head;var ee=this.options2.includes.head;while(ef!=null&&ee!=null){var ed=ef.elt;var ec=ee.elt;if(ed==ec){ed.listeners.remove(eg);var es=ed.cbsets.head;while(es!=null){var ep=es.elt;ep.zip_listeners=true;ep.invalidate_pairs();es=es.next}if(eq){var er=ed.interactors.head;while(er!=null){er.elt.wake();er=er.next}}ef=ef.next;ee=ee.next}else{if(ed.ide1.precedence||e4.precedence==e1.precedence&&e4.id>e1.id){break}es=ez;ez=ez.next}var eh=eg.listeners;var eA;if(aF.zpp_pool==null){eA=new aF()}else{eA=aF.zpp_pool;aF.zpp_pool=eA.next;eA.next=null}eA.elt=e4;var ei=eA;if(es==null){ei.next=eh.head;eh.head=ei}else{ei.next=es.next;es.next=ei}eh.pushmod=eh.modified=true;eh.length++;var ey=eg.cbsets.head;while(ey!=null){var ed=ey.elt;ed.zip_listeners=true;ed.invalidate_pairs();ey=ey.next}if(eT){var ex=eg.interactors.head;while(ex!=null){ex.elt.wake();ex=ex.next}}el=el.next;ek=ek.next}else{if(eg.ide3.precedence||e4.precedence==e3.precedence&&e4.id>e3.id){break}eq=ev;ev=ev.next}var eW=eg.listeners;var eL;if(aF.zpp_pool==null){eL=new aF()}else{eL=aF.zpp_pool;aF.zpp_pool=eL.next;eL.next=null}eL.elt=e4;var ee=eL;if(eq==null){ee.next=eW.head;eW.head=ee}else{ee.next=eq.next;eq.next=ee}eW.pushmod=eW.modified=true;eW.length++;var eu=eg.cbsets.head;while(eu!=null){var fa=eu.elt;fa.zip_listeners=true;fa.invalidate_pairs();eu=eu.next}if(eT){var et=eg.interactors.head;while(et!=null){et.elt.wake();et=et.next}}el=el.next}else{ef.listeners.remove(e4);var er=ef.cbsets.head;while(er!=null){var e8=er.elt;e8.zip_listeners=true;e8.invalidate_pairs();er=er.next}var eo=null;var ep=ef.listeners.head;while(ep!=null){var e2=ep.elt;if(e4.precedence>e2.precedence||e4.precedence==e2.precedence&&e4.id>e2.id){break}eo=ep;ep=ep.next}var eS=ef.listeners;var eJ;if(aF.zpp_pool==null){eJ=new aF()}else{eJ=aF.zpp_pool;aF.zpp_pool=eJ.next;eJ.next=null}eJ.elt=e4;var ec=eJ;if(eo==null){ec.next=eS.head;eS.head=ec}else{ec.next=eo.next;eo.next=ec}eS.pushmod=eS.modified=true;eS.length++;var eV=ef.cbsets.head;while(eV!=null){var e7=eV.elt;e7.zip_listeners=true;e7.invalidate_pairs();eV=eV.next}if(eT){var eR=ef.interactors.head;while(eR!=null){eR.elt.wake();eR=eR.next}}ek=ek.next}}}while(el!=null){var e6=el.elt;e6.listeners.remove(e4);var eP=e6.cbsets.head;while(eP!=null){var e5=eP.elt;e5.zip_listeners=true;e5.invalidate_pairs();eP=eP.next}var en=null;var eN=e6.listeners.head;while(eN!=null){var e0=eN.elt;if(e4.precedence>e0.precedence||e4.precedence==e0.precedence&&e4.id>e0.id){break}en=eN;eN=eN.next}var eO=e6.listeners;var eH;if(aF.zpp_pool==null){eH=new aF()}else{eH=aF.zpp_pool;aF.zpp_pool=eH.next;eH.next=null}eH.elt=e4;var ea=eH;if(en==null){ea.next=eO.head;eO.head=ea}else{ea.next=en.next;en.next=ea}eO.pushmod=eO.modified=true;eO.length++;var eK=e6.cbsets.head;while(eK!=null){var eY=eK.elt;eY.zip_listeners=true;eY.invalidate_pairs();eK=eK.next}if(eT){var eI=e6.interactors.head;while(eI!=null){eI.elt.wake();eI=eI.next}}el=el.next}while(ek!=null){var eX=ek.elt;eX.listeners.remove(e4);var eG=eX.cbsets.head;while(eG!=null){var eU=eG.elt;eU.zip_listeners=true;eU.invalidate_pairs();eG=eG.next}var em=null;var eF=eX.listeners.head;while(eF!=null){var eZ=eF.elt;if(e4.precedence>eZ.precedence||e4.precedence==eZ.precedence&&e4.id>eZ.id){break}em=eF;eF=eF.next}var eM=eX.listeners;var eE;if(aF.zpp_pool==null){eE=new aF()}else{eE=aF.zpp_pool;aF.zpp_pool=eE.next;eE.next=null}eE.elt=e4;var e9=eE;if(em==null){e9.next=eM.head;eM.head=e9}else{e9.next=em.next;em.next=e9}eM.pushmod=eM.modified=true;eM.length++;var eD=eX.cbsets.head;while(eD!=null){var eQ=eD.elt;eQ.zip_listeners=true;eQ.invalidate_pairs();eD=eD.next}if(eT){var eC=eX.interactors.head;while(eC!=null){eC.elt.wake();eC=eC.next}}ek=ek.next}}};c1.prototype.cbtype_change1=function(ea,ec,eb){this.cbtype_change(this.options1,ea,ec,eb)};c1.prototype.cbtype_change2=function(ea,ec,eb){this.cbtype_change(this.options2,ea,ec,eb)};c1.prototype.cbtype_change=function(en,ee,ei,ek){this.removedFromSpace();if(ei){if(ek){var ed=null;var eb=en.includes.head;while(eb!=null){if(ee.idthis.jointMax){eb-=this.jointMax;this.scale=1;ea=false}else{this.scale=0;eb=0;ea=true}}}return ea};dt.prototype.bodyImpulse=function(ea){if(this.stepped){if(ea==this.b1){return q.get(0,0,-this.scale*this.jAcc)}else{return q.get(0,0,this.ratio*this.scale*this.jAcc)}}else{return q.get(0,0,0)}};dt.prototype.activeBodies=function(){if(this.b1!=null){this.b1.constraints.add(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.add(this)}}};dt.prototype.inactiveBodies=function(){if(this.b1!=null){this.b1.constraints.remove(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.remove(this)}}};dt.prototype.b1=null;dt.prototype.b2=null;dt.prototype.kMass=null;dt.prototype.jAcc=null;dt.prototype.jMax=null;dt.prototype.gamma=null;dt.prototype.bias=null;dt.prototype.stepped=null;dt.prototype.copy=function(ea,eb){var ed=new aA(null,null,this.jointMin,this.jointMax,this.ratio);this.copyto(ed);if(ea!=null&&this.b1!=null){var eh=null;var ec=0;while(ecthis.jointMax){throw new cE("Error: AngleJoint must have jointMin <= jointMax")}if(this.b1.type!=2&&this.b2.type!=2){throw new cE("Error: Constraints cannot have both bodies non-dynamic")}};dt.prototype.wake_connected=function(){if(this.b1!=null&&this.b1.type==2){this.b1.wake()}if(this.b2!=null&&this.b2.type==2){this.b2.wake()}};dt.prototype.forest=function(){if(this.b1.type==2){var en;if(this.b1.component==this.b1.component.parent){en=this.b1.component}else{var eo=this.b1.component;var em=null;while(eo!=eo.parent){var ei=eo.parent;eo.parent=em;em=eo;eo=ei}while(em!=null){var eh=em.parent;em.parent=eo;em=eh}en=eo}var er;if(this.component==this.component.parent){er=this.component}else{var et=this.component;var el=null;while(et!=et.parent){var eg=et.parent;et.parent=el;el=et;et=eg}while(el!=null){var ef=el.parent;el.parent=et;el=ef}er=et}if(en!=er){if(en.ranker.rank){er.parent=en}else{er.parent=en;en.rank++}}}}if(this.b2.type==2){var ee;if(this.b2.component==this.b2.component.parent){ee=this.b2.component}else{var es=this.b2.component;var ek=null;while(es!=es.parent){var ed=es.parent;es.parent=ek;ek=es;es=ed}while(ek!=null){var ec=ek.parent;ek.parent=es;ek=ec}ee=es}var ep;if(this.component==this.component.parent){ep=this.component}else{var eq=this.component;var ej=null;while(eq!=eq.parent){var eb=eq.parent;eq.parent=ej;ej=eq;eq=eb}while(ej!=null){var ea=ej.parent;ej.parent=eq;ej=ea}ep=eq}if(ee!=ep){if(ee.rankep.rank){ep.parent=ee}else{ep.parent=ee;ee.rank++}}}}};dt.prototype.pair_exists=function(eb,ea){if(!(this.b1.id==eb&&this.b2.id==ea)){if(this.b1.id==ea){return this.b2.id==eb}else{return false}}else{return true}};dt.prototype.clearcache=function(){this.jAcc=0;this.pre_dt=-1;this.slack=false};dt.prototype.preStep=function(eb){if(this.pre_dt==-1){this.pre_dt=eb}var ee=eb/this.pre_dt;this.pre_dt=eb;this.stepped=true;this.equal=this.jointMin==this.jointMax;var ef=this.ratio*this.b2.rot-this.b1.rot;if(this.equal){ef-=this.jointMax;this.slack=false;this.scale=1}else{if(efthis.jointMax){ef-=this.jointMax;this.scale=1;this.slack=false}else{this.scale=0;ef=0;this.slack=true}}}var ed=ef;if(!this.slack){this.kMass=this.b1.sinertia+this.ratio*this.ratio*this.b2.sinertia;if(this.kMass!=0){this.kMass=1/this.kMass}else{this.jAcc=0}if(!this.stiff){if(this.breakUnderError&&ed*ed>this.maxError*this.maxError){return true}var ea;var eg=2*Math.PI*this.frequency;this.gamma=1/(eb*eg*(2*this.damping+eg*eb));var ec=1/(1+this.gamma);ea=eb*eg*eg*this.gamma;this.gamma*=ec;this.kMass*=ec;this.bias=-ed*ea;if(this.bias<-this.maxError){this.bias=-this.maxError}else{if(this.bias>this.maxError){this.bias=this.maxError}}}else{this.bias=0;this.gamma=0}this.jAcc*=ee;this.jMax=this.maxForce*eb}return false};dt.prototype.warmStart=function(){if(!this.slack){this.b1.angvel-=this.scale*this.b1.iinertia*this.jAcc;this.b2.angvel+=this.ratio*this.scale*this.b2.iinertia*this.jAcc}};dt.prototype.applyImpulseVel=function(){if(this.slack){return false}var ea=this.kMass*(this.bias-this.scale*(this.ratio*(this.b2.angvel+this.b2.kinangvel)-this.b1.angvel-this.b1.kinangvel))-this.jAcc*this.gamma;var eb=this.jAcc;this.jAcc+=ea;if(!this.equal&&this.jAcc>0){this.jAcc=0}if(this.breakUnderForce&&(this.jAcc>this.jMax||this.jAcc<-this.jMax)){return true}if(!this.stiff){if(this.jAcc>this.jMax){this.jAcc=this.jMax}else{if(this.jAcc<-this.jMax){this.jAcc=-this.jMax}}}ea=this.jAcc-eb;this.b1.angvel-=this.scale*this.b1.iinertia*ea;this.b2.angvel+=this.ratio*this.scale*this.b2.iinertia*ea;return false};dt.prototype.applyImpulsePos=function(){var ep;var eh;var el;var ec=this.ratio*this.b2.rot-this.b1.rot;if(this.equal){ec-=this.jointMax;el=false;this.scale=1}else{if(ecthis.jointMax){ec-=this.jointMax;this.scale=1;el=false}else{this.scale=0;ec=0;el=true}}}ep=ec;if(!el){if(this.breakUnderError&&ep*ep>this.maxError*this.maxError){return true}ep*=0.5;eh=-ep*this.kMass;if(this.equal||eh<0){var ej=this.b1;var eg=-this.scale*eh*this.b1.iinertia;ej.rot+=eg;if(eg*eg>0.0001){ej.axisx=Math.sin(ej.rot);ej.axisy=Math.cos(ej.rot)}else{var eb=eg*eg;var ed=1-0.5*eb;var ef=1-eb*eb/8;var ei=(ed*ej.axisx+eg*ej.axisy)*ef;ej.axisy=(ed*ej.axisy-eg*ej.axisx)*ef;ej.axisx=ei}var ek=this.b2;var eo=this.ratio*this.scale*eh*this.b2.iinertia;ek.rot+=eo;if(eo*eo>0.0001){ek.axisx=Math.sin(ek.rot);ek.axisy=Math.cos(ek.rot)}else{var ee=eo*eo;var em=1-0.5*ee;var en=1-ee*ee/8;var ea=(em*ek.axisx+eo*ek.axisy)*en;ek.axisy=(em*ek.axisy-eo*ek.axisx)*en;ek.axisx=ea}}}return false};dt.prototype.draw=function(ea){};dt.prototype.__class__=dt;var cu=zpp_nape.constraint.ZPP_CopyHelper=function(){this.cb=null;this.bc=null;this.id=0};cu.__name__=["zpp_nape","constraint","ZPP_CopyHelper"];cu.dict=function(ec,eb){var ea=new cu();ea.id=ec;ea.bc=eb;return ea};cu.todo=function(ec,ea){var eb=new cu();eb.id=ec;eb.cb=ea;return eb};cu.prototype.id=null;cu.prototype.bc=null;cu.prototype.cb=null;cu.prototype.__class__=cu;var J=zpp_nape.constraint.ZPP_DistanceJoint=function(){this.stepped=false;this.bias=0;this.gamma=0;this.jMax=0;this.jAcc=0;this.kMass=0;this.wrap_a2=null;this.a2rely=0;this.a2relx=0;this.a2localy=0;this.a2localx=0;this.b2=null;this.wrap_a1=null;this.a1rely=0;this.a1relx=0;this.a1localy=0;this.a1localx=0;this.b1=null;this.cx2=0;this.cx1=0;this.ny=0;this.nx=0;this.equal=false;this.slack=false;this.jointMax=0;this.jointMin=0;this.outer_zn=null;b1.call(this);this.a1localx=0;this.a1localy=0;this.a1relx=0;this.a1rely=0;this.a2localx=0;this.a2localy=0;this.a2relx=0;this.a2rely=0;this.jAcc=0;this.jMax=Infinity;this.stepped=false;this.cx1=this.cx2=0};J.__name__=["zpp_nape","constraint","ZPP_DistanceJoint"];J.__super__=b1;J.prototype=Object.create(b1.prototype);J.prototype.outer_zn=null;J.prototype.jointMin=null;J.prototype.jointMax=null;J.prototype.slack=null;J.prototype.equal=null;J.prototype.is_slack=function(){var eb;this.a1relx=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;this.a1rely=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;this.a2relx=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;this.a2rely=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var ea=0;var ee=0;ea=this.b2.posx+this.a2relx-(this.b1.posx+this.a1relx);ee=this.b2.posy+this.a2rely-(this.b1.posy+this.a1rely);var ed=ea*ea+ee*ee;if(edthis.jointMax){ed-=this.jointMax;eb=false}else{ea=0;ee=0;ed=0;eb=true}}}}return eb};J.prototype.nx=null;J.prototype.ny=null;J.prototype.cx1=null;J.prototype.cx2=null;J.prototype.bodyImpulse=function(ea){if(this.stepped){if(ea==this.b1){return q.get(-this.jAcc*this.nx,-this.jAcc*this.ny,-this.cx1*this.jAcc)}else{return q.get(this.jAcc*this.nx,this.jAcc*this.ny,this.cx2*this.jAcc)}}else{return q.get(0,0,0)}};J.prototype.activeBodies=function(){if(this.b1!=null){this.b1.constraints.add(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.add(this)}}};J.prototype.inactiveBodies=function(){if(this.b1!=null){this.b1.constraints.remove(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.remove(this)}}};J.prototype.b1=null;J.prototype.a1localx=null;J.prototype.a1localy=null;J.prototype.a1relx=null;J.prototype.a1rely=null;J.prototype.validate_a1=function(){this.wrap_a1.zpp_inner.x=this.a1localx;this.wrap_a1.zpp_inner.y=this.a1localy};J.prototype.invalidate_a1=function(ea){this.immutable_midstep("Constraint::a1");this.a1localx=ea.x;this.a1localy=ea.y;this.wake()};J.prototype.setup_a1=function(){var ea=this.a1localx;var eh=this.a1localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a1=eb;this.wrap_a1.zpp_inner._inuse=true;this.wrap_a1.zpp_inner._validate=dX(this,this.validate_a1);this.wrap_a1.zpp_inner._invalidate=dX(this,this.invalidate_a1)};J.prototype.wrap_a1=null;J.prototype.b2=null;J.prototype.a2localx=null;J.prototype.a2localy=null;J.prototype.a2relx=null;J.prototype.a2rely=null;J.prototype.validate_a2=function(){this.wrap_a2.zpp_inner.x=this.a2localx;this.wrap_a2.zpp_inner.y=this.a2localy};J.prototype.invalidate_a2=function(ea){this.immutable_midstep("Constraint::a2");this.a2localx=ea.x;this.a2localy=ea.y;this.wake()};J.prototype.setup_a2=function(){var ea=this.a2localx;var eh=this.a2localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a2=eb;this.wrap_a2.zpp_inner._inuse=true;this.wrap_a2.zpp_inner._validate=dX(this,this.validate_a2);this.wrap_a2.zpp_inner._invalidate=dX(this,this.invalidate_a2)};J.prototype.wrap_a2=null;J.prototype.kMass=null;J.prototype.jAcc=null;J.prototype.jMax=null;J.prototype.gamma=null;J.prototype.bias=null;J.prototype.stepped=null;J.prototype.copy=function(ea,eb){var ee=this.outer_zn;if(ee.zpp_inner_zn.wrap_a1==null){ee.zpp_inner_zn.setup_a1()}var ec=ee.zpp_inner_zn.wrap_a1;var eg=this.outer_zn;if(eg.zpp_inner_zn.wrap_a2==null){eg.zpp_inner_zn.setup_a2()}var ef=new dx(null,null,ec,eg.zpp_inner_zn.wrap_a2,this.jointMin,this.jointMax);this.copyto(ef);if(ea!=null&&this.b1!=null){var ek=null;var ed=0;while(edthis.jointMax){throw new cE("Error: DistanceJoint must have jointMin <= jointMax")}if(this.b1.type!=2&&this.b2.type!=2){throw new cE("Error: Constraints cannot have both bodies non-dynamic")}};J.prototype.wake_connected=function(){if(this.b1!=null&&this.b1.type==2){this.b1.wake()}if(this.b2!=null&&this.b2.type==2){this.b2.wake()}};J.prototype.forest=function(){if(this.b1.type==2){var en;if(this.b1.component==this.b1.component.parent){en=this.b1.component}else{var eo=this.b1.component;var em=null;while(eo!=eo.parent){var ei=eo.parent;eo.parent=em;em=eo;eo=ei}while(em!=null){var eh=em.parent;em.parent=eo;em=eh}en=eo}var er;if(this.component==this.component.parent){er=this.component}else{var et=this.component;var el=null;while(et!=et.parent){var eg=et.parent;et.parent=el;el=et;et=eg}while(el!=null){var ef=el.parent;el.parent=et;el=ef}er=et}if(en!=er){if(en.ranker.rank){er.parent=en}else{er.parent=en;en.rank++}}}}if(this.b2.type==2){var ee;if(this.b2.component==this.b2.component.parent){ee=this.b2.component}else{var es=this.b2.component;var ek=null;while(es!=es.parent){var ed=es.parent;es.parent=ek;ek=es;es=ed}while(ek!=null){var ec=ek.parent;ek.parent=es;ek=ec}ee=es}var ep;if(this.component==this.component.parent){ep=this.component}else{var eq=this.component;var ej=null;while(eq!=eq.parent){var eb=eq.parent;eq.parent=ej;ej=eq;eq=eb}while(ej!=null){var ea=ej.parent;ej.parent=eq;ej=ea}ep=eq}if(ee!=ep){if(ee.rankep.rank){ep.parent=ee}else{ep.parent=ee;ee.rank++}}}}};J.prototype.pair_exists=function(eb,ea){if(!(this.b1.id==eb&&this.b2.id==ea)){if(this.b1.id==ea){return this.b2.id==eb}else{return false}}else{return true}};J.prototype.clearcache=function(){this.jAcc=0;this.pre_dt=-1};J.prototype.preStep=function(ec){if(this.pre_dt==-1){this.pre_dt=ec}var ef=ec/this.pre_dt;this.pre_dt=ec;this.stepped=true;this.equal=this.jointMin==this.jointMax;this.a1relx=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;this.a1rely=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;this.a2relx=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;this.a2rely=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;this.nx=this.b2.posx+this.a2relx-(this.b1.posx+this.a1relx);this.ny=this.b2.posy+this.a2rely-(this.b1.posy+this.a1rely);var eg=this.nx*this.nx+this.ny*this.ny;if(egthis.jointMax){eg-=this.jointMax;this.slack=false}else{this.nx=0;this.ny=0;eg=0;this.slack=true}}}}var ee=eg;if(!this.slack){this.cx1=this.ny*this.a1relx-this.nx*this.a1rely;this.cx2=this.ny*this.a2relx-this.nx*this.a2rely;this.kMass=this.b1.smass+this.b2.smass+this.cx1*this.cx1*this.b1.sinertia+this.cx2*this.cx2*this.b2.sinertia;if(this.kMass!=0){this.kMass=1/this.kMass}else{this.jAcc=0}if(!this.stiff){if(this.breakUnderError&&ee*ee>this.maxError*this.maxError){return true}var ea;var eh=2*Math.PI*this.frequency;this.gamma=1/(ec*eh*(2*this.damping+eh*ec));var ed=1/(1+this.gamma);ea=ec*eh*eh*this.gamma;this.gamma*=ed;this.kMass*=ed;this.bias=-ee*ea;if(this.bias<-this.maxError){this.bias=-this.maxError}else{if(this.bias>this.maxError){this.bias=this.maxError}}}else{this.bias=0;this.gamma=0}this.jAcc*=ef;this.jMax=this.maxForce*ec}return false};J.prototype.warmStart=function(){if(!this.slack){var ea=this.b1.imass*this.jAcc;this.b1.velx-=this.nx*ea;this.b1.vely-=this.ny*ea;var eb=this.b2.imass*this.jAcc;this.b2.velx+=this.nx*eb;this.b2.vely+=this.ny*eb;this.b1.angvel-=this.cx1*this.b1.iinertia*this.jAcc;this.b2.angvel+=this.cx2*this.b2.iinertia*this.jAcc}};J.prototype.applyImpulseVel=function(){if(this.slack){return false}var ea=this.kMass*(this.bias-(this.nx*(this.b2.velx+this.b2.kinvelx-this.b1.velx-this.b1.kinvelx)+this.ny*(this.b2.vely+this.b2.kinvely-this.b1.vely-this.b1.kinvely)+(this.b2.angvel+this.b2.kinangvel)*this.cx2-(this.b1.angvel+this.b1.kinangvel)*this.cx1))-this.jAcc*this.gamma;var ed=this.jAcc;this.jAcc+=ea;if(!this.equal&&this.jAcc>0){this.jAcc=0}if(this.breakUnderForce&&this.jAcc<-this.jMax){return true}if(!this.stiff){if(this.jAcc<-this.jMax){this.jAcc=-this.jMax}}ea=this.jAcc-ed;var eb=this.b1.imass*ea;this.b1.velx-=this.nx*eb;this.b1.vely-=this.ny*eb;var ec=this.b2.imass*ea;this.b2.velx+=this.nx*ec;this.b2.vely+=this.ny*ec;this.b1.angvel-=this.cx1*this.b1.iinertia*ea;this.b2.angvel+=this.cx2*this.b2.iinertia*ea;return false};J.prototype.applyImpulsePos=function(){var eo;var eB;var ef=0;var ee=0;ef=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;ee=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;var eq=0;var en=0;eq=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;en=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var ed;var eF=0;var eE=0;eF=this.b2.posx+eq-(this.b1.posx+ef);eE=this.b2.posy+en-(this.b1.posy+ee);var et=eF*eF+eE*eE;if(etthis.jointMax){et-=this.jointMax;ed=false}else{eF=0;eE=0;et=0;ed=true}}}}eo=et;if(!ed){if(this.breakUnderError&&eo*eo>this.maxError*this.maxError){return true}if(eo*eo6){var eA=this.b1.smass+this.b2.smass;if(eA>P.epsilon){eA=0.75/eA;eB=-eo*eA;if(this.equal||eB<0){var em=eB*this.b1.imass;this.b1.posx-=eF*em;this.b1.posy-=eE*em;var el=eB*this.b2.imass;this.b2.posx+=eF*el;this.b2.posy+=eE*el;eF=this.b2.posx+eq-(this.b1.posx+ef);eE=this.b2.posy+en-(this.b1.posy+ee);var eC=eF*eF+eE*eE;if(eCthis.jointMax){eC-=this.jointMax}else{eF=0;eE=0;eC=0}}}}eo=eC;eo*=0.5}}}var es;var er;es=eE*ef-eF*ee;er=eE*eq-eF*en;var ej=this.b1.smass+this.b2.smass+es*es*this.b1.sinertia+er*er*this.b2.sinertia;if(ej!=0){ej=1/ej}eB=-eo*ej;if(this.equal||eB<0){var ei=this.b1.imass*eB;this.b1.posx-=eF*ei;this.b1.posy-=eE*ei;var eh=this.b2.imass*eB;this.b2.posx+=eF*eh;this.b2.posy+=eE*eh;var ez=this.b1;var ev=-es*this.b1.iinertia*eB;ez.rot+=ev;if(ev*ev>0.0001){ez.axisx=Math.sin(ez.rot);ez.axisy=Math.cos(ez.rot)}else{var eG=ev*ev;var eu=1-0.5*eG;var ey=1-eG*eG/8;var ex=(eu*ez.axisx+ev*ez.axisy)*ey;ez.axisy=(eu*ez.axisy-ev*ez.axisx)*ey;ez.axisx=ex}var eD=this.b2;var ec=er*this.b2.iinertia*eB;eD.rot+=ec;if(ec*ec>0.0001){eD.axisx=Math.sin(eD.rot);eD.axisy=Math.cos(eD.rot)}else{var eg=ec*ec;var eb=1-0.5*eg;var ea=1-eg*eg/8;var ew=(eb*eD.axisx+ec*eD.axisy)*ea;eD.axisy=(eb*eD.axisy-ec*eD.axisx)*ea;eD.axisx=ew}}}return false};J.prototype.draw=function(ea){};J.prototype.__class__=J;var bR=zpp_nape.constraint.ZPP_LineJoint=function(){this.biasy=0;this.biasx=0;this.jAccy=0;this.jAccx=0;this.kMassc=0;this.kMassb=0;this.kMassa=0;this.wrap_n=null;this.nrely=0;this.nrelx=0;this.nlocaly=0;this.nlocalx=0;this.wrap_a2=null;this.a2rely=0;this.a2relx=0;this.a2localy=0;this.a2localx=0;this.wrap_a1=null;this.a1rely=0;this.a1relx=0;this.a1localy=0;this.a1localx=0;this.cx2=0;this.cx1=0;this.dot2=0;this.dot1=0;this.equal=false;this.jointMax=0;this.jointMin=0;this.scale=0;this.outer_zn=null;b1.call(this);this.a1localx=0;this.a1localy=0;this.a1relx=0;this.a1rely=0;this.a2localx=0;this.a2localy=0;this.a2relx=0;this.a2rely=0;this.nlocalx=0;this.nlocaly=0;this.nrelx=0;this.nrely=0;this.jAccx=0;this.jAccy=0;this.jMax=Infinity;this.jointMin=-Infinity;this.jointMax=Infinity;this.stepped=false};bR.__name__=["zpp_nape","constraint","ZPP_LineJoint"];bR.__super__=b1;bR.prototype=Object.create(b1.prototype);bR.prototype.outer_zn=null;bR.prototype.scale=null;bR.prototype.jointMin=null;bR.prototype.jointMax=null;bR.prototype.equal=null;bR.prototype.dot1=null;bR.prototype.dot2=null;bR.prototype.cx1=null;bR.prototype.cx2=null;bR.prototype.bodyImpulse=function(ea){if(this.stepped){var ec=this.scale*this.nrelx*this.jAccy-this.nrely*this.jAccx;var eb=this.nrelx*this.jAccx+this.scale*this.nrely*this.jAccy;if(ea==this.b1){return q.get(-ec,-eb,this.scale*this.cx1*eb-this.dot1*ec)}else{return q.get(ec,eb,this.scale*this.cx1*eb-this.dot1*ec)}}else{return q.get(0,0,0)}};bR.prototype.activeBodies=function(){if(this.b1!=null){this.b1.constraints.add(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.add(this)}}};bR.prototype.inactiveBodies=function(){if(this.b1!=null){this.b1.constraints.remove(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.remove(this)}}};bR.prototype.b1=null;bR.prototype.a1localx=null;bR.prototype.a1localy=null;bR.prototype.a1relx=null;bR.prototype.a1rely=null;bR.prototype.validate_a1=function(){this.wrap_a1.zpp_inner.x=this.a1localx;this.wrap_a1.zpp_inner.y=this.a1localy};bR.prototype.invalidate_a1=function(ea){this.immutable_midstep("Constraint::a1");this.a1localx=ea.x;this.a1localy=ea.y;this.wake()};bR.prototype.setup_a1=function(){var ea=this.a1localx;var eh=this.a1localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a1=eb;this.wrap_a1.zpp_inner._inuse=true;this.wrap_a1.zpp_inner._validate=dX(this,this.validate_a1);this.wrap_a1.zpp_inner._invalidate=dX(this,this.invalidate_a1)};bR.prototype.wrap_a1=null;bR.prototype.b2=null;bR.prototype.a2localx=null;bR.prototype.a2localy=null;bR.prototype.a2relx=null;bR.prototype.a2rely=null;bR.prototype.validate_a2=function(){this.wrap_a2.zpp_inner.x=this.a2localx;this.wrap_a2.zpp_inner.y=this.a2localy};bR.prototype.invalidate_a2=function(ea){this.immutable_midstep("Constraint::a2");this.a2localx=ea.x;this.a2localy=ea.y;this.wake()};bR.prototype.setup_a2=function(){var ea=this.a2localx;var eh=this.a2localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a2=eb;this.wrap_a2.zpp_inner._inuse=true;this.wrap_a2.zpp_inner._validate=dX(this,this.validate_a2);this.wrap_a2.zpp_inner._invalidate=dX(this,this.invalidate_a2)};bR.prototype.wrap_a2=null;bR.prototype.zip_n=null;bR.prototype.nlocalx=null;bR.prototype.nlocaly=null;bR.prototype.nrelx=null;bR.prototype.nrely=null;bR.prototype.validate_n=function(){this.wrap_n.zpp_inner.x=this.nlocalx;this.wrap_n.zpp_inner.y=this.nlocaly};bR.prototype.invalidate_n=function(ea){this.immutable_midstep("Constraint::n");this.nlocalx=ea.x;this.nlocaly=ea.y;this.zip_n=true;this.wake()};bR.prototype.setup_n=function(){var ea=this.nlocalx;var eh=this.nlocaly;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_n=eb;this.wrap_n.zpp_inner._inuse=true;this.wrap_n.zpp_inner._validate=dX(this,this.validate_n);this.wrap_n.zpp_inner._invalidate=dX(this,this.invalidate_n)};bR.prototype.wrap_n=null;bR.prototype.validate_norm=function(){if(this.zip_n){this.zip_n=false;var ea=1/Math.sqrt(this.nlocalx*this.nlocalx+this.nlocaly*this.nlocaly);this.nlocalx*=ea;this.nlocaly*=ea}};bR.prototype.kMassa=null;bR.prototype.kMassb=null;bR.prototype.kMassc=null;bR.prototype.jAccx=null;bR.prototype.jAccy=null;bR.prototype.jMax=null;bR.prototype.gamma=null;bR.prototype.biasx=null;bR.prototype.biasy=null;bR.prototype.stepped=null;bR.prototype.copy=function(ea,eb){var ef=this.outer_zn;if(ef.zpp_inner_zn.wrap_a1==null){ef.zpp_inner_zn.setup_a1()}var ed=ef.zpp_inner_zn.wrap_a1;var ei=this.outer_zn;if(ei.zpp_inner_zn.wrap_a2==null){ei.zpp_inner_zn.setup_a2()}var ec=ei.zpp_inner_zn.wrap_a2;var eg=this.outer_zn;if(eg.zpp_inner_zn.wrap_n==null){eg.zpp_inner_zn.setup_n()}var eh=new aO(null,null,ed,ec,eg.zpp_inner_zn.wrap_n,this.jointMin,this.jointMax);this.copyto(eh);if(ea!=null&&this.b1!=null){var em=null;var ee=0;while(eethis.jointMax){throw new cE("Error: DistanceJoint must have jointMin <= jointMax")}if(this.nlocalx*this.nlocalx+this.nlocaly*this.nlocalyer.rank){er.parent=en}else{er.parent=en;en.rank++}}}}if(this.b2.type==2){var ee;if(this.b2.component==this.b2.component.parent){ee=this.b2.component}else{var es=this.b2.component;var ek=null;while(es!=es.parent){var ed=es.parent;es.parent=ek;ek=es;es=ed}while(ek!=null){var ec=ek.parent;ek.parent=es;ek=ec}ee=es}var ep;if(this.component==this.component.parent){ep=this.component}else{var eq=this.component;var ej=null;while(eq!=eq.parent){var eb=eq.parent;eq.parent=ej;ej=eq;eq=eb}while(ej!=null){var ea=ej.parent;ej.parent=eq;ej=ea}ep=eq}if(ee!=ep){if(ee.rankep.rank){ep.parent=ee}else{ep.parent=ee;ee.rank++}}}}};bR.prototype.pair_exists=function(eb,ea){if(!(this.b1.id==eb&&this.b2.id==ea)){if(this.b1.id==ea){return this.b2.id==eb}else{return false}}else{return true}};bR.prototype.clearcache=function(){this.jAccx=0;this.jAccy=0;this.pre_dt=-1};bR.prototype.preStep=function(eo){if(this.pre_dt==-1){this.pre_dt=eo}var eq=eo/this.pre_dt;this.pre_dt=eo;this.equal=this.jointMin==this.jointMax;this.stepped=true;this.validate_norm();this.a1relx=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;this.a1rely=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;this.nrelx=this.b1.axisy*this.nlocalx-this.b1.axisx*this.nlocaly;this.nrely=this.nlocalx*this.b1.axisx+this.nlocaly*this.b1.axisy;this.a2relx=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;this.a2rely=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var ej=0;var ei=0;var ed=0;var ec=0;ej=this.b2.posx+this.a2relx-this.b1.posx-this.a1relx;ei=this.b2.posy+this.a2rely-this.b1.posy-this.a1rely;ed=ei*this.nrelx-ej*this.nrely;ec=this.nrelx*ej+this.nrely*ei;if(this.equal){ec-=this.jointMin;this.scale=1}else{if(ec>this.jointMax){ec-=this.jointMax;this.scale=1}else{if(ecthis.maxError*this.maxError){return true}var ea;var ep=2*Math.PI*this.frequency;this.gamma=1/(eo*ep*(2*this.damping+ep*eo));var el=1/(1+this.gamma);ea=eo*ep*ep*this.gamma;this.gamma*=el;this.kMassa*=el;this.kMassb*=el;this.kMassc*=el;this.biasx=ed;this.biasy=ec;var eh=-ea;this.biasx*=eh;this.biasy*=eh;var eg=this.maxError;var ee=this.biasx*this.biasx+this.biasy*this.biasy;if(ee>eg*eg){var ef=eg*(1/Math.sqrt(ee));this.biasx*=ef;this.biasy*=ef}}else{this.gamma=0;this.biasx=0;this.biasy=0}this.jAccx*=eq;this.jAccy*=eq;this.jMax=this.maxForce*eo;return false};bR.prototype.warmStart=function(){var eb=this.scale*this.nrelx*this.jAccy-this.nrely*this.jAccx;var ea=this.nrelx*this.jAccx+this.scale*this.nrely*this.jAccy;var ec=this.b1.imass;this.b1.velx-=eb*ec;this.b1.vely-=ea*ec;var ed=this.b2.imass;this.b2.velx+=eb*ed;this.b2.vely+=ea*ed;this.b1.angvel+=(this.scale*this.cx1*this.jAccy-this.dot1*this.jAccx)*this.b1.iinertia;this.b2.angvel+=(this.dot2*this.jAccx-this.scale*this.cx2*this.jAccy)*this.b2.iinertia};bR.prototype.applyImpulseVel=function(){var eo=0;var en=0;var ej=0;var eg=0;ej=this.b2.velx-this.b1.velx;eg=this.b2.vely-this.b1.vely;ej+=this.b2.kinvelx-this.b1.kinvelx;eg+=this.b2.kinvely-this.b1.kinvely;eo=eg*this.nrelx-ej*this.nrely+(this.b2.angvel+this.b2.kinangvel)*this.dot2-(this.b1.angvel+this.b1.kinangvel)*this.dot1;en=this.scale*(this.nrelx*ej+this.nrely*eg-(this.b2.angvel+this.b2.kinangvel)*this.cx2+(this.b1.angvel+this.b1.kinangvel)*this.cx1);var ea=0;var eq=0;ea=this.biasx-eo;eq=this.biasy-en;var ep=this.kMassa*ea+this.kMassb*eq;eq=this.kMassb*ea+this.kMassc*eq;ea=ep;var ek=this.gamma;ea-=this.jAccx*ek;eq-=this.jAccy*ek;var em=0;var el=0;em=this.jAccx;el=this.jAccy;this.jAccx+=ea;this.jAccy+=eq;if(this.jAccy>0){this.jAccy=0}if(this.breakUnderForce){if(this.jAccx*this.jAccx+this.jAccy*this.jAccy>this.jMax*this.jMax){return true}}else{if(!this.stiff){var ei=this.jMax;var ef=this.jAccx*this.jAccx+this.jAccy*this.jAccy;if(ef>ei*ei){var ee=ei*(1/Math.sqrt(ef));this.jAccx*=ee;this.jAccy*=ee}}}ea=this.jAccx-em;eq=this.jAccy-el;var eh=this.scale*this.nrelx*eq-this.nrely*ea;var ed=this.nrelx*ea+this.scale*this.nrely*eq;var ec=this.b1.imass;this.b1.velx-=eh*ec;this.b1.vely-=ed*ec;var eb=this.b2.imass;this.b2.velx+=eh*eb;this.b2.vely+=ed*eb;this.b1.angvel+=(this.scale*this.cx1*eq-this.dot1*ea)*this.b1.iinertia;this.b2.angvel+=(this.dot2*ea-this.scale*this.cx2*eq)*this.b2.iinertia;return false};bR.prototype.applyImpulsePos=function(){var eI=0;var eF=0;eI=this.b1.axisy*this.nlocalx-this.b1.axisx*this.nlocaly;eF=this.nlocalx*this.b1.axisx+this.nlocaly*this.b1.axisy;var eo=0;var en=0;eo=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;en=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;var eh=0;var ef=0;eh=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;ef=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var ec=0;var ea=0;var ex;var eg=0;var ee=0;ec=this.b2.posx+eh-this.b1.posx-eo;ea=this.b2.posy+ef-this.b1.posy-en;eg=ea*eI-ec*eF;ee=eI*ec+eF*ea;if(this.equal){ee-=this.jointMin;ex=1}else{if(ee>this.jointMax){ee-=this.jointMax;ex=1}else{if(eethis.maxError*this.maxError){return true}if(eg*eg+ee*ee6){var eO=this.b1.smass+this.b2.smass;if(eO>P.epsilon){eO=0.8/eO;var eA=eO*(eF*eg-ex*eI*ee);var ej=eO*(eI*eg*ex-eF*eg);var eC=this.b1.imass;this.b1.posx-=eA*eC;this.b1.posy-=ej*eC;var ey=this.b2.imass;this.b2.posx+=eA*ey;this.b2.posy+=ej*ey;ec=this.b2.posx+eh-this.b1.posx-eo;ea=this.b2.posy+ef-this.b1.posy-en;eg=ea*eI-ec*eF;ee=eI*ec+eF*ea;if(this.equal){ee-=this.jointMin;ex=1}else{if(ee>this.jointMax){ee-=this.jointMax;ex=1}else{if(ee0){eq=0}var eM=ex*eI*eq-eF*et;var eJ=eI*et+ex*eF*eq;var ev=this.b1.imass;this.b1.posx-=eM*ev;this.b1.posy-=eJ*ev;var eu=this.b2.imass;this.b2.posx+=eM*eu;this.b2.posy+=eJ*eu;var eb=this.b1;var ed=(ex*eN*eq-eG*et)*this.b1.iinertia;eb.rot+=ed;if(ed*ed>0.0001){eb.axisx=Math.sin(eb.rot);eb.axisy=Math.cos(eb.rot)}else{var eH=ed*ed;var eD=1-0.5*eH;var eK=1-eH*eH/8;var es=(eD*eb.axisx+ed*eb.axisy)*eK;eb.axisy=(eD*eb.axisy-ed*eb.axisx)*eK;eb.axisx=es}var eB=this.b2;var ez=(eE*et-ex*eL*eq)*this.b2.iinertia;eB.rot+=ez;if(ez*ez>0.0001){eB.axisx=Math.sin(eB.rot);eB.axisy=Math.cos(eB.rot)}else{var er=ez*ez;var eQ=1-0.5*er;var eP=1-er*er/8;var ep=(eQ*eB.axisx+ez*eB.axisy)*eP;eB.axisy=(eQ*eB.axisy-ez*eB.axisx)*eP;eB.axisx=ep}return false};bR.prototype.draw=function(ea){};bR.prototype.__class__=bR;var y=zpp_nape.constraint.ZPP_MotorJoint=function(){this.stepped=false;this.jMax=0;this.jAcc=0;this.kMass=0;this.b2=null;this.b1=null;this.rate=0;this.ratio=0;this.outer_zn=null;b1.call(this);this.jAcc=0;this.stepped=false;this.__velocity=true};y.__name__=["zpp_nape","constraint","ZPP_MotorJoint"];y.__super__=b1;y.prototype=Object.create(b1.prototype);y.prototype.outer_zn=null;y.prototype.ratio=null;y.prototype.rate=null;y.prototype.bodyImpulse=function(ea){if(this.stepped){if(ea==this.b1){return q.get(0,0,-this.jAcc)}else{return q.get(0,0,this.ratio*this.jAcc)}}else{return q.get(0,0,0)}};y.prototype.activeBodies=function(){if(this.b1!=null){this.b1.constraints.add(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.add(this)}}};y.prototype.inactiveBodies=function(){if(this.b1!=null){this.b1.constraints.remove(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.remove(this)}}};y.prototype.b1=null;y.prototype.b2=null;y.prototype.kMass=null;y.prototype.jAcc=null;y.prototype.jMax=null;y.prototype.stepped=null;y.prototype.copy=function(ea,eb){var ed=new bQ(null,null,this.rate,this.ratio);this.copyto(ed);if(ea!=null&&this.b1!=null){var eh=null;var ec=0;while(ecer.rank){er.parent=en}else{er.parent=en;en.rank++}}}}if(this.b2.type==2){var ee;if(this.b2.component==this.b2.component.parent){ee=this.b2.component}else{var es=this.b2.component;var ek=null;while(es!=es.parent){var ed=es.parent;es.parent=ek;ek=es;es=ed}while(ek!=null){var ec=ek.parent;ek.parent=es;ek=ec}ee=es}var ep;if(this.component==this.component.parent){ep=this.component}else{var eq=this.component;var ej=null;while(eq!=eq.parent){var eb=eq.parent;eq.parent=ej;ej=eq;eq=eb}while(ej!=null){var ea=ej.parent;ej.parent=eq;ej=ea}ep=eq}if(ee!=ep){if(ee.rankep.rank){ep.parent=ee}else{ep.parent=ee;ee.rank++}}}}};y.prototype.pair_exists=function(eb,ea){if(!(this.b1.id==eb&&this.b2.id==ea)){if(this.b1.id==ea){return this.b2.id==eb}else{return false}}else{return true}};y.prototype.clearcache=function(){this.jAcc=0;this.pre_dt=-1};y.prototype.preStep=function(ea){if(this.pre_dt==-1){this.pre_dt=ea}var eb=ea/this.pre_dt;this.pre_dt=ea;this.stepped=true;this.kMass=this.b1.sinertia+this.ratio*this.ratio*this.b2.sinertia;this.kMass=1/this.kMass;this.jAcc*=eb;this.jMax=this.maxForce*ea;return false};y.prototype.warmStart=function(){this.b1.angvel-=this.b1.iinertia*this.jAcc;this.b2.angvel+=this.ratio*this.b2.iinertia*this.jAcc};y.prototype.applyImpulseVel=function(){var ea=-this.kMass*(this.ratio*(this.b2.angvel+this.b2.kinangvel)-this.b1.angvel-this.b1.kinangvel-this.rate);var eb=this.jAcc;this.jAcc+=ea;if(this.breakUnderForce){if(this.jAcc>this.jMax||this.jAcc<-this.jMax){return true}}else{if(this.jAcc<-this.jMax){this.jAcc=-this.jMax}else{if(this.jAcc>this.jMax){this.jAcc=this.jMax}}}ea=this.jAcc-eb;this.b1.angvel-=this.b1.iinertia*ea;this.b2.angvel+=this.ratio*this.b2.iinertia*ea;return false};y.prototype.applyImpulsePos=function(){return false};y.prototype.__class__=y;var D=zpp_nape.constraint.ZPP_PivotJoint=function(){this.stepped=false;this.biasy=0;this.biasx=0;this.gamma=0;this.jMax=0;this.jAccy=0;this.jAccx=0;this.kMassc=0;this.kMassb=0;this.kMassa=0;this.wrap_a2=null;this.a2rely=0;this.a2relx=0;this.a2localy=0;this.a2localx=0;this.b2=null;this.wrap_a1=null;this.a1rely=0;this.a1relx=0;this.a1localy=0;this.a1localx=0;this.b1=null;this.outer_zn=null;b1.call(this);this.stepped=false;this.jAccx=0;this.jAccy=0;this.jMax=Infinity;this.a1localx=0;this.a1localy=0;this.a1relx=0;this.a1rely=0;this.a2localx=0;this.a2localy=0;this.a2relx=0;this.a2rely=0};D.__name__=["zpp_nape","constraint","ZPP_PivotJoint"];D.__super__=b1;D.prototype=Object.create(b1.prototype);D.prototype.outer_zn=null;D.prototype.bodyImpulse=function(ea){if(this.stepped){if(ea==this.b1){return q.get(-this.jAccx,-this.jAccy,-(this.jAccy*this.a1relx-this.jAccx*this.a1rely))}else{return q.get(this.jAccx,this.jAccy,this.jAccy*this.a2relx-this.jAccx*this.a2rely)}}else{return q.get(0,0,0)}};D.prototype.activeBodies=function(){if(this.b1!=null){this.b1.constraints.add(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.add(this)}}};D.prototype.inactiveBodies=function(){if(this.b1!=null){this.b1.constraints.remove(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.remove(this)}}};D.prototype.b1=null;D.prototype.a1localx=null;D.prototype.a1localy=null;D.prototype.a1relx=null;D.prototype.a1rely=null;D.prototype.validate_a1=function(){this.wrap_a1.zpp_inner.x=this.a1localx;this.wrap_a1.zpp_inner.y=this.a1localy};D.prototype.invalidate_a1=function(ea){this.immutable_midstep("Constraint::a1");this.a1localx=ea.x;this.a1localy=ea.y;this.wake()};D.prototype.setup_a1=function(){var ea=this.a1localx;var eh=this.a1localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a1=eb;this.wrap_a1.zpp_inner._inuse=true;this.wrap_a1.zpp_inner._validate=dX(this,this.validate_a1);this.wrap_a1.zpp_inner._invalidate=dX(this,this.invalidate_a1)};D.prototype.wrap_a1=null;D.prototype.b2=null;D.prototype.a2localx=null;D.prototype.a2localy=null;D.prototype.a2relx=null;D.prototype.a2rely=null;D.prototype.validate_a2=function(){this.wrap_a2.zpp_inner.x=this.a2localx;this.wrap_a2.zpp_inner.y=this.a2localy};D.prototype.invalidate_a2=function(ea){this.immutable_midstep("Constraint::a2");this.a2localx=ea.x;this.a2localy=ea.y;this.wake()};D.prototype.setup_a2=function(){var ea=this.a2localx;var eh=this.a2localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a2=eb;this.wrap_a2.zpp_inner._inuse=true;this.wrap_a2.zpp_inner._validate=dX(this,this.validate_a2);this.wrap_a2.zpp_inner._invalidate=dX(this,this.invalidate_a2)};D.prototype.wrap_a2=null;D.prototype.kMassa=null;D.prototype.kMassb=null;D.prototype.kMassc=null;D.prototype.jAccx=null;D.prototype.jAccy=null;D.prototype.jMax=null;D.prototype.gamma=null;D.prototype.biasx=null;D.prototype.biasy=null;D.prototype.stepped=null;D.prototype.copy=function(ea,eb){var ee=this.outer_zn;if(ee.zpp_inner_zn.wrap_a1==null){ee.zpp_inner_zn.setup_a1()}var ec=ee.zpp_inner_zn.wrap_a1;var eg=this.outer_zn;if(eg.zpp_inner_zn.wrap_a2==null){eg.zpp_inner_zn.setup_a2()}var ef=new bV(null,null,ec,eg.zpp_inner_zn.wrap_a2);this.copyto(ef);if(ea!=null&&this.b1!=null){var ek=null;var ed=0;while(eder.rank){er.parent=en}else{er.parent=en;en.rank++}}}}if(this.b2.type==2){var ee;if(this.b2.component==this.b2.component.parent){ee=this.b2.component}else{var es=this.b2.component;var ek=null;while(es!=es.parent){var ed=es.parent;es.parent=ek;ek=es;es=ed}while(ek!=null){var ec=ek.parent;ek.parent=es;ek=ec}ee=es}var ep;if(this.component==this.component.parent){ep=this.component}else{var eq=this.component;var ej=null;while(eq!=eq.parent){var eb=eq.parent;eq.parent=ej;ej=eq;eq=eb}while(ej!=null){var ea=ej.parent;ej.parent=eq;ej=ea}ep=eq}if(ee!=ep){if(ee.rankep.rank){ep.parent=ee}else{ep.parent=ee;ee.rank++}}}}};D.prototype.pair_exists=function(eb,ea){if(!(this.b1.id==eb&&this.b2.id==ea)){if(this.b1.id==ea){return this.b2.id==eb}else{return false}}else{return true}};D.prototype.clearcache=function(){this.jAccx=0;this.jAccy=0;this.pre_dt=-1};D.prototype.preStep=function(el){if(this.pre_dt==-1){this.pre_dt=el}var en=el/this.pre_dt;this.pre_dt=el;this.stepped=true;this.a1relx=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;this.a1rely=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;this.a2relx=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;this.a2rely=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var eo=this.b1.smass+this.b2.smass;this.kMassa=eo;this.kMassb=0;this.kMassc=eo;if(this.b1.sinertia!=0){var ec=this.a1relx*this.b1.sinertia;var eb=this.a1rely*this.b1.sinertia;this.kMassa+=eb*this.a1rely;this.kMassb+=-eb*this.a1relx;this.kMassc+=ec*this.a1relx}if(this.b2.sinertia!=0){var er=this.a2relx*this.b2.sinertia;var ee=this.a2rely*this.b2.sinertia;this.kMassa+=ee*this.a2rely;this.kMassb+=-ee*this.a2relx;this.kMassc+=er*this.a2relx}var ed=this.kMassa*this.kMassc-this.kMassb*this.kMassb;var eq;if(ed!=ed){this.kMassa=this.kMassb=this.kMassc=0;eq=3}else{if(ed==0){var ep=0;if(this.kMassa!=0){this.kMassa=1/this.kMassa}else{this.kMassa=0;ep=1}if(this.kMassc!=0){this.kMassc=1/this.kMassc}else{this.kMassc=0;ep|=2}this.kMassb=0;eq=ep}else{ed=1/ed;var ej=this.kMassc*ed;this.kMassc=this.kMassa*ed;this.kMassa=ej;this.kMassb*=-ed;eq=0}}if((eq&1)!=0){this.jAccx=0}if((eq&2)!=0){this.jAccy=0}if(!this.stiff){var ea;var em=2*Math.PI*this.frequency;this.gamma=1/(el*em*(2*this.damping+em*el));var ek=1/(1+this.gamma);ea=el*em*em*this.gamma;this.gamma*=ek;this.kMassa*=ek;this.kMassb*=ek;this.kMassc*=ek;this.biasx=this.b2.posx+this.a2relx-(this.b1.posx+this.a1relx);this.biasy=this.b2.posy+this.a2rely-(this.b1.posy+this.a1rely);if(this.breakUnderError&&this.biasx*this.biasx+this.biasy*this.biasy>this.maxError*this.maxError){return true}var ei=-ea;this.biasx*=ei;this.biasy*=ei;var eh=this.maxError;var ef=this.biasx*this.biasx+this.biasy*this.biasy;if(ef>eh*eh){var eg=eh*(1/Math.sqrt(ef));this.biasx*=eg;this.biasy*=eg}}else{this.biasx=0;this.biasy=0;this.gamma=0}this.jAccx*=en;this.jAccy*=en;this.jMax=this.maxForce*el;return false};D.prototype.warmStart=function(){var ea=this.b1.imass;this.b1.velx-=this.jAccx*ea;this.b1.vely-=this.jAccy*ea;var eb=this.b2.imass;this.b2.velx+=this.jAccx*eb;this.b2.vely+=this.jAccy*eb;this.b1.angvel-=(this.jAccy*this.a1relx-this.jAccx*this.a1rely)*this.b1.iinertia;this.b2.angvel+=(this.jAccy*this.a2relx-this.jAccx*this.a2rely)*this.b2.iinertia};D.prototype.applyImpulseVel=function(){var ek=0;var ej=0;ek=this.b2.velx+this.b2.kinvelx-this.a2rely*(this.b2.angvel+this.b2.kinangvel)-(this.b1.velx+this.b1.kinvelx-this.a1rely*(this.b1.angvel+this.b1.kinangvel));ej=this.b2.vely+this.b2.kinvely+this.a2relx*(this.b2.angvel+this.b2.kinangvel)-(this.b1.vely+this.b1.kinvely+this.a1relx*(this.b1.angvel+this.b1.kinangvel));var ea=0;var em=0;ea=this.biasx-ek;em=this.biasy-ej;var el=this.kMassa*ea+this.kMassb*em;em=this.kMassb*ea+this.kMassc*em;ea=el;var eg=this.gamma;ea-=this.jAccx*eg;em-=this.jAccy*eg;var ei=0;var eh=0;ei=this.jAccx;eh=this.jAccy;this.jAccx+=ea;this.jAccy+=em;if(this.breakUnderForce){if(this.jAccx*this.jAccx+this.jAccy*this.jAccy>this.jMax*this.jMax){return true}}else{if(!this.stiff){var ef=this.jMax;var ee=this.jAccx*this.jAccx+this.jAccy*this.jAccy;if(ee>ef*ef){var ed=ef*(1/Math.sqrt(ee));this.jAccx*=ed;this.jAccy*=ed}}}ea=this.jAccx-ei;em=this.jAccy-eh;var ec=this.b1.imass;this.b1.velx-=ea*ec;this.b1.vely-=em*ec;var eb=this.b2.imass;this.b2.velx+=ea*eb;this.b2.vely+=em*eb;this.b1.angvel-=(em*this.a1relx-ea*this.a1rely)*this.b1.iinertia;this.b2.angvel+=(em*this.a2relx-ea*this.a2rely)*this.b2.iinertia;return false};D.prototype.applyImpulsePos=function(){var eq=0;var eo=0;eq=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;eo=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;var eh=0;var ef=0;eh=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;ef=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var eg=0;var ee=0;eg=this.b2.posx+eh-(this.b1.posx+eq);ee=this.b2.posy+ef-(this.b1.posy+eo);if(this.breakUnderError&&eg*eg+ee*ee>this.maxError*this.maxError){return true}if(eg*eg+ee*ee6){var eJ=this.b1.smass+this.b2.smass;if(eJ>P.epsilon){eJ=0.75/eJ;ev=-eg*eJ;er=-ee*eJ;var ep=ev*ev+er*er;if(ep>400){var eE=20*(1/Math.sqrt(ep));ev*=eE;er*=eE}var eA=this.b1.imass;this.b1.posx-=ev*eA;this.b1.posy-=er*eA;var ez=this.b2.imass;this.b2.posx+=ev*ez;this.b2.posy+=er*ez;eg=this.b2.posx+eh-(this.b1.posx+eq);ee=this.b2.posy+ef-(this.b1.posy+eo);eg*=0.5;ee*=0.5}}var en=0;var em=0;var el=0;var eI=this.b1.smass+this.b2.smass;en=eI;em=0;el=eI;if(this.b1.sinertia!=0){var eb=eq*this.b1.sinertia;var ea=eo*this.b1.sinertia;en=eI+ea*eo;em+=-ea*eq;el=eI+eb*eq}if(this.b2.sinertia!=0){var eC=eh*this.b2.sinertia;var ej=ef*this.b2.sinertia;en+=ej*ef;em+=-ej*eh;el+=eC*eh}ev=-eg;er=-ee;var ek=ev*ev+er*er;if(ek>36){var ey=6*(1/Math.sqrt(ek));ev*=ey;er*=ey}var ei=en*el-em*em;if(ei!=ei){er=0;ev=er}else{if(ei==0){if(en!=0){ev/=en}else{ev=0}if(el!=0){er/=el}else{er=0}}else{ei=1/ei;var ex=ei*(el*ev-em*er);er=ei*(en*er-em*ev);ev=ex}}var ew=this.b1.imass;this.b1.posx-=ev*ew;this.b1.posy-=er*ew;var es=this.b2.imass;this.b2.posx+=ev*es;this.b2.posy+=er*es;var ec=this.b1;var ed=-(er*eq-ev*eo)*this.b1.iinertia;ec.rot+=ed;if(ed*ed>0.0001){ec.axisx=Math.sin(ec.rot);ec.axisy=Math.cos(ec.rot)}else{var eG=ed*ed;var eF=1-0.5*eG;var eL=1-eG*eG/8;var eH=(eF*ec.axisx+ed*ec.axisy)*eL;ec.axisy=(eF*ec.axisy-ed*ec.axisx)*eL;ec.axisx=eH}var eD=this.b2;var eB=(er*eh-ev*ef)*this.b2.iinertia;eD.rot+=eB;if(eB*eB>0.0001){eD.axisx=Math.sin(eD.rot);eD.axisy=Math.cos(eD.rot)}else{var eu=eB*eB;var eM=1-0.5*eu;var eK=1-eu*eu/8;var et=(eM*eD.axisx+eB*eD.axisy)*eK;eD.axisy=(eM*eD.axisy-eB*eD.axisx)*eK;eD.axisx=et}return false};D.prototype.draw=function(ea){};D.prototype.__class__=D;var N=zpp_nape.constraint.ZPP_PulleyJoint=function(){this.stepped=false;this.bias=0;this.gamma=0;this.jMax=0;this.jAcc=0;this.kMass=0;this.wrap_a4=null;this.a4rely=0;this.a4relx=0;this.a4localy=0;this.a4localx=0;this.b4=null;this.wrap_a3=null;this.a3rely=0;this.a3relx=0;this.a3localy=0;this.a3localx=0;this.b3=null;this.wrap_a2=null;this.a2rely=0;this.a2relx=0;this.a2localy=0;this.a2localx=0;this.b2=null;this.wrap_a1=null;this.a1rely=0;this.a1relx=0;this.a1localy=0;this.a1localx=0;this.b1=null;this.cx4=0;this.cx3=0;this.cx2=0;this.cx1=0;this.n34y=0;this.n34x=0;this.n12y=0;this.n12x=0;this.equal=false;this.slack=false;this.jointMax=0;this.jointMin=0;this.ratio=1;this.outer_zn=null;b1.call(this);this.a1localx=0;this.a1localy=0;this.a1relx=0;this.a1rely=0;this.a2localx=0;this.a2localy=0;this.a2relx=0;this.a2rely=0;this.a3localx=0;this.a3localy=0;this.a3relx=0;this.a3rely=0;this.a4localx=0;this.a4localy=0;this.a4relx=0;this.a4rely=0;this.n12x=1;this.n12y=0;this.n34x=1;this.n34y=0;this.jAcc=0;this.jMax=Infinity;this.stepped=false;this.cx1=this.cx2=this.cx3=this.cx4=0};N.__name__=["zpp_nape","constraint","ZPP_PulleyJoint"];N.__super__=b1;N.prototype=Object.create(b1.prototype);N.prototype.outer_zn=null;N.prototype.ratio=null;N.prototype.jointMin=null;N.prototype.jointMax=null;N.prototype.slack=null;N.prototype.equal=null;N.prototype.is_slack=function(){var ec;this.a1relx=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;this.a1rely=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;this.a2relx=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;this.a2rely=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;this.a3relx=this.b3.axisy*this.a3localx-this.b3.axisx*this.a3localy;this.a3rely=this.a3localx*this.b3.axisx+this.a3localy*this.b3.axisy;this.a4relx=this.b4.axisy*this.a4localx-this.b4.axisx*this.a4localy;this.a4rely=this.a4localx*this.b4.axisx+this.a4localy*this.b4.axisy;var ef=0;var ee=0;var ed=0;var eb=0;ef=this.b2.posx+this.a2relx-(this.b1.posx+this.a1relx);ee=this.b2.posy+this.a2rely-(this.b1.posy+this.a1rely);ed=this.b4.posx+this.a4relx-(this.b3.posx+this.a3relx);eb=this.b4.posy+this.a4rely-(this.b3.posy+this.a3rely);var eh=Math.sqrt(ef*ef+ee*ee);var ea=Math.sqrt(ed*ed+eb*eb);if(ea==0){Math.sqrt(0)}var eg=eh+this.ratio*ea;if(this.equal){ec=false}else{if(egthis.jointMax){eg-=this.jointMax;ec=false}else{eg=0;ec=true}}}return ec};N.prototype.n12x=null;N.prototype.n12y=null;N.prototype.n34x=null;N.prototype.n34y=null;N.prototype.cx1=null;N.prototype.cx2=null;N.prototype.cx3=null;N.prototype.cx4=null;N.prototype.bodyImpulse=function(ex){if(this.stepped){var ey=q.get();if(ex==this.b1){var ep=ey.zpp_inner;if(ep._validate!=null){ep._validate()}ey.zpp_inner.x=ey.zpp_inner.x-this.jAcc*this.n12x;var ew=ey.zpp_inner;if(ew._validate!=null){ew._validate()}var ev=ey.zpp_inner;if(ev._validate!=null){ev._validate()}ey.zpp_inner.y=ey.zpp_inner.y-this.jAcc*this.n12y;var eu=ey.zpp_inner;if(eu._validate!=null){eu._validate()}var et=ey.zpp_inner;if(et._validate!=null){et._validate()}ey.zpp_inner.z=ey.zpp_inner.z-this.cx1*this.jAcc;var es=ey.zpp_inner;if(es._validate!=null){es._validate()}}if(ex==this.b2){var er=ey.zpp_inner;if(er._validate!=null){er._validate()}ey.zpp_inner.x=ey.zpp_inner.x+this.jAcc*this.n12x;var eo=ey.zpp_inner;if(eo._validate!=null){eo._validate()}var em=ey.zpp_inner;if(em._validate!=null){em._validate()}ey.zpp_inner.y=ey.zpp_inner.y+this.jAcc*this.n12y;var ek=ey.zpp_inner;if(ek._validate!=null){ek._validate()}var eq=ey.zpp_inner;if(eq._validate!=null){eq._validate()}ey.zpp_inner.z=ey.zpp_inner.z+this.cx2*this.jAcc;var en=ey.zpp_inner;if(en._validate!=null){en._validate()}}if(ex==this.b3){var el=ey.zpp_inner;if(el._validate!=null){el._validate()}ey.zpp_inner.x=ey.zpp_inner.x-this.jAcc*this.n34x;var ej=ey.zpp_inner;if(ej._validate!=null){ej._validate()}var ei=ey.zpp_inner;if(ei._validate!=null){ei._validate()}ey.zpp_inner.y=ey.zpp_inner.y-this.jAcc*this.n34y;var eh=ey.zpp_inner;if(eh._validate!=null){eh._validate()}var eg=ey.zpp_inner;if(eg._validate!=null){eg._validate()}ey.zpp_inner.z=ey.zpp_inner.z-this.cx3*this.jAcc;var ef=ey.zpp_inner;if(ef._validate!=null){ef._validate()}}if(ex==this.b4){var ee=ey.zpp_inner;if(ee._validate!=null){ee._validate()}ey.zpp_inner.x=ey.zpp_inner.x+this.jAcc*this.n34x;var ed=ey.zpp_inner;if(ed._validate!=null){ed._validate()}var ec=ey.zpp_inner;if(ec._validate!=null){ec._validate()}ey.zpp_inner.y=ey.zpp_inner.y+this.jAcc*this.n34y;var eb=ey.zpp_inner;if(eb._validate!=null){eb._validate()}var ea=ey.zpp_inner;if(ea._validate!=null){ea._validate()}ey.zpp_inner.z=ey.zpp_inner.z+this.cx4*this.jAcc;var ez=ey.zpp_inner;if(ez._validate!=null){ez._validate()}}return ey}else{return q.get(0,0,0)}};N.prototype.activeBodies=function(){if(this.b1!=null){this.b1.constraints.add(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.add(this)}}if(this.b3!=this.b1&&this.b3!=this.b2){if(this.b3!=null){this.b3.constraints.add(this)}}if(this.b4!=this.b1&&this.b4!=this.b2&&this.b4!=this.b3){if(this.b4!=null){this.b4.constraints.add(this)}}};N.prototype.inactiveBodies=function(){if(this.b1!=null){this.b1.constraints.remove(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.remove(this)}}if(this.b3!=this.b1&&this.b3!=this.b2){if(this.b3!=null){this.b3.constraints.remove(this)}}if(this.b4!=this.b1&&this.b4!=this.b2&&this.b4!=this.b3){if(this.b4!=null){this.b4.constraints.remove(this)}}};N.prototype.b1=null;N.prototype.a1localx=null;N.prototype.a1localy=null;N.prototype.a1relx=null;N.prototype.a1rely=null;N.prototype.validate_a1=function(){this.wrap_a1.zpp_inner.x=this.a1localx;this.wrap_a1.zpp_inner.y=this.a1localy};N.prototype.invalidate_a1=function(ea){this.immutable_midstep("Constraint::a1");this.a1localx=ea.x;this.a1localy=ea.y;this.wake()};N.prototype.setup_a1=function(){var ea=this.a1localx;var eh=this.a1localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a1=eb;this.wrap_a1.zpp_inner._inuse=true;this.wrap_a1.zpp_inner._validate=dX(this,this.validate_a1);this.wrap_a1.zpp_inner._invalidate=dX(this,this.invalidate_a1)};N.prototype.wrap_a1=null;N.prototype.b2=null;N.prototype.a2localx=null;N.prototype.a2localy=null;N.prototype.a2relx=null;N.prototype.a2rely=null;N.prototype.validate_a2=function(){this.wrap_a2.zpp_inner.x=this.a2localx;this.wrap_a2.zpp_inner.y=this.a2localy};N.prototype.invalidate_a2=function(ea){this.immutable_midstep("Constraint::a2");this.a2localx=ea.x;this.a2localy=ea.y;this.wake()};N.prototype.setup_a2=function(){var ea=this.a2localx;var eh=this.a2localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a2=eb;this.wrap_a2.zpp_inner._inuse=true;this.wrap_a2.zpp_inner._validate=dX(this,this.validate_a2);this.wrap_a2.zpp_inner._invalidate=dX(this,this.invalidate_a2)};N.prototype.wrap_a2=null;N.prototype.b3=null;N.prototype.a3localx=null;N.prototype.a3localy=null;N.prototype.a3relx=null;N.prototype.a3rely=null;N.prototype.validate_a3=function(){this.wrap_a3.zpp_inner.x=this.a3localx;this.wrap_a3.zpp_inner.y=this.a3localy};N.prototype.invalidate_a3=function(ea){this.immutable_midstep("Constraint::a3");this.a3localx=ea.x;this.a3localy=ea.y;this.wake()};N.prototype.setup_a3=function(){var ea=this.a3localx;var eh=this.a3localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a3=eb;this.wrap_a3.zpp_inner._inuse=true;this.wrap_a3.zpp_inner._validate=dX(this,this.validate_a3);this.wrap_a3.zpp_inner._invalidate=dX(this,this.invalidate_a3)};N.prototype.wrap_a3=null;N.prototype.b4=null;N.prototype.a4localx=null;N.prototype.a4localy=null;N.prototype.a4relx=null;N.prototype.a4rely=null;N.prototype.validate_a4=function(){this.wrap_a4.zpp_inner.x=this.a4localx;this.wrap_a4.zpp_inner.y=this.a4localy};N.prototype.invalidate_a4=function(ea){this.immutable_midstep("Constraint::a4");this.a4localx=ea.x;this.a4localy=ea.y;this.wake()};N.prototype.setup_a4=function(){var ea=this.a4localx;var eh=this.a4localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a4=eb;this.wrap_a4.zpp_inner._inuse=true;this.wrap_a4.zpp_inner._validate=dX(this,this.validate_a4);this.wrap_a4.zpp_inner._invalidate=dX(this,this.invalidate_a4)};N.prototype.wrap_a4=null;N.prototype.kMass=null;N.prototype.jAcc=null;N.prototype.jMax=null;N.prototype.gamma=null;N.prototype.bias=null;N.prototype.stepped=null;N.prototype.copy=function(ed,eg){var ep=this.outer_zn;if(ep.zpp_inner_zn.wrap_a1==null){ep.zpp_inner_zn.setup_a1()}var et=ep.zpp_inner_zn.wrap_a1;var es=this.outer_zn;if(es.zpp_inner_zn.wrap_a2==null){es.zpp_inner_zn.setup_a2()}var eo=es.zpp_inner_zn.wrap_a2;var er=this.outer_zn;if(er.zpp_inner_zn.wrap_a3==null){er.zpp_inner_zn.setup_a3()}var en=er.zpp_inner_zn.wrap_a3;var eq=this.outer_zn;if(eq.zpp_inner_zn.wrap_a4==null){eq.zpp_inner_zn.setup_a4()}var ev=new dy(null,null,null,null,et,eo,en,eq.zpp_inner_zn.wrap_a4,this.jointMin,this.jointMax,this.ratio);this.copyto(ev);if(ed!=null&&this.b1!=null){var eu=null;var eb=0;while(ebthis.jointMax){throw new cE("Error: PulleyJoint must have jointMin <= jointMax")}if(this.b1.type!=2&&this.b2.type!=2){throw new cE("Error: PulleyJoint cannot have both bodies in a linked pair non-dynamic")}if(this.b3.type!=2&&this.b4.type!=2){throw new cE("Error: PulleyJoint cannot have both bodies in a linked pair non-dynamic")}};N.prototype.wake_connected=function(){if(this.b1!=null&&this.b1.type==2){this.b1.wake()}if(this.b2!=null&&this.b2.type==2){this.b2.wake()}if(this.b3!=null&&this.b3.type==2){this.b3.wake()}if(this.b4!=null&&this.b4.type==2){this.b4.wake()}};N.prototype.forest=function(){if(this.b1.type==2){var eD;if(this.b1.component==this.b1.component.parent){eD=this.b1.component}else{var eb=this.b1.component;var ex=null;while(eb!=eb.parent){var eL=eb.parent;eb.parent=ex;ex=eb;eb=eL}while(ex!=null){var eN=ex.parent;ex.parent=eb;ex=eN}eD=eb}var er;if(this.component==this.component.parent){er=this.component}else{var eh=this.component;var eC=null;while(eh!=eh.parent){var eM=eh.parent;eh.parent=eC;eC=eh;eh=eM}while(eC!=null){var eK=eC.parent;eC.parent=eh;eC=eK}er=eh}if(eD!=er){if(eD.ranker.rank){er.parent=eD}else{er.parent=eD;eD.rank++}}}}if(this.b2.type==2){var eu;if(this.b2.component==this.b2.component.parent){eu=this.b2.component}else{var eg=this.b2.component;var eB=null;while(eg!=eg.parent){var eJ=eg.parent;eg.parent=eB;eB=eg;eg=eJ}while(eB!=null){var eI=eB.parent;eB.parent=eg;eB=eI}eu=eg}var eq;if(this.component==this.component.parent){eq=this.component}else{var ef=this.component;var eA=null;while(ef!=ef.parent){var eH=ef.parent;ef.parent=eA;eA=ef;ef=eH}while(eA!=null){var eG=eA.parent;eA.parent=ef;eA=eG}eq=ef}if(eu!=eq){if(eu.rankeq.rank){eq.parent=eu}else{eq.parent=eu;eu.rank++}}}}if(this.b3.type==2){var et;if(this.b3.component==this.b3.component.parent){et=this.b3.component}else{var ee=this.b3.component;var ez=null;while(ee!=ee.parent){var eF=ee.parent;ee.parent=ez;ez=ee;ee=eF}while(ez!=null){var eE=ez.parent;ez.parent=ee;ez=eE}et=ee}var ep;if(this.component==this.component.parent){ep=this.component}else{var ed=this.component;var ey=null;while(ed!=ed.parent){var en=ed.parent;ed.parent=ey;ey=ed;ed=en}while(ey!=null){var em=ey.parent;ey.parent=ed;ey=em}ep=ed}if(et!=ep){if(et.rankep.rank){ep.parent=et}else{ep.parent=et;et.rank++}}}}if(this.b4.type==2){var es;if(this.b4.component==this.b4.component.parent){es=this.b4.component}else{var ec=this.b4.component;var ew=null;while(ec!=ec.parent){var el=ec.parent;ec.parent=ew;ew=ec;ec=el}while(ew!=null){var ek=ew.parent;ew.parent=ec;ew=ek}es=ec}var eo;if(this.component==this.component.parent){eo=this.component}else{var ea=this.component;var ev=null;while(ea!=ea.parent){var ej=ea.parent;ea.parent=ev;ev=ea;ea=ej}while(ev!=null){var ei=ev.parent;ev.parent=ea;ev=ei}eo=ea}if(es!=eo){if(es.rankeo.rank){eo.parent=es}else{eo.parent=es;es.rank++}}}}};N.prototype.pair_exists=function(eb,ea){if(!(this.b1.id==eb&&(this.b2.id==ea||this.b3.id==ea||this.b4.id==ea)||this.b2.id==eb&&(this.b3.id==ea||this.b4.id==ea||this.b1.id==ea)||this.b3.id==eb&&(this.b4.id==ea||this.b1.id==ea||this.b2.id==ea))){if(this.b4.id==eb){if(!(this.b1.id==ea||this.b2.id==ea)){return this.b3.id==ea}else{return true}}else{return false}}else{return true}};N.prototype.clearcache=function(){this.jAcc=0;this.pre_dt=-1};N.prototype.preStep=function(ei){if(this.pre_dt==-1){this.pre_dt=ei}var en=ei/this.pre_dt;this.pre_dt=ei;this.stepped=true;this.equal=this.jointMin==this.jointMax;this.a1relx=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;this.a1rely=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;this.a2relx=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;this.a2rely=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;this.a3relx=this.b3.axisy*this.a3localx-this.b3.axisx*this.a3localy;this.a3rely=this.a3localx*this.b3.axisx+this.a3localy*this.b3.axisy;this.a4relx=this.b4.axisy*this.a4localx-this.b4.axisx*this.a4localy;this.a4rely=this.a4localx*this.b4.axisx+this.a4localy*this.b4.axisy;var er=0;var eq=0;var em=0;var el=0;er=this.b2.posx+this.a2relx-(this.b1.posx+this.a1relx);eq=this.b2.posy+this.a2rely-(this.b1.posy+this.a1rely);em=this.b4.posx+this.a4relx-(this.b3.posx+this.a3relx);el=this.b4.posy+this.a4rely-(this.b3.posy+this.a3rely);var eo=Math.sqrt(er*er+eq*eq);var eb=Math.sqrt(em*em+el*el);if(eo!=0){var eg=1/eo;this.n12x=er*eg;this.n12y=eq*eg}if(eb!=0){var ef=1/eb;this.n34x=em*ef;this.n34y=el*ef;var ee=this.ratio;this.n34x*=ee;this.n34y*=ee}else{var ed=this.ratio/Math.sqrt(this.n34x*this.n34x+this.n34y*this.n34y);this.n34x*=ed;this.n34y*=ed}var ej=eo+this.ratio*eb;if(this.equal){ej-=this.jointMax;this.slack=false}else{if(ejthis.jointMax){ej-=this.jointMax;this.slack=false}else{this.n12x=0;this.n12y=0;this.n34x=0;this.n34y=0;ej=0;this.slack=true}}}var ep=ej;if(!this.slack){this.cx1=this.n12y*this.a1relx-this.n12x*this.a1rely;this.cx2=this.n12y*this.a2relx-this.n12x*this.a2rely;this.cx3=this.n34y*this.a3relx-this.n34x*this.a3rely;this.cx4=this.n34y*this.a4relx-this.n34x*this.a4rely;var ec=this.b1.smass+this.b2.smass+this.ratio*this.ratio*(this.b3.smass+this.b4.smass)+this.b1.sinertia*this.cx1*this.cx1+this.b2.sinertia*this.cx2*this.cx2+this.b3.sinertia*this.cx3*this.cx3+this.b4.sinertia*this.cx4*this.cx4;if(this.b1==this.b4){ec-=2*((this.n12x*this.n34x+this.n12y*this.n34y)*this.b1.smass+this.cx1*this.cx4*this.b1.sinertia)}if(this.b1==this.b3){ec+=2*((this.n12x*this.n34x+this.n12y*this.n34y)*this.b1.smass+this.cx1*this.cx3*this.b1.sinertia)}if(this.b2==this.b3){ec-=2*((this.n12x*this.n34x+this.n12y*this.n34y)*this.b2.smass+this.cx2*this.cx3*this.b2.sinertia)}if(this.b2==this.b4){ec+=2*((this.n12x*this.n34x+this.n12y*this.n34y)*this.b2.smass+this.cx2*this.cx4*this.b2.sinertia)}this.kMass=ec;if(this.kMass!=0){this.kMass=1/this.kMass}else{this.jAcc=0}if(!this.stiff){if(this.breakUnderError&&ep*ep>this.maxError*this.maxError){return true}var ea;var ek=2*Math.PI*this.frequency;this.gamma=1/(ei*ek*(2*this.damping+ek*ei));var eh=1/(1+this.gamma);ea=ei*ek*ek*this.gamma;this.gamma*=eh;this.kMass*=eh;this.bias=-ep*ea;if(this.bias<-this.maxError){this.bias=-this.maxError}else{if(this.bias>this.maxError){this.bias=this.maxError}}}else{this.bias=0;this.gamma=0}this.jAcc*=en;this.jMax=this.maxForce*ei}return false};N.prototype.warmStart=function(){if(!this.slack){var eb=this.b1.imass*this.jAcc;this.b1.velx-=this.n12x*eb;this.b1.vely-=this.n12y*eb;var ed=this.b2.imass*this.jAcc;this.b2.velx+=this.n12x*ed;this.b2.vely+=this.n12y*ed;var ec=this.b3.imass*this.jAcc;this.b3.velx-=this.n34x*ec;this.b3.vely-=this.n34y*ec;var ea=this.b4.imass*this.jAcc;this.b4.velx+=this.n34x*ea;this.b4.vely+=this.n34y*ea;this.b1.angvel-=this.cx1*this.b1.iinertia*this.jAcc;this.b2.angvel+=this.cx2*this.b2.iinertia*this.jAcc;this.b3.angvel-=this.cx3*this.b3.iinertia*this.jAcc;this.b4.angvel+=this.cx4*this.b4.iinertia*this.jAcc}};N.prototype.applyImpulseVel=function(){if(this.slack){return false}var ea=this.kMass*(this.bias-(this.n12x*(this.b2.velx+this.b2.kinvelx-this.b1.velx-this.b1.kinvelx)+this.n12y*(this.b2.vely+this.b2.kinvely-this.b1.vely-this.b1.kinvely)+this.n34x*(this.b4.velx+this.b4.kinvelx-this.b3.velx-this.b3.kinvelx)+this.n34y*(this.b4.vely+this.b4.kinvely-this.b3.vely-this.b3.kinvely)+(this.b2.angvel+this.b2.kinangvel)*this.cx2-(this.b1.angvel+this.b1.kinangvel)*this.cx1+(this.b4.angvel+this.b4.kinangvel)*this.cx4-(this.b3.angvel+this.b3.kinangvel)*this.cx3))-this.jAcc*this.gamma;var ef=this.jAcc;this.jAcc+=ea;if(!this.equal&&this.jAcc>0){this.jAcc=0}if(this.breakUnderForce&&this.jAcc<-this.jMax){return true}if(!this.stiff){if(this.jAcc<-this.jMax){this.jAcc=-this.jMax}}ea=this.jAcc-ef;var ec=this.b1.imass*ea;this.b1.velx-=this.n12x*ec;this.b1.vely-=this.n12y*ec;var ee=this.b2.imass*ea;this.b2.velx+=this.n12x*ee;this.b2.vely+=this.n12y*ee;var ed=this.b3.imass*ea;this.b3.velx-=this.n34x*ed;this.b3.vely-=this.n34y*ed;var eb=this.b4.imass*ea;this.b4.velx+=this.n34x*eb;this.b4.vely+=this.n34y*eb;this.b1.angvel-=this.cx1*this.b1.iinertia*ea;this.b2.angvel+=this.cx2*this.b2.iinertia*ea;this.b3.angvel-=this.cx3*this.b3.iinertia*ea;this.b4.angvel+=this.cx4*this.b4.iinertia*ea;return false};N.prototype.applyImpulsePos=function(){var eZ;var eI;var fa=0;var e9=0;fa=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;e9=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;var e2=0;var e1=0;e2=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;e1=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var eR=0;var eP=0;eR=this.b3.axisy*this.a3localx-this.b3.axisx*this.a3localy;eP=this.a3localx*this.b3.axisx+this.a3localy*this.b3.axisy;var ey=0;var ew=0;ey=this.b4.axisy*this.a4localx-this.b4.axisx*this.a4localy;ew=this.a4localx*this.b4.axisx+this.a4localy*this.b4.axisy;var eM;var eX=0;var eW=0;var eu=0;var et=0;eX=this.n12x;eW=this.n12y;eu=this.n34x;et=this.n34y;var e5=0;var e4=0;var eA=0;var ez=0;e5=this.b2.posx+e2-(this.b1.posx+fa);e4=this.b2.posy+e1-(this.b1.posy+e9);eA=this.b4.posx+ey-(this.b3.posx+eR);ez=this.b4.posy+ew-(this.b3.posy+eP);var e3=Math.sqrt(e5*e5+e4*e4);var ex=Math.sqrt(eA*eA+ez*ez);if(e3!=0){var eC=1/e3;eX=e5*eC;eW=e4*eC}if(ex!=0){var fl=1/ex;eu=eA*fl;et=ez*fl;var fk=this.ratio;eu*=fk;et*=fk}else{var fj=this.ratio/Math.sqrt(eu*eu+et*et);eu*=fj;et*=fj}var e0=e3+this.ratio*ex;if(this.equal){e0-=this.jointMax;eM=false}else{if(e0this.jointMax){e0-=this.jointMax;eM=false}else{eX=0;eW=0;eu=0;et=0;e0=0;eM=true}}}eZ=e0;if(!eM){if(this.breakUnderError&&eZ*eZ>this.maxError*this.maxError){return true}if(eZ*eZ6){var eG=this.b1.smass+this.b2.smass;if(eG>P.epsilon){eG=0.75/eG;eI=-eZ*eG;if(this.equal||eI<0){var fi=eI*this.b1.imass;this.b1.posx-=eX*fi;this.b1.posy-=eW*fi;var fh=eI*this.b2.imass;this.b2.posx+=eX*fh;this.b2.posy+=eW*fh;var fg=eI*this.b3.imass;this.b3.posx-=eu*fg;this.b3.posy-=et*fg;var ff=eI*this.b4.imass;this.b4.posx+=eu*ff;this.b4.posy+=et*ff;var eh=0;var fn=0;var eg=0;var fm=0;eh=this.b2.posx+e2-(this.b1.posx+fa);fn=this.b2.posy+e1-(this.b1.posy+e9);eg=this.b4.posx+ey-(this.b3.posx+eR);fm=this.b4.posy+ew-(this.b3.posy+eP);var fb=Math.sqrt(eh*eh+fn*fn);var eK=Math.sqrt(eg*eg+fm*fm);if(fb!=0){var fe=1/fb;eX=eh*fe;eW=fn*fe}if(eK!=0){var fd=1/eK;eu=eg*fd;et=fm*fd;var eq=this.ratio;eu*=eq;et*=eq}else{var eo=this.ratio/Math.sqrt(eu*eu+et*et);eu*=eo;et*=eo}var fc=fb+this.ratio*eK;if(this.equal){fc-=this.jointMax}else{if(fcthis.jointMax){fc-=this.jointMax}else{eX=0;eW=0;eu=0;et=0;fc=0}}}eZ=fc;eZ*=0.5}}}var er;var ep;var en;var el;er=eW*fa-eX*e9;ep=eW*e2-eX*e1;en=et*eR-eu*eP;el=et*ey-eu*ew;var eY=this.b1.smass+this.b2.smass+this.ratio*this.ratio*(this.b3.smass+this.b4.smass)+this.b1.sinertia*er*er+this.b2.sinertia*ep*ep+this.b3.sinertia*en*en+this.b4.sinertia*el*el;if(this.b1==this.b4){eY-=2*((eX*eu+eW*et)*this.b1.smass+er*el*this.b1.sinertia)}if(this.b1==this.b3){eY+=2*((eX*eu+eW*et)*this.b1.smass+er*en*this.b1.sinertia)}if(this.b2==this.b3){eY-=2*((eX*eu+eW*et)*this.b2.smass+ep*en*this.b2.sinertia)}if(this.b2==this.b4){eY+=2*((eX*eu+eW*et)*this.b2.smass+ep*el*this.b2.sinertia)}var eB=eY;if(eB!=0){eB=1/eB}eI=-eZ*eB;if(this.equal||eI<0){var em=this.b1.imass*eI;this.b1.posx-=eX*em;this.b1.posy-=eW*em;var ek=this.b2.imass*eI;this.b2.posx+=eX*ek;this.b2.posy+=eW*ek;var ej=this.b3.imass*eI;this.b3.posx-=eu*ej;this.b3.posy-=et*ej;var ei=this.b4.imass*eI;this.b4.posx+=eu*ei;this.b4.posy+=et*ei;var ev=this.b1;var es=-er*this.b1.iinertia*eI;ev.rot+=es;if(es*es>0.0001){ev.axisx=Math.sin(ev.rot);ev.axisy=Math.cos(ev.rot)}else{var eQ=es*es;var eD=1-0.5*eQ;var eE=1-eQ*eQ/8;var eS=(eD*ev.axisx+es*ev.axisy)*eE;ev.axisy=(eD*ev.axisy-es*ev.axisx)*eE;ev.axisx=eS}var eJ=this.b2;var ef=ep*this.b2.iinertia*eI;eJ.rot+=ef;if(ef*ef>0.0001){eJ.axisx=Math.sin(eJ.rot);eJ.axisy=Math.cos(eJ.rot)}else{var eO=ef*ef;var eV=1-0.5*eO;var ec=1-eO*eO/8;var e8=(eV*eJ.axisx+ef*eJ.axisy)*ec;eJ.axisy=(eV*eJ.axisy-ef*eJ.axisx)*ec;eJ.axisx=e8}var eH=this.b3;var ee=-en*this.b3.iinertia*eI;eH.rot+=ee;if(ee*ee>0.0001){eH.axisx=Math.sin(eH.rot);eH.axisy=Math.cos(eH.rot)}else{var eN=ee*ee;var eU=1-0.5*eN;var eb=1-eN*eN/8;var e7=(eU*eH.axisx+ee*eH.axisy)*eb;eH.axisy=(eU*eH.axisy-ee*eH.axisx)*eb;eH.axisx=e7}var eF=this.b4;var ed=el*this.b4.iinertia*eI;eF.rot+=ed;if(ed*ed>0.0001){eF.axisx=Math.sin(eF.rot);eF.axisy=Math.cos(eF.rot)}else{var eL=ed*ed;var eT=1-0.5*eL;var ea=1-eL*eL/8;var e6=(eT*eF.axisx+ed*eF.axisy)*ea;eF.axisy=(eT*eF.axisy-ed*eF.axisx)*ea;eF.axisx=e6}}}return false};N.prototype.draw=function(ea){};N.prototype.__class__=N;var b4=zpp_nape.constraint.ZPP_UserConstraint=function(ee,ec){this.jOld=null;this.J=null;this.vec3=null;this.Keff=null;this.jMax=0;this.velonly=false;this.gamma=0;this.soft=0;this.y=null;this.L=null;this.stepped=false;this.bias=null;this.jAcc=null;this.dim=0;this.bodies=null;this.outer_zn=null;b1.call(this);this.bodies=[];this.dim=ee;this.velonly=ec;this.jAcc=[];this.bias=[];this.L=[];this.J=[];this.jOld=[];this.y=[];this.Keff=[];this.vec3=q.get(0,0,0);var ed=0;while(ed0){this.bodies[ed]=this.bodies[ee-1]}this.bodies.pop();if(this.active&&this.space!=null){if(eb!=null){eb.constraints.remove(this)}}}ec=ea;break}++ed}return ec!=null};b4.prototype.bodyImpulse=function(ea){var ed=0;var ee=this.dim;while(edem.rank){em.parent=ec}else{em.parent=ec;ec.rank++}}}}}};b4.prototype.pair_exists=function(ea,ef){var ee=false;var eb=this.bodies.length|0;var eh=0;while(eheb*eb){var ef=eb/Math.sqrt(ea);var ed=0;var ee=this.dim;while(edthis.maxError*this.maxError){return true}var ei=0;var ef=this.dim;while(eithis.jMax*this.jMax){if(this.breakUnderForce){return true}else{if(!this.stiff){this._clamp(this.jAcc,this.jMax)}}}var el=0;var ed=this.dim;while(elthis.maxError*this.maxError){return true}else{if(eb0.0001){er.axisx=Math.sin(er.rot);er.axisy=Math.cos(er.rot)}else{var es=ef*ef;var eg=1-0.5*es;var eh=1-es*es/8;var ep=(eg*er.axisx+ef*er.axisy)*eh;er.axisy=(eg*er.axisy-ef*er.axisx)*eh;er.axisx=ep}}return false};b4.prototype.draw=function(ea){this.outer_zn.__draw(ea)};b4.prototype.__class__=b4;var l=zpp_nape.constraint.ZPP_UserBody=function(eb,ea){this.body=null;this.cnt=0;this.cnt=eb;this.body=ea};l.__name__=["zpp_nape","constraint","ZPP_UserBody"];l.prototype.cnt=null;l.prototype.body=null;l.prototype.__class__=l;var aC=zpp_nape.constraint.ZPP_WeldJoint=function(){this.stepped=false;this.biasz=0;this.biasy=0;this.biasx=0;this.gamma=0;this.jMax=0;this.jAccz=0;this.jAccy=0;this.jAccx=0;this.kMassf=0;this.kMasse=0;this.kMassc=0;this.kMassd=0;this.kMassb=0;this.kMassa=0;this.phase=0;this.wrap_a2=null;this.a2rely=0;this.a2relx=0;this.a2localy=0;this.a2localx=0;this.b2=null;this.wrap_a1=null;this.a1rely=0;this.a1relx=0;this.a1localy=0;this.a1localx=0;this.b1=null;this.outer_zn=null;b1.call(this);this.phase=0;this.jAccx=0;this.jAccy=0;this.jAccz=0;this.jMax=Infinity;this.stepped=false;this.a1localx=0;this.a1localy=0;this.a1relx=0;this.a1rely=0;this.a2localx=0;this.a2localy=0;this.a2relx=0;this.a2rely=0};aC.__name__=["zpp_nape","constraint","ZPP_WeldJoint"];aC.__super__=b1;aC.prototype=Object.create(b1.prototype);aC.prototype.outer_zn=null;aC.prototype.bodyImpulse=function(ea){if(this.stepped){if(ea==this.b1){return q.get(-this.jAccx,-this.jAccy,-(this.jAccy*this.a1relx-this.jAccx*this.a1rely+this.jAccz))}else{return q.get(this.jAccx,this.jAccy,this.jAccy*this.a2relx-this.jAccx*this.a2rely+this.jAccz)}}else{return q.get(0,0,0)}};aC.prototype.activeBodies=function(){if(this.b1!=null){this.b1.constraints.add(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.add(this)}}};aC.prototype.inactiveBodies=function(){if(this.b1!=null){this.b1.constraints.remove(this)}if(this.b2!=this.b1){if(this.b2!=null){this.b2.constraints.remove(this)}}};aC.prototype.b1=null;aC.prototype.a1localx=null;aC.prototype.a1localy=null;aC.prototype.a1relx=null;aC.prototype.a1rely=null;aC.prototype.validate_a1=function(){this.wrap_a1.zpp_inner.x=this.a1localx;this.wrap_a1.zpp_inner.y=this.a1localy};aC.prototype.invalidate_a1=function(ea){this.immutable_midstep("Constraint::a1");this.a1localx=ea.x;this.a1localy=ea.y;this.wake()};aC.prototype.setup_a1=function(){var ea=this.a1localx;var eh=this.a1localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a1=eb;this.wrap_a1.zpp_inner._inuse=true;this.wrap_a1.zpp_inner._validate=dX(this,this.validate_a1);this.wrap_a1.zpp_inner._invalidate=dX(this,this.invalidate_a1)};aC.prototype.wrap_a1=null;aC.prototype.b2=null;aC.prototype.a2localx=null;aC.prototype.a2localy=null;aC.prototype.a2relx=null;aC.prototype.a2rely=null;aC.prototype.validate_a2=function(){this.wrap_a2.zpp_inner.x=this.a2localx;this.wrap_a2.zpp_inner.y=this.a2localy};aC.prototype.invalidate_a2=function(ea){this.immutable_midstep("Constraint::a2");this.a2localx=ea.x;this.a2localy=ea.y;this.wake()};aC.prototype.setup_a2=function(){var ea=this.a2localx;var eh=this.a2localy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_a2=eb;this.wrap_a2.zpp_inner._inuse=true;this.wrap_a2.zpp_inner._validate=dX(this,this.validate_a2);this.wrap_a2.zpp_inner._invalidate=dX(this,this.invalidate_a2)};aC.prototype.wrap_a2=null;aC.prototype.phase=null;aC.prototype.kMassa=null;aC.prototype.kMassb=null;aC.prototype.kMassd=null;aC.prototype.kMassc=null;aC.prototype.kMasse=null;aC.prototype.kMassf=null;aC.prototype.jAccx=null;aC.prototype.jAccy=null;aC.prototype.jAccz=null;aC.prototype.jMax=null;aC.prototype.gamma=null;aC.prototype.biasx=null;aC.prototype.biasy=null;aC.prototype.biasz=null;aC.prototype.stepped=null;aC.prototype.copy=function(ea,eb){var ee=this.outer_zn;if(ee.zpp_inner_zn.wrap_a1==null){ee.zpp_inner_zn.setup_a1()}var ec=ee.zpp_inner_zn.wrap_a1;var eg=this.outer_zn;if(eg.zpp_inner_zn.wrap_a2==null){eg.zpp_inner_zn.setup_a2()}var ef=new cX(null,null,ec,eg.zpp_inner_zn.wrap_a2);this.copyto(ef);if(ea!=null&&this.b1!=null){var ek=null;var ed=0;while(eder.rank){er.parent=en}else{er.parent=en;en.rank++}}}}if(this.b2.type==2){var ee;if(this.b2.component==this.b2.component.parent){ee=this.b2.component}else{var es=this.b2.component;var ek=null;while(es!=es.parent){var ed=es.parent;es.parent=ek;ek=es;es=ed}while(ek!=null){var ec=ek.parent;ek.parent=es;ek=ec}ee=es}var ep;if(this.component==this.component.parent){ep=this.component}else{var eq=this.component;var ej=null;while(eq!=eq.parent){var eb=eq.parent;eq.parent=ej;ej=eq;eq=eb}while(ej!=null){var ea=ej.parent;ej.parent=eq;ej=ea}ep=eq}if(ee!=ep){if(ee.rankep.rank){ep.parent=ee}else{ep.parent=ee;ee.rank++}}}}};aC.prototype.pair_exists=function(eb,ea){if(!(this.b1.id==eb&&this.b2.id==ea)){if(this.b1.id==ea){return this.b2.id==eb}else{return false}}else{return true}};aC.prototype.clearcache=function(){this.jAccx=0;this.jAccy=0;this.jAccz=0;this.pre_dt=-1};aC.prototype.preStep=function(em){if(this.pre_dt==-1){this.pre_dt=em}var er=em/this.pre_dt;this.pre_dt=em;this.stepped=true;this.a1relx=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;this.a1rely=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;this.a2relx=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;this.a2rely=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var es=this.b1.smass+this.b2.smass;this.kMassa=es;this.kMassb=0;this.kMassd=es;this.kMassc=0;this.kMasse=0;this.kMassf=0;if(this.b1.sinertia!=0){var ec=this.a1relx*this.b1.sinertia;var eb=this.a1rely*this.b1.sinertia;this.kMassa+=eb*this.a1rely;this.kMassb+=-eb*this.a1relx;this.kMassd+=ec*this.a1relx;this.kMassc+=-eb;this.kMasse+=ec;this.kMassf+=this.b1.sinertia}if(this.b2.sinertia!=0){var ew=this.a2relx*this.b2.sinertia;var ee=this.a2rely*this.b2.sinertia;this.kMassa+=ee*this.a2rely;this.kMassb+=-ee*this.a2relx;this.kMassd+=ew*this.a2relx;this.kMassc+=-ee;this.kMasse+=ew;this.kMassf+=this.b2.sinertia}var ed=this.kMassa*(this.kMassd*this.kMassf-this.kMasse*this.kMasse)+this.kMassb*(this.kMassc*this.kMasse-this.kMassb*this.kMassf)+this.kMassc*(this.kMassb*this.kMasse-this.kMassc*this.kMassd);var eu;if(ed!=ed){this.kMassa=0;this.kMassb=0;this.kMassd=0;this.kMassc=0;this.kMasse=0;this.kMassf=0;eu=7}else{if(ed==0){var et=0;if(this.kMassa!=0){this.kMassa=1/this.kMassa}else{this.kMassa=0;et=1}if(this.kMassd!=0){this.kMassd=1/this.kMassd}else{this.kMassd=0;et|=2}if(this.kMassf!=0){this.kMassf=1/this.kMassf}else{this.kMassf=0;et|=4}this.kMassb=this.kMassc=this.kMasse=0;eu=et}else{ed=1/ed;var eq=ed*(this.kMassd*this.kMassf-this.kMasse*this.kMasse);var ep=ed*(this.kMasse*this.kMassc-this.kMassb*this.kMassf);var el=ed*(this.kMassa*this.kMassf-this.kMassc*this.kMassc);var en=ed*(this.kMassb*this.kMasse-this.kMassc*this.kMassd);var ej=ed*(this.kMassb*this.kMassc-this.kMassa*this.kMasse);var ev=this.kMassa*this.kMassd-this.kMassb*this.kMassb;this.kMassa=eq;this.kMassb=ep;this.kMassd=el;this.kMassc=en;this.kMasse=ej;this.kMassf=ed*ev;eu=0}}if((eu&1)!=0){this.jAccx=0}if((eu&2)!=0){this.jAccy=0}if((eu&4)!=0){this.jAccz=0}if(!this.stiff){var ea;var eo=2*Math.PI*this.frequency;this.gamma=1/(em*eo*(2*this.damping+eo*em));var ek=1/(1+this.gamma);ea=em*eo*eo*this.gamma;this.gamma*=ek;this.kMassa*=ek;this.kMassb*=ek;this.kMassd*=ek;this.kMassc*=ek;this.kMasse*=ek;this.kMassf*=ek;this.biasx=this.b2.posx+this.a2relx-(this.b1.posx+this.a1relx);this.biasy=this.b2.posy+this.a2rely-(this.b1.posy+this.a1rely);this.biasz=this.b2.rot-this.b1.rot-this.phase;if(this.breakUnderError&&this.biasx*this.biasx+this.biasy*this.biasy+this.biasz*this.biasz>this.maxError*this.maxError){return true}var ei=-ea;this.biasx*=ei;this.biasy*=ei;this.biasz*=ei;var eh=this.maxError;var ef=this.biasx*this.biasx+this.biasy*this.biasy+this.biasz*this.biasz;if(ef>eh*eh){var eg=eh*(1/Math.sqrt(ef));this.biasx*=eg;this.biasy*=eg;this.biasz*=eg}}else{this.biasx=0;this.biasy=0;this.biasz=0;this.gamma=0}this.jAccx*=er;this.jAccy*=er;this.jAccz*=er;this.jMax=this.maxForce*em;return false};aC.prototype.warmStart=function(){var ea=this.b1.imass;this.b1.velx-=this.jAccx*ea;this.b1.vely-=this.jAccy*ea;var eb=this.b2.imass;this.b2.velx+=this.jAccx*eb;this.b2.vely+=this.jAccy*eb;this.b1.angvel-=(this.jAccy*this.a1relx-this.jAccx*this.a1rely+this.jAccz)*this.b1.iinertia;this.b2.angvel+=(this.jAccy*this.a2relx-this.jAccx*this.a2rely+this.jAccz)*this.b2.iinertia};aC.prototype.applyImpulseVel=function(){var en=0;var em=0;var el=0;en=this.b2.velx+this.b2.kinvelx-this.a2rely*(this.b2.angvel+this.b2.kinangvel)-(this.b1.velx+this.b1.kinvelx-this.a1rely*(this.b1.angvel+this.b1.kinangvel));em=this.b2.vely+this.b2.kinvely+this.a2relx*(this.b2.angvel+this.b2.kinangvel)-(this.b1.vely+this.b1.kinvely+this.a1relx*(this.b1.angvel+this.b1.kinangvel));el=this.b2.angvel+this.b2.kinangvel-this.b1.angvel-this.b1.kinangvel;var ea=0;var eq=0;var ep=0;ea=this.biasx-en;eq=this.biasy-em;ep=this.biasz-el;var ec=this.kMassa*ea+this.kMassb*eq+this.kMassc*ep;var eb=this.kMassb*ea+this.kMassd*eq+this.kMasse*ep;ep=this.kMassc*ea+this.kMasse*eq+this.kMassf*ep;ea=ec;eq=eb;var eo=this.gamma;ea-=this.jAccx*eo;eq-=this.jAccy*eo;ep-=this.jAccz*eo;var ek=0;var ej=0;var ei=0;ek=this.jAccx;ej=this.jAccy;ei=this.jAccz;this.jAccx+=ea;this.jAccy+=eq;this.jAccz+=ep;if(this.breakUnderForce){if(this.jAccx*this.jAccx+this.jAccy*this.jAccy+this.jAccz*this.jAccz>this.jMax*this.jMax){return true}}else{if(!this.stiff){var eh=this.jMax;var ef=this.jAccx*this.jAccx+this.jAccy*this.jAccy+this.jAccz*this.jAccz;if(ef>eh*eh){var eg=eh*(1/Math.sqrt(ef));this.jAccx*=eg;this.jAccy*=eg;this.jAccz*=eg}}}ea=this.jAccx-ek;eq=this.jAccy-ej;ep=this.jAccz-ei;var ee=this.b1.imass;this.b1.velx-=ea*ee;this.b1.vely-=eq*ee;var ed=this.b2.imass;this.b2.velx+=ea*ed;this.b2.vely+=eq*ed;this.b1.angvel-=(eq*this.a1relx-ea*this.a1rely+ep)*this.b1.iinertia;this.b2.angvel+=(eq*this.a2relx-ea*this.a2rely+ep)*this.b2.iinertia;return false};aC.prototype.applyImpulsePos=function(){var ey=0;var ew=0;ey=this.b1.axisy*this.a1localx-this.b1.axisx*this.a1localy;ew=this.a1localx*this.b1.axisx+this.a1localy*this.b1.axisy;var ei=0;var eg=0;ei=this.b2.axisy*this.a2localx-this.b2.axisx*this.a2localy;eg=this.a2localx*this.b2.axisx+this.a2localy*this.b2.axisy;var eh=0;var ef=0;var ee=0;eh=this.b2.posx+ei-(this.b1.posx+ey);ef=this.b2.posy+eg-(this.b1.posy+ew);ee=this.b2.rot-this.b1.rot-this.phase;var eE=0;var eA=0;var ez=0;if(this.breakUnderError&&eh*eh+ef*ef+ee*ee>this.maxError*this.maxError){return true}var eJ=true;if(eh*eh+ef*ef6){var eV=this.b1.smass+this.b2.smass;if(eV>P.epsilon){eV=0.75/eV;eE=-eh*eV;eA=-ef*eV;var ex=eE*eE+eA*eA;if(ex>400){var eP=20*(1/Math.sqrt(ex));eE*=eP;eA*=eP}var eI=this.b1.imass;this.b1.posx-=eE*eI;this.b1.posy-=eA*eI;var eH=this.b2.imass;this.b2.posx+=eE*eH;this.b2.posy+=eA*eH;eh=this.b2.posx+ei-(this.b1.posx+ey);ef=this.b2.posy+eg-(this.b1.posy+ew);ee=this.b2.rot-this.b1.rot-this.phase;eh*=0.5;ef*=0.5;ee*=0.5}}var ev=0;var eu=0;var es=0;var et=0;var er=0;var eq=0;var eU=this.b1.smass+this.b2.smass;ev=eU;eu=0;es=eU;et=0;er=0;eq=0;if(this.b1.sinertia!=0){var eb=ey*this.b1.sinertia;var ea=ew*this.b1.sinertia;ev=eU+ea*ew;eu+=-ea*ey;es=eU+eb*ey;et+=-ea;er+=eb;eq+=this.b1.sinertia}if(this.b2.sinertia!=0){var eN=ei*this.b2.sinertia;var eo=eg*this.b2.sinertia;ev+=eo*eg;eu+=-eo*ei;es+=eN*ei;et+=-eo;er+=eN;eq+=this.b2.sinertia}eE=-eh;eA=-ef;ez=-ee;var ep=eE*eE+eA*eA;if(ep>36){var eG=6*(1/Math.sqrt(ep));eE*=eG;eA*=eG}var ej=ev*(es*eq-er*er)+eu*(et*er-eu*eq)+et*(eu*er-et*es);if(ej!=ej){ez=0;eA=ez;eE=eA}else{if(ej==0){if(ev!=0){eE/=ev}else{eE=0}if(es!=0){eA/=es}else{eA=0}if(eq!=0){ez/=eq}else{ez=0}}else{ej=1/ej;var em=er*et-eu*eq;var el=eu*er-et*es;var ek=eu*et-ev*er;var eM=ej*(eE*(es*eq-er*er)+eA*em+ez*el);var en=ej*(eE*em+eA*(ev*eq-et*et)+ez*ek);ez=ej*(eE*el+eA*ek+ez*(ev*es-eu*eu));eE=eM;eA=en}}var eF=this.b1.imass;this.b1.posx-=eE*eF;this.b1.posy-=eA*eF;var eD=this.b2.imass;this.b2.posx+=eE*eD;this.b2.posy+=eA*eD;var ec=this.b1;var ed=-(eA*ey-eE*ew+ez)*this.b1.iinertia;ec.rot+=ed;if(ed*ed>0.0001){ec.axisx=Math.sin(ec.rot);ec.axisy=Math.cos(ec.rot)}else{var eT=ed*ed;var eQ=1-0.5*eT;var eX=1-eT*eT/8;var eS=(eQ*ec.axisx+ed*ec.axisy)*eX;ec.axisy=(eQ*ec.axisy-ed*ec.axisx)*eX;ec.axisx=eS}var eO=this.b2;var eK=(eA*ei-eE*eg+ez)*this.b2.iinertia;eO.rot+=eK;if(eK*eK>0.0001){eO.axisx=Math.sin(eO.rot);eO.axisy=Math.cos(eO.rot)}else{var eC=eK*eK;var eY=1-0.5*eC;var eW=1-eC*eC/8;var eB=(eY*eO.axisx+eK*eO.axisy)*eW;eO.axisy=(eY*eO.axisy-eK*eO.axisx)*eW;eO.axisx=eB}return false};aC.prototype.draw=function(ea){};aC.prototype.__class__=aC;var j=zpp_nape.dynamics.ZPP_Arbiter=function(){this.sensorarb=null;this.fluidarb=null;this.colarb=null;this.type=0;this.pair=null;this.ws2=null;this.ws1=null;this.b2=null;this.b1=null;this.invalidated=false;this.immState=0;this.fresh=false;this.continuous=false;this.presentable=false;this.intchange=false;this.present=0;this.sleeping=false;this.cleared=false;this.active=false;this.endGenerated=0;this.sleep_stamp=0;this.up_stamp=0;this.stamp=0;this.di=0;this.id=0;this.hnext=null;this.outer=null};j.__name__=["zpp_nape","dynamics","ZPP_Arbiter"];j.prototype.outer=null;j.prototype.wrapper=function(){if(this.outer==null){j.internal=true;if(this.type==j.COL){this.colarb.outer_zn=new ak();this.outer=this.colarb.outer_zn}else{if(this.type==j.FLUID){this.fluidarb.outer_zn=new ab();this.outer=this.fluidarb.outer_zn}else{this.outer=new aD()}}this.outer.zpp_inner=this;j.internal=false}return this.outer};j.prototype.inactiveme=function(){return !this.active};j.prototype.hnext=null;j.prototype.id=null;j.prototype.di=null;j.prototype.stamp=null;j.prototype.up_stamp=null;j.prototype.sleep_stamp=null;j.prototype.endGenerated=null;j.prototype.active=null;j.prototype.cleared=null;j.prototype.sleeping=null;j.prototype.present=null;j.prototype.intchange=null;j.prototype.presentable=null;j.prototype.continuous=null;j.prototype.fresh=null;j.prototype.immState=null;j.prototype.acting=function(){if(this.active){return(this.immState&1)!=0}else{return false}};j.prototype.invalidated=null;j.prototype.b1=null;j.prototype.b2=null;j.prototype.ws1=null;j.prototype.ws2=null;j.prototype.pair=null;j.prototype.swap_features=function(){var ea=this.b1;this.b1=this.b2;this.b2=ea;var ec=this.ws1;this.ws1=this.ws2;this.ws2=ec;var eb=this.colarb.s1;this.colarb.s1=this.colarb.s2;this.colarb.s2=eb};j.prototype.type=null;j.prototype.colarb=null;j.prototype.fluidarb=null;j.prototype.sensorarb=null;j.prototype.lazyRetire=function(en,ek){this.cleared=true;if(ek==null||this.b2==ek){var ef=this.b1.arbiters;var ee=null;var em=ef.head;while(em!=null){if(em.elt==this){var eb;var eh;if(ee==null){eb=ef.head;eh=eb.next;ef.head=eh;if(ef.head==null){ef.pushmod=true}}else{eb=ee.next;eh=eb.next;ee.next=eh;if(eh==null){ef.pushmod=true}}var ea=eb;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;ef.modified=true;ef.length--;ef.pushmod=true;break}ee=em;em=em.next}}if(ek==null||this.b1==ek){var ei=this.b2.arbiters;var ed=null;var el=ei.head;while(el!=null){if(el.elt==this){var eg;var ej;if(ed==null){eg=ei.head;ej=eg.next;ei.head=ej;if(ei.head==null){ei.pushmod=true}}else{eg=ed.next;ej=eg.next;ed.next=ej;if(ej==null){ei.pushmod=true}}var ec=eg;ec.elt=null;ec.next=dL.zpp_pool;dL.zpp_pool=ec;ei.modified=true;ei.length--;ei.pushmod=true;break}ed=el;el=el.next}}if(this.pair!=null){this.pair.arb=null;this.pair=null}this.active=false;en.f_arbiters.modified=true};j.prototype.sup_assign=function(ei,eh,ea,ef){this.b1=ei.body;this.ws1=ei;this.b2=eh.body;this.ws2=eh;this.id=ea;this.di=ef;var ec=this.b1.arbiters;var ed;if(dL.zpp_pool==null){ed=new dL()}else{ed=dL.zpp_pool;dL.zpp_pool=ed.next;ed.next=null}ed.elt=this;var ej=ed;ej.next=ec.head;ec.head=ej;ec.modified=true;ec.length++;var ee=this.b2.arbiters;var eg;if(dL.zpp_pool==null){eg=new dL()}else{eg=dL.zpp_pool;dL.zpp_pool=eg.next;eg.next=null}eg.elt=this;var eb=eg;eb.next=ee.head;ee.head=eb;ee.modified=true;ee.length++;this.active=true;this.present=0;this.cleared=false;this.sleeping=false;this.fresh=false;this.presentable=false};j.prototype.sup_retire=function(){if(!this.cleared){var ef=this.b1.arbiters;var ee=null;var el=ef.head;while(el!=null){if(el.elt==this){var eb;var eh;if(ee==null){eb=ef.head;eh=eb.next;ef.head=eh;if(ef.head==null){ef.pushmod=true}}else{eb=ee.next;eh=eb.next;ee.next=eh;if(eh==null){ef.pushmod=true}}var ea=eb;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;ef.modified=true;ef.length--;ef.pushmod=true;break}ee=el;el=el.next}var ei=this.b2.arbiters;var ed=null;var ek=ei.head;while(ek!=null){if(ek.elt==this){var eg;var ej;if(ed==null){eg=ei.head;ej=eg.next;ei.head=ej;if(ei.head==null){ei.pushmod=true}}else{eg=ed.next;ej=eg.next;ed.next=ej;if(ej==null){ei.pushmod=true}}var ec=eg;ec.elt=null;ec.next=dL.zpp_pool;dL.zpp_pool=ec;ei.modified=true;ei.length--;ei.pushmod=true;break}ed=ek;ek=ek.next}if(this.pair!=null){this.pair.arb=null;this.pair=null}}this.b1=this.b2=null;this.active=false;this.intchange=false};j.prototype.__class__=j;var A=zpp_nape.dynamics.ZPP_SensorArbiter=function(){this.next=null;j.call(this);this.type=j.SENSOR;this.sensorarb=this};A.__name__=["zpp_nape","dynamics","ZPP_SensorArbiter"];A.__super__=j;A.prototype=Object.create(j.prototype);A.prototype.next=null;A.prototype.alloc=function(){};A.prototype.free=function(){};A.prototype.assign=function(ei,eh,ea,ef){this.b1=ei.body;this.ws1=ei;this.b2=eh.body;this.ws2=eh;this.id=ea;this.di=ef;var ec=this.b1.arbiters;var ed;if(dL.zpp_pool==null){ed=new dL()}else{ed=dL.zpp_pool;dL.zpp_pool=ed.next;ed.next=null}ed.elt=this;var ej=ed;ej.next=ec.head;ec.head=ej;ec.modified=true;ec.length++;var ee=this.b2.arbiters;var eg;if(dL.zpp_pool==null){eg=new dL()}else{eg=dL.zpp_pool;dL.zpp_pool=eg.next;eg.next=null}eg.elt=this;var eb=eg;eb.next=ee.head;ee.head=eb;ee.modified=true;ee.length++;this.active=true;this.present=0;this.cleared=false;this.sleeping=false;this.fresh=false;this.presentable=false};A.prototype.retire=function(){if(!this.cleared){var eg=this.b1.arbiters;var ef=null;var em=eg.head;while(em!=null){if(em.elt==this){var ec;var ei;if(ef==null){ec=eg.head;ei=ec.next;eg.head=ei;if(eg.head==null){eg.pushmod=true}}else{ec=ef.next;ei=ec.next;ef.next=ei;if(ei==null){eg.pushmod=true}}var ea=ec;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;eg.modified=true;eg.length--;eg.pushmod=true;break}ef=em;em=em.next}var ej=this.b2.arbiters;var ee=null;var el=ej.head;while(el!=null){if(el.elt==this){var eh;var ek;if(ee==null){eh=ej.head;ek=eh.next;ej.head=ek;if(ej.head==null){ej.pushmod=true}}else{eh=ee.next;ek=eh.next;ee.next=ek;if(ek==null){ej.pushmod=true}}var ed=eh;ed.elt=null;ed.next=dL.zpp_pool;dL.zpp_pool=ed;ej.modified=true;ej.length--;ej.pushmod=true;break}ee=el;el=el.next}if(this.pair!=null){this.pair.arb=null;this.pair=null}}this.b1=this.b2=null;this.active=false;this.intchange=false;var eb=this;eb.next=A.zpp_pool;A.zpp_pool=eb};A.prototype.makemutable=function(){};A.prototype.makeimmutable=function(){};A.prototype.__class__=A;var dK=zpp_nape.dynamics.ZPP_FluidArbiter=function(){this.pre_dt=0;this.mutable=false;this.wrap_position=null;this.buoyy=0;this.buoyx=0;this.ny=0;this.nx=0;this.lgamma=0;this.dampy=0;this.dampx=0;this.vMassc=0;this.vMassb=0;this.vMassa=0;this.agamma=0;this.adamp=0;this.wMass=0;this.nodrag=false;this.r2y=0;this.r2x=0;this.r1y=0;this.r1x=0;this.overlap=0;this.centroidy=0;this.centroidx=0;this.next=null;this.outer_zn=null;j.call(this);this.type=j.FLUID;this.fluidarb=this;this.buoyx=0;this.buoyy=0;this.pre_dt=-1};dK.__name__=["zpp_nape","dynamics","ZPP_FluidArbiter"];dK.__super__=j;dK.prototype=Object.create(j.prototype);dK.prototype.outer_zn=null;dK.prototype.next=null;dK.prototype.alloc=function(){};dK.prototype.free=function(){};dK.prototype.centroidx=null;dK.prototype.centroidy=null;dK.prototype.overlap=null;dK.prototype.r1x=null;dK.prototype.r1y=null;dK.prototype.r2x=null;dK.prototype.r2y=null;dK.prototype.nodrag=null;dK.prototype.wMass=null;dK.prototype.adamp=null;dK.prototype.agamma=null;dK.prototype.vMassa=null;dK.prototype.vMassb=null;dK.prototype.vMassc=null;dK.prototype.dampx=null;dK.prototype.dampy=null;dK.prototype.lgamma=null;dK.prototype.nx=null;dK.prototype.ny=null;dK.prototype.buoyx=null;dK.prototype.buoyy=null;dK.prototype.position_validate=function(){this.wrap_position.zpp_inner.x=this.centroidx;this.wrap_position.zpp_inner.y=this.centroidy};dK.prototype.position_invalidate=function(ea){this.centroidx=ea.x;this.centroidy=ea.y};dK.prototype.wrap_position=null;dK.prototype.getposition=function(){var ea;if(au.poolVec2==null){ea=new r()}else{ea=au.poolVec2;au.poolVec2=ea.zpp_pool;ea.zpp_pool=null}if(ea.zpp_inner==null){var ee;if(bB.zpp_pool==null){ee=new bB()}else{ee=bB.zpp_pool;bB.zpp_pool=ee.next;ee.next=null}ee.weak=false;ee._immutable=false;ee.x=0;ee.y=0;ea.zpp_inner=ee;ea.zpp_inner.outer=ea}else{var eb;var ef=ea.zpp_inner;if(ef._validate!=null){ef._validate()}if(ea.zpp_inner.x==0){var ed=ea.zpp_inner;if(ed._validate!=null){ed._validate()}eb=ea.zpp_inner.y==0}else{eb=false}if(!eb){ea.zpp_inner.x=0;ea.zpp_inner.y=0;var ec=ea.zpp_inner;if(ec._invalidate!=null){ec._invalidate(ec)}}}ea.zpp_inner.weak=false;this.wrap_position=ea;this.wrap_position.zpp_inner._inuse=true;this.wrap_position.zpp_inner._immutable=!this.mutable;this.wrap_position.zpp_inner._validate=dX(this,this.position_validate);this.wrap_position.zpp_inner._invalidate=dX(this,this.position_invalidate)};dK.prototype.assign=function(ei,eh,ea,ef){this.b1=ei.body;this.ws1=ei;this.b2=eh.body;this.ws2=eh;this.id=ea;this.di=ef;var ec=this.b1.arbiters;var ed;if(dL.zpp_pool==null){ed=new dL()}else{ed=dL.zpp_pool;dL.zpp_pool=ed.next;ed.next=null}ed.elt=this;var ej=ed;ej.next=ec.head;ec.head=ej;ec.modified=true;ec.length++;var ee=this.b2.arbiters;var eg;if(dL.zpp_pool==null){eg=new dL()}else{eg=dL.zpp_pool;dL.zpp_pool=eg.next;eg.next=null}eg.elt=this;var eb=eg;eb.next=ee.head;ee.head=eb;ee.modified=true;ee.length++;this.active=true;this.present=0;this.cleared=false;this.sleeping=false;this.fresh=false;this.presentable=false;this.nx=0;this.ny=1;this.dampx=0;this.dampy=0;this.adamp=0};dK.prototype.retire=function(){if(!this.cleared){var eg=this.b1.arbiters;var ef=null;var em=eg.head;while(em!=null){if(em.elt==this){var ec;var ei;if(ef==null){ec=eg.head;ei=ec.next;eg.head=ei;if(eg.head==null){eg.pushmod=true}}else{ec=ef.next;ei=ec.next;ef.next=ei;if(ei==null){eg.pushmod=true}}var ea=ec;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;eg.modified=true;eg.length--;eg.pushmod=true;break}ef=em;em=em.next}var ej=this.b2.arbiters;var ee=null;var el=ej.head;while(el!=null){if(el.elt==this){var eh;var ek;if(ee==null){eh=ej.head;ek=eh.next;ej.head=ek;if(ej.head==null){ej.pushmod=true}}else{eh=ee.next;ek=eh.next;ee.next=ek;if(ek==null){ej.pushmod=true}}var ed=eh;ed.elt=null;ed.next=dL.zpp_pool;dL.zpp_pool=ed;ej.modified=true;ej.length--;ej.pushmod=true;break}ee=el;el=el.next}if(this.pair!=null){this.pair.arb=null;this.pair=null}}this.b1=this.b2=null;this.active=false;this.intchange=false;var eb=this;eb.next=dK.zpp_pool;dK.zpp_pool=eb;this.pre_dt=-1};dK.prototype.mutable=null;dK.prototype.makemutable=function(){this.mutable=true;if(this.wrap_position!=null){this.wrap_position.zpp_inner._immutable=false}};dK.prototype.makeimmutable=function(){this.mutable=false;if(this.wrap_position!=null){this.wrap_position.zpp_inner._immutable=true}};dK.prototype.inject=function(eb,ea,ec){this.overlap=eb;this.centroidx=ea;this.centroidy=ec};dK.prototype.pre_dt=null;dK.prototype.preStep=function(eV,ek){if(this.pre_dt==-1){this.pre_dt=ek}var e0=ek/this.pre_dt;this.pre_dt=ek;this.r1x=this.centroidx-this.b1.posx;this.r1y=this.centroidy-this.b1.posy;this.r2x=this.centroidx-this.b2.posx;this.r2y=this.centroidy-this.b2.posy;var eY=0;var eW=0;if(this.ws1.fluidEnabled&&this.ws1.fluidProperties.wrap_gravity!=null){eY=this.ws1.fluidProperties.gravityx;eW=this.ws1.fluidProperties.gravityy}else{eY=eV.gravityx;eW=eV.gravityy}var ey=0;var ev=0;if(this.ws2.fluidEnabled&&this.ws2.fluidProperties.wrap_gravity!=null){ey=this.ws2.fluidProperties.gravityx;ev=this.ws2.fluidProperties.gravityy}else{ey=eV.gravityx;ev=eV.gravityy}var eF=0;var eD=0;if(this.ws1.fluidEnabled&&this.ws2.fluidEnabled){var eN=this.overlap*this.ws1.fluidProperties.density;var eK=this.overlap*this.ws2.fluidProperties.density;if(eN>eK){var eU=eN+eK;eF-=eY*eU;eD-=eW*eU}else{if(eNthis.ws2.worldCOMx*ej+this.ws2.worldCOMy*eh){var eJ=eN+eK;eF-=ej*eJ;eD-=eh*eJ}else{var eG=eN+eK;eF+=ej*eG;eD+=eh*eG}}}}else{if(this.ws1.fluidEnabled){var eT=this.overlap*this.ws1.fluidProperties.density;eF-=eY*eT;eD-=eW*eT}else{if(this.ws2.fluidEnabled){var eH=this.overlap*this.ws2.fluidProperties.density;eF+=ey*eH;eD+=ev*eH}}}eF*=ek;eD*=ek;this.buoyx=eF;this.buoyy=eD;if(this.b1.type==2){var eE=this.b1.imass;this.b1.velx-=eF*eE;this.b1.vely-=eD*eE;this.b1.angvel-=(eD*this.r1x-eF*this.r1y)*this.b1.iinertia}if(this.b2.type==2){var eC=this.b2.imass;this.b2.velx+=eF*eC;this.b2.vely+=eD*eC;this.b2.angvel+=(eD*this.r2x-eF*this.r2y)*this.b2.iinertia}if((!this.ws1.fluidEnabled||this.ws1.fluidProperties.viscosity==0)&&(!this.ws2.fluidEnabled||this.ws2.fluidProperties.viscosity==0)){this.nodrag=true;this.dampx=0;this.dampy=0;this.adamp=0}else{this.nodrag=false;var e1=0;if(this.ws1.fluidEnabled){this.ws2.validate_angDrag();e1=this.ws1.fluidProperties.viscosity*this.ws2.angDrag*this.overlap/this.ws2.area}if(this.ws2.fluidEnabled){this.ws1.validate_angDrag();e1+=this.ws2.fluidProperties.viscosity*this.ws1.angDrag*this.overlap/this.ws1.area}if(e1!=0){var el=this.b1.sinertia+this.b2.sinertia;if(el!=0){this.wMass=1/el}else{this.wMass=0}e1*=0.0004;var ea=2*Math.PI*e1;this.agamma=1/(ek*ea*(2+ea*ek));var eO=1/(1+this.agamma);this.agamma*=eO;this.wMass*=eO}else{this.wMass=0;this.agamma=0}var ef=this.b2.velx+this.b2.kinvelx-this.r2y*(this.b2.angvel+this.b2.kinangvel)-(this.b1.velx+this.b1.kinvelx-this.r1y*(this.b2.angvel+this.b2.kinangvel));var ee=this.b2.vely+this.b2.kinvely+this.r2x*(this.b2.angvel+this.b2.kinangvel)-(this.b1.vely+this.b1.kinvely+this.r1x*(this.b1.angvel+this.b1.kinangvel));if(!(ef*ef+ee*ee0){eg*=-P.fluidVacuumDrag;eg=eg}es-=eg*0.5*P.fluidLinearDrag;em=em.next}e3=es/ei}}if(this.ws2.fluidEnabled){var en=-this.ws2.fluidProperties.viscosity*this.overlap/this.ws1.area;if(this.ws1.type==0){e3-=en*this.ws1.circle.radius*P.fluidLinearDrag/(2*this.ws1.circle.radius*Math.PI)}else{var er=this.ws1.polygon;var eq=0;var eA=0;var ep=er.edges.head;while(ep!=null){var eL=ep.elt;eq+=eL.length;var ed=en*eL.length*(eL.gnormx*this.nx+eL.gnormy*this.ny);if(ed>0){ed*=-P.fluidVacuumDrag;ed=ed}eA-=ed*0.5*P.fluidLinearDrag;ep=ep.next}e3+=eA/eq}}if(e3!=0){var eZ=this.b1.smass+this.b2.smass;var ez=0;var ew=0;var eu=0;ez=eZ;ew=0;eu=eZ;if(this.b1.sinertia!=0){var ec=this.r1x*this.b1.sinertia;var eb=this.r1y*this.b1.sinertia;ez=eZ+eb*this.r1y;ew+=-eb*this.r1x;eu=eZ+ec*this.r1x}if(this.b2.sinertia!=0){var eR=this.r2x*this.b2.sinertia;var et=this.r2y*this.b2.sinertia;ez+=et*this.r2y;ew+=-et*this.r2x;eu+=eR*this.r2x}var eo=ez*eu-ew*ew;if(eo!=eo){eu=0;ew=eu;ez=ew}else{if(eo==0){if(ez!=0){ez=1/ez}else{ez=0}if(eu!=0){eu=1/eu}else{eu=0}ew=0}else{eo=1/eo;var eB=eu*eo;eu=ez*eo;ez=eB;ew*=-eo}}this.vMassa=ez;this.vMassb=ew;this.vMassc=eu;var eX=2*Math.PI*e3;this.lgamma=1/(ek*eX*(2+eX*ek));var eP=1/(1+this.lgamma);this.lgamma*=eP;this.vMassa*=eP;this.vMassb*=eP;this.vMassc*=eP}else{this.vMassa=0;this.vMassb=0;this.vMassc=0;this.lgamma=0}}this.dampx*=e0;this.dampy*=e0;this.adamp*=e0};dK.prototype.warmStart=function(){var ea=this.b1.imass;this.b1.velx-=this.dampx*ea;this.b1.vely-=this.dampy*ea;var eb=this.b2.imass;this.b2.velx+=this.dampx*eb;this.b2.vely+=this.dampy*eb;this.b1.angvel-=this.b1.iinertia*(this.dampy*this.r1x-this.dampx*this.r1y);this.b2.angvel+=this.b2.iinertia*(this.dampy*this.r2x-this.dampx*this.r2y);this.b1.angvel-=this.adamp*this.b1.iinertia;this.b2.angvel+=this.adamp*this.b2.iinertia};dK.prototype.applyImpulseVel=function(){if(!this.nodrag){var ee=this.b1.angvel+this.b1.kinangvel;var eb=this.b2.angvel+this.b2.kinangvel;var eh=this.b1.velx+this.b1.kinvelx-this.r1y*ee-(this.b2.velx+this.b2.kinvelx-this.r2y*eb);var eg=this.b1.vely+this.b1.kinvely+this.r1x*ee-(this.b2.vely+this.b2.kinvely+this.r2x*eb);var ei=this.vMassa*eh+this.vMassb*eg;eg=this.vMassb*eh+this.vMassc*eg;eh=ei;var ef=this.lgamma;eh-=this.dampx*ef;eg-=this.dampy*ef;this.dampx+=eh;this.dampy+=eg;var ed=this.b1.imass;this.b1.velx-=eh*ed;this.b1.vely-=eg*ed;var ea=this.b2.imass;this.b2.velx+=eh*ea;this.b2.vely+=eg*ea;this.b1.angvel-=this.b1.iinertia*(eg*this.r1x-eh*this.r1y);this.b2.angvel+=this.b2.iinertia*(eg*this.r2x-eh*this.r2y);var ec=(ee-eb)*this.wMass-this.adamp*this.agamma;this.adamp+=ec;this.b1.angvel-=ec*this.b1.iinertia;this.b2.angvel+=ec*this.b2.iinertia}};dK.prototype.__class__=dK;var d9=zpp_nape.dynamics.ZPP_ColArbiter=function(){this.pre_dt=0;this.mutable=false;this.stat=false;this.next=null;this.hpc2=false;this.hc2=false;this.oc2=null;this.c2=null;this.oc1=null;this.c1=null;this.__ref_vertex=0;this.__ref_edge2=null;this.__ref_edge1=null;this.biasCoef=0;this.rev=false;this.radius=0;this.lproj=0;this.lnormy=0;this.lnormx=0;this.surfacey=0;this.surfacex=0;this.k2y=0;this.k2x=0;this.k1y=0;this.k1x=0;this.rt2b=0;this.rn2b=0;this.rt2a=0;this.rn2a=0;this.rt1b=0;this.rn1b=0;this.rt1a=0;this.rn1a=0;this.jrAcc=0;this.rMass=0;this.Kc=0;this.Kb=0;this.Ka=0;this.kMassc=0;this.kMassb=0;this.kMassa=0;this.wrap_normal=null;this.ny=0;this.nx=0;this.innards=null;this.wrap_contacts=null;this.contacts=null;this.s2=null;this.s1=null;this.userdef_rfric=false;this.userdef_restitution=false;this.userdef_stat_fric=false;this.userdef_dyn_fric=false;this.rfric=0;this.restitution=0;this.stat_fric=0;this.dyn_fric=0;this.outer_zn=null;j.call(this);this.pre_dt=-1;this.contacts=new c2();this.innards=new I();this.type=j.COL;this.colarb=this};d9.__name__=["zpp_nape","dynamics","ZPP_ColArbiter"];d9.__super__=j;d9.prototype=Object.create(j.prototype);d9.prototype.outer_zn=null;d9.prototype.dyn_fric=null;d9.prototype.stat_fric=null;d9.prototype.restitution=null;d9.prototype.rfric=null;d9.prototype.userdef_dyn_fric=null;d9.prototype.userdef_stat_fric=null;d9.prototype.userdef_restitution=null;d9.prototype.userdef_rfric=null;d9.prototype.s1=null;d9.prototype.s2=null;d9.prototype.contacts=null;d9.prototype.wrap_contacts=null;d9.prototype.innards=null;d9.prototype.nx=null;d9.prototype.ny=null;d9.prototype.normal_validate=function(){if(this.cleared){throw new cE("Error: Arbiter not currently in use")}this.wrap_normal.zpp_inner.x=this.nx;this.wrap_normal.zpp_inner.y=this.ny;if(this.ws1.id>this.ws2.id){this.wrap_normal.zpp_inner.x=-this.wrap_normal.zpp_inner.x;this.wrap_normal.zpp_inner.y=-this.wrap_normal.zpp_inner.y}};d9.prototype.wrap_normal=null;d9.prototype.getnormal=function(){var ea;if(au.poolVec2==null){ea=new r()}else{ea=au.poolVec2;au.poolVec2=ea.zpp_pool;ea.zpp_pool=null}if(ea.zpp_inner==null){var ee;if(bB.zpp_pool==null){ee=new bB()}else{ee=bB.zpp_pool;bB.zpp_pool=ee.next;ee.next=null}ee.weak=false;ee._immutable=false;ee.x=0;ee.y=0;ea.zpp_inner=ee;ea.zpp_inner.outer=ea}else{var eb;var ef=ea.zpp_inner;if(ef._validate!=null){ef._validate()}if(ea.zpp_inner.x==0){var ed=ea.zpp_inner;if(ed._validate!=null){ed._validate()}eb=ea.zpp_inner.y==0}else{eb=false}if(!eb){ea.zpp_inner.x=0;ea.zpp_inner.y=0;var ec=ea.zpp_inner;if(ec._invalidate!=null){ec._invalidate(ec)}}}ea.zpp_inner.weak=false;this.wrap_normal=ea;this.wrap_normal.zpp_inner._immutable=true;this.wrap_normal.zpp_inner._inuse=true;this.wrap_normal.zpp_inner._validate=dX(this,this.normal_validate)};d9.prototype.kMassa=null;d9.prototype.kMassb=null;d9.prototype.kMassc=null;d9.prototype.Ka=null;d9.prototype.Kb=null;d9.prototype.Kc=null;d9.prototype.rMass=null;d9.prototype.jrAcc=null;d9.prototype.rn1a=null;d9.prototype.rt1a=null;d9.prototype.rn1b=null;d9.prototype.rt1b=null;d9.prototype.rn2a=null;d9.prototype.rt2a=null;d9.prototype.rn2b=null;d9.prototype.rt2b=null;d9.prototype.k1x=null;d9.prototype.k1y=null;d9.prototype.k2x=null;d9.prototype.k2y=null;d9.prototype.surfacex=null;d9.prototype.surfacey=null;d9.prototype.ptype=null;d9.prototype.lnormx=null;d9.prototype.lnormy=null;d9.prototype.lproj=null;d9.prototype.radius=null;d9.prototype.rev=null;d9.prototype.biasCoef=null;d9.prototype.__ref_edge1=null;d9.prototype.__ref_edge2=null;d9.prototype.__ref_vertex=null;d9.prototype.c1=null;d9.prototype.oc1=null;d9.prototype.c2=null;d9.prototype.oc2=null;d9.prototype.hc2=null;d9.prototype.hpc2=null;d9.prototype.next=null;d9.prototype.alloc=function(){};d9.prototype.free=function(){this.userdef_dyn_fric=false;this.userdef_stat_fric=false;this.userdef_restitution=false;this.userdef_rfric=false;this.__ref_edge1=this.__ref_edge2=null};d9.prototype.stat=null;d9.prototype.injectContact=function(ej,ei,ee,ed,eh,ec,ea){if(ea==null){ea=false}var eg=null;var eb=this.contacts.next;while(eb!=null){var ek=eb;if(ec==ek.hash){eg=ek;break}eb=eb.next}if(eg==null){if(c2.zpp_pool==null){eg=new c2()}else{eg=c2.zpp_pool;c2.zpp_pool=eg.next;eg.next=null}var em=eg.inner;em.jnAcc=em.jtAcc=0;eg.hash=ec;eg.fresh=true;eg.arbiter=this;this.jrAcc=0;var ef=this.contacts;eg._inuse=true;var el=eg;el.next=ef.next;ef.next=el;ef.modified=true;ef.length++;this.innards.add(em)}else{eg.fresh=false}eg.px=ej;eg.py=ei;this.nx=ee;this.ny=ed;eg.dist=eh;eg.stamp=this.stamp;eg.posOnly=ea;return eg};d9.prototype.assign=function(ei,eh,ea,ef){this.b1=ei.body;this.ws1=ei;this.b2=eh.body;this.ws2=eh;this.id=ea;this.di=ef;var ec=this.b1.arbiters;var ed;if(dL.zpp_pool==null){ed=new dL()}else{ed=dL.zpp_pool;dL.zpp_pool=ed.next;ed.next=null}ed.elt=this;var ej=ed;ej.next=ec.head;ec.head=ej;ec.modified=true;ec.length++;var ee=this.b2.arbiters;var eg;if(dL.zpp_pool==null){eg=new dL()}else{eg=dL.zpp_pool;dL.zpp_pool=eg.next;eg.next=null}eg.elt=this;var eb=eg;eb.next=ee.head;ee.head=eb;ee.modified=true;ee.length++;this.active=true;this.present=0;this.cleared=false;this.sleeping=false;this.fresh=false;this.presentable=false;this.s1=ei;this.s2=eh;if(!this.userdef_restitution){if(this.s1.material.elasticity<=-Infinity||this.s2.material.elasticity<=-Infinity){this.restitution=0}else{if(this.s1.material.elasticity>=Infinity||this.s2.material.elasticity>=Infinity){this.restitution=1}else{this.restitution=(this.s1.material.elasticity+this.s2.material.elasticity)/2}}if(this.restitution<0){this.restitution=0}if(this.restitution>1){this.restitution=1}}if(!this.userdef_dyn_fric){this.dyn_fric=Math.sqrt(this.s1.material.dynamicFriction*this.s2.material.dynamicFriction)}if(!this.userdef_stat_fric){this.stat_fric=Math.sqrt(this.s1.material.staticFriction*this.s2.material.staticFriction)}if(!this.userdef_rfric){this.rfric=Math.sqrt(this.s1.material.rollingFriction*this.s2.material.rollingFriction)}};d9.prototype.calcProperties=function(){if(!this.userdef_restitution){if(this.s1.material.elasticity<=-Infinity||this.s2.material.elasticity<=-Infinity){this.restitution=0}else{if(this.s1.material.elasticity>=Infinity||this.s2.material.elasticity>=Infinity){this.restitution=1}else{this.restitution=(this.s1.material.elasticity+this.s2.material.elasticity)/2}}if(this.restitution<0){this.restitution=0}if(this.restitution>1){this.restitution=1}}if(!this.userdef_dyn_fric){this.dyn_fric=Math.sqrt(this.s1.material.dynamicFriction*this.s2.material.dynamicFriction)}if(!this.userdef_stat_fric){this.stat_fric=Math.sqrt(this.s1.material.staticFriction*this.s2.material.staticFriction)}if(!this.userdef_rfric){this.rfric=Math.sqrt(this.s1.material.rollingFriction*this.s2.material.rollingFriction)}};d9.prototype.validate_props=function(){if(this.invalidated){this.invalidated=false;if(!this.userdef_restitution){if(this.s1.material.elasticity<=-Infinity||this.s2.material.elasticity<=-Infinity){this.restitution=0}else{if(this.s1.material.elasticity>=Infinity||this.s2.material.elasticity>=Infinity){this.restitution=1}else{this.restitution=(this.s1.material.elasticity+this.s2.material.elasticity)/2}}if(this.restitution<0){this.restitution=0}if(this.restitution>1){this.restitution=1}}if(!this.userdef_dyn_fric){this.dyn_fric=Math.sqrt(this.s1.material.dynamicFriction*this.s2.material.dynamicFriction)}if(!this.userdef_stat_fric){this.stat_fric=Math.sqrt(this.s1.material.staticFriction*this.s2.material.staticFriction)}if(!this.userdef_rfric){this.rfric=Math.sqrt(this.s1.material.rollingFriction*this.s2.material.rollingFriction)}}};d9.prototype.retire=function(){if(!this.cleared){var eh=this.b1.arbiters;var ef=null;var eq=eh.head;while(eq!=null){if(eq.elt==this){var ec;var ek;if(ef==null){ec=eh.head;ek=ec.next;eh.head=ek;if(eh.head==null){eh.pushmod=true}}else{ec=ef.next;ek=ec.next;ef.next=ek;if(ek==null){eh.pushmod=true}}var ea=ec;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;eh.modified=true;eh.length--;eh.pushmod=true;break}ef=eq;eq=eq.next}var em=this.b2.arbiters;var ee=null;var ep=em.head;while(ep!=null){if(ep.elt==this){var ej;var eo;if(ee==null){ej=em.head;eo=ej.next;em.head=eo;if(em.head==null){em.pushmod=true}}else{ej=ee.next;eo=ej.next;ee.next=eo;if(eo==null){em.pushmod=true}}var ed=ej;ed.elt=null;ed.next=dL.zpp_pool;dL.zpp_pool=ed;em.modified=true;em.length--;em.pushmod=true;break}ee=ep;ep=ep.next}if(this.pair!=null){this.pair.arb=null;this.pair=null}}this.b1=this.b2=null;this.active=false;this.intchange=false;while(this.contacts.next!=null){var ei=this.contacts;var en=ei.next;ei.pop();en.arbiter=null;en.next=c2.zpp_pool;c2.zpp_pool=en;var eg=this.innards;var el=eg.next;eg.next=el.next;el._inuse=false;if(eg.next==null){eg.pushmod=true}eg.modified=true;eg.length--}var eb=this;eb.userdef_dyn_fric=false;eb.userdef_stat_fric=false;eb.userdef_restitution=false;eb.userdef_rfric=false;eb.__ref_edge1=eb.__ref_edge2=null;eb.next=d9.zpp_pool;d9.zpp_pool=eb;this.pre_dt=-1};d9.prototype.mutable=null;d9.prototype.makemutable=function(){this.mutable=true;if(this.wrap_normal!=null){this.wrap_normal.zpp_inner._immutable=false}if(this.wrap_contacts!=null){this.wrap_contacts.zpp_inner.immutable=false}};d9.prototype.makeimmutable=function(){this.mutable=false;if(this.wrap_normal!=null){this.wrap_normal.zpp_inner._immutable=true}if(this.wrap_contacts!=null){this.wrap_contacts.zpp_inner.immutable=true}};d9.prototype.contacts_adder=function(ea){return false};d9.prototype.contacts_subber=function(ea){var ee=null;var ed=null;var ec=this.innards.next;var eb=this.contacts.next;while(eb!=null){var ef=eb;if(ef==ea.zpp_inner){this.contacts.erase(ee);this.innards.erase(ed);ef.arbiter=null;ef.next=c2.zpp_pool;c2.zpp_pool=ef;break}ee=eb;ed=ec;ec=ec.next;eb=eb.next}};d9.prototype.setupcontacts=function(){this.wrap_contacts=aB.get(this.contacts,true);this.wrap_contacts.zpp_inner.immutable=!this.mutable;this.wrap_contacts.zpp_inner.adder=dX(this,this.contacts_adder);this.wrap_contacts.zpp_inner.dontremove=true;this.wrap_contacts.zpp_inner.subber=dX(this,this.contacts_subber)};d9.prototype.cleanupContacts=function(){var ea=true;var ee=null;var eo=null;var eg=this.innards.next;this.hc2=false;var ec=this.contacts.next;while(ec!=null){var em=ec;if(em.stamp+P.arbiterExpirationDelay=Infinity||this.s2.material.elasticity>=Infinity){this.restitution=1}else{this.restitution=(this.s1.material.elasticity+this.s2.material.elasticity)/2}}if(this.restitution<0){this.restitution=0}if(this.restitution>1){this.restitution=1}}if(!this.userdef_dyn_fric){this.dyn_fric=Math.sqrt(this.s1.material.dynamicFriction*this.s2.material.dynamicFriction)}if(!this.userdef_stat_fric){this.stat_fric=Math.sqrt(this.s1.material.staticFriction*this.s2.material.staticFriction)}if(!this.userdef_rfric){this.rfric=Math.sqrt(this.s1.material.rollingFriction*this.s2.material.rollingFriction)}}if(this.pre_dt==-1){this.pre_dt=eq}var et=eq/this.pre_dt;this.pre_dt=eq;var em=this.b1.smass+this.b2.smass;this.hc2=false;var eb=true;this.biasCoef=this.b1.type!=2||this.b2.type!=2?this.continuous?P.contactContinuousStaticBiasCoef:P.contactStaticBiasCoef:this.continuous?P.contactContinuousBiasCoef:P.contactBiasCoef;this.continuous=false;var er=null;var eB=null;var ej=this.innards.next;var eu=this.contacts.next;while(eu!=null){var eC=eu;if(eC.stamp+P.arbiterExpirationDelay-P.elasticThreshold){ek.bounce=0}ed=el*this.nx-eo*this.ny;var ec=P.staticFrictionThreshold;if(ed*ed>ec*ec){ek.friction=this.dyn_fric}else{ek.friction=this.stat_fric}ek.jnAcc*=et;ek.jtAcc*=et}if(ep!=eC.active){this.contacts.modified=true}er=eu;eB=ej;ej=ej.next;eu=eu.next}if(this.hc2){this.hpc2=true;if(this.oc1.posOnly){var eA=this.c1;this.c1=this.c2;this.c2=eA;var es=this.oc1;this.oc1=this.oc2;this.oc2=es;this.hc2=false}else{if(this.oc2.posOnly){this.hc2=false}}if(this.oc1.posOnly){eb=true}}else{this.hpc2=false}this.jrAcc*=et;if(!eb){this.rn1a=this.ny*this.c1.r1x-this.nx*this.c1.r1y;this.rt1a=this.c1.r1x*this.nx+this.c1.r1y*this.ny;this.rn1b=this.ny*this.c1.r2x-this.nx*this.c1.r2y;this.rt1b=this.c1.r2x*this.nx+this.c1.r2y*this.ny;this.k1x=this.b2.kinvelx-this.c1.r2y*this.b2.kinangvel-(this.b1.kinvelx-this.c1.r1y*this.b1.kinangvel);this.k1y=this.b2.kinvely+this.c1.r2x*this.b2.kinangvel-(this.b1.kinvely+this.c1.r1x*this.b1.kinangvel)}if(this.hc2){this.rn2a=this.ny*this.c2.r1x-this.nx*this.c2.r1y;this.rt2a=this.c2.r1x*this.nx+this.c2.r1y*this.ny;this.rn2b=this.ny*this.c2.r2x-this.nx*this.c2.r2y;this.rt2b=this.c2.r2x*this.nx+this.c2.r2y*this.ny;this.k2x=this.b2.kinvelx-this.c2.r2y*this.b2.kinangvel-(this.b1.kinvelx-this.c2.r1y*this.b1.kinangvel);this.k2y=this.b2.kinvely+this.c2.r2x*this.b2.kinangvel-(this.b1.kinvely+this.c2.r1x*this.b1.kinangvel);this.kMassa=em+this.b1.sinertia*this.rn1a*this.rn1a+this.b2.sinertia*this.rn1b*this.rn1b;this.kMassb=em+this.b1.sinertia*this.rn1a*this.rn2a+this.b2.sinertia*this.rn1b*this.rn2b;this.kMassc=em+this.b1.sinertia*this.rn2a*this.rn2a+this.b2.sinertia*this.rn2b*this.rn2b;if(this.kMassa*this.kMassa+2*this.kMassb*this.kMassb+this.kMassc*this.kMassced){ee=ed}else{if(ee<-ed){ee=-ed}}eg=ee-ek;this.c1.jtAcc=ee;em=-this.ny*eg;el=this.nx*eg;this.b2.velx+=em*this.b2.imass;this.b2.vely+=el*this.b2.imass;this.b1.velx-=em*this.b1.imass;this.b1.vely-=el*this.b1.imass;this.b2.angvel+=this.rt1b*eg*this.b2.iinertia;this.b1.angvel-=this.rt1a*eg*this.b1.iinertia;if(this.hc2){var ec=this.k2x+this.b2.velx-this.c2.r2y*this.b2.angvel-(this.b1.velx-this.c2.r1y*this.b1.angvel);var ep=this.k2y+this.b2.vely+this.c2.r2x*this.b2.angvel-(this.b1.vely+this.c2.r1x*this.b1.angvel);eg=(ep*this.nx-ec*this.ny+this.surfacex)*this.c2.tMass;ed=this.c2.friction*this.c2.jnAcc;ek=this.c2.jtAcc;ee=ek-eg;if(ee>ed){ee=ed}else{if(ee<-ed){ee=-ed}}eg=ee-ek;this.c2.jtAcc=ee;em=-this.ny*eg;el=this.nx*eg;this.b2.velx+=em*this.b2.imass;this.b2.vely+=el*this.b2.imass;this.b1.velx-=em*this.b1.imass;this.b1.vely-=el*this.b1.imass;this.b2.angvel+=this.rt2b*eg*this.b2.iinertia;this.b1.angvel-=this.rt2a*eg*this.b1.iinertia;eh=this.k1x+this.b2.velx-this.c1.r2y*this.b2.angvel-(this.b1.velx-this.c1.r1y*this.b1.angvel);ef=this.k1y+this.b2.vely+this.c1.r2x*this.b2.angvel-(this.b1.vely+this.c1.r1x*this.b1.angvel);ec=this.k2x+this.b2.velx-this.c2.r2y*this.b2.angvel-(this.b1.velx-this.c2.r1y*this.b1.angvel);ep=this.k2y+this.b2.vely+this.c2.r2x*this.b2.angvel-(this.b1.vely+this.c2.r1x*this.b1.angvel);var eb=this.c1.jnAcc;var eo=this.c2.jnAcc;var ej=eh*this.nx+ef*this.ny+this.surfacey+this.c1.bounce-(this.Ka*eb+this.Kb*eo);var ei=ec*this.nx+ep*this.ny+this.surfacey+this.c2.bounce-(this.Kb*eb+this.Kc*eo);var ea=-(this.kMassa*ej+this.kMassb*ei);var en=-(this.kMassb*ej+this.kMassc*ei);if(ea>=0&&en>=0){ej=ea-eb;ei=en-eo;this.c1.jnAcc=ea;this.c2.jnAcc=en}else{ea=-this.c1.nMass*ej;if(ea>=0&&this.Kb*ea+ei>=0){ej=ea-eb;ei=-eo;this.c1.jnAcc=ea;this.c2.jnAcc=0}else{en=-this.c2.nMass*ei;if(en>=0&&this.Kb*en+ej>=0){ej=-eb;ei=en-eo;this.c1.jnAcc=0;this.c2.jnAcc=en}else{if(ej>=0&&ei>=0){ej=-eb;ei=-eo;this.c1.jnAcc=this.c2.jnAcc=0}else{ej=0;ei=0}}}}eg=ej+ei;em=this.nx*eg;el=this.ny*eg;this.b2.velx+=em*this.b2.imass;this.b2.vely+=el*this.b2.imass;this.b1.velx-=em*this.b1.imass;this.b1.vely-=el*this.b1.imass;this.b2.angvel+=(this.rn1b*ej+this.rn2b*ei)*this.b2.iinertia;this.b1.angvel-=(this.rn1a*ej+this.rn2a*ei)*this.b1.iinertia}else{if(this.radius!=0){eg=(this.b2.angvel-this.b1.angvel)*this.rMass;ed=this.rfric*this.c1.jnAcc;ek=this.jrAcc;this.jrAcc-=eg;if(this.jrAcc>ed){this.jrAcc=ed}else{if(this.jrAcc<-ed){this.jrAcc=-ed}}eg=this.jrAcc-ek;this.b2.angvel+=eg*this.b2.iinertia;this.b1.angvel-=eg*this.b1.iinertia}eh=this.k1x+this.b2.velx-this.c1.r2y*this.b2.angvel-(this.b1.velx-this.c1.r1y*this.b1.angvel);ef=this.k1y+this.b2.vely+this.c1.r2x*this.b2.angvel-(this.b1.vely+this.c1.r1x*this.b1.angvel);eg=(this.c1.bounce+(this.nx*eh+this.ny*ef)+this.surfacey)*this.c1.nMass;ek=this.c1.jnAcc;ee=ek-eg;if(ee<0){ee=0}eg=ee-ek;this.c1.jnAcc=ee;em=this.nx*eg;el=this.ny*eg;this.b2.velx+=em*this.b2.imass;this.b2.vely+=el*this.b2.imass;this.b1.velx-=em*this.b1.imass;this.b1.vely-=el*this.b1.imass;this.b2.angvel+=this.rn1b*eg*this.b2.iinertia;this.b1.angvel-=this.rn1a*eg*this.b1.iinertia}};d9.prototype.applyImpulsePos=function(){if(this.ptype==2){var fo=this.c1;var fK=0;var fJ=0;fK=this.b2.axisy*fo.lr2x-this.b2.axisx*fo.lr2y;fJ=fo.lr2x*this.b2.axisx+fo.lr2y*this.b2.axisy;fK+=this.b2.posx;fJ+=this.b2.posy;var fZ=0;var fY=0;fZ=this.b1.axisy*fo.lr1x-this.b1.axisx*fo.lr1y;fY=fo.lr1x*this.b1.axisx+fo.lr1y*this.b1.axisy;fZ+=this.b1.posx;fY+=this.b1.posy;var ew=0;var ev=0;ew=fK-fZ;ev=fJ-fY;var eF=Math.sqrt(ew*ew+ev*ev);var e1=this.radius-P.collisionSlop;var fM=eF-e1;if(ew*this.nx+ev*this.ny<0){ew=-ew;ev=-ev;fM-=this.radius}if(fM<0){if(eF0.0001){eH.axisx=Math.sin(eH.rot);eH.axisy=Math.cos(eH.rot)}else{var fs=eA*eA;var e4=1-0.5*fs;var e8=1-fs*fs/8;var fu=(e4*eH.axisx+eA*eH.axisy)*e8;eH.axisy=(e4*eH.axisy-eA*eH.axisx)*e8;eH.axisx=fu}var gc=this.b2.imass;this.b2.posx+=eX*gc;this.b2.posy+=eW*gc;var fc=this.b2;var eu=eM*this.b2.iinertia*eG;fc.rot+=eu;if(eu*eu>0.0001){fc.axisx=Math.sin(fc.rot);fc.axisy=Math.cos(fc.rot)}else{var fr=eu*eu;var fF=1-0.5*fr;var ei=1-fr*fr/8;var fX=(fF*fc.axisx+eu*fc.axisy)*ei;fc.axisy=(fF*fc.axisy-eu*fc.axisx)*ei;fc.axisx=fX}}}}}else{var eV=0;var eU=0;var eY;var fN=0;var fL=0;var fG=0;var fE=0;if(this.ptype==0){eV=this.b1.axisy*this.lnormx-this.b1.axisx*this.lnormy;eU=this.lnormx*this.b1.axisx+this.lnormy*this.b1.axisy;eY=this.lproj+(eV*this.b1.posx+eU*this.b1.posy);fN=this.b2.axisy*this.c1.lr1x-this.b2.axisx*this.c1.lr1y;fL=this.c1.lr1x*this.b2.axisx+this.c1.lr1y*this.b2.axisy;fN+=this.b2.posx;fL+=this.b2.posy;if(this.hpc2){fG=this.b2.axisy*this.c2.lr1x-this.b2.axisx*this.c2.lr1y;fE=this.c2.lr1x*this.b2.axisx+this.c2.lr1y*this.b2.axisy;fG+=this.b2.posx;fE+=this.b2.posy}}else{eV=this.b2.axisy*this.lnormx-this.b2.axisx*this.lnormy;eU=this.lnormx*this.b2.axisx+this.lnormy*this.b2.axisy;eY=this.lproj+(eV*this.b2.posx+eU*this.b2.posy);fN=this.b1.axisy*this.c1.lr1x-this.b1.axisx*this.c1.lr1y;fL=this.c1.lr1x*this.b1.axisx+this.c1.lr1y*this.b1.axisy;fN+=this.b1.posx;fL+=this.b1.posy;if(this.hpc2){fG=this.b1.axisy*this.c2.lr1x-this.b1.axisx*this.c2.lr1y;fE=this.c2.lr1x*this.b1.axisx+this.c2.lr1y*this.b1.axisy;fG+=this.b1.posx;fE+=this.b1.posy}}var eL=fN*eV+fL*eU-eY-this.radius;eL+=P.collisionSlop;var eJ=0;if(this.hpc2){eJ=fG*eV+fE*eU-eY-this.radius;eJ+=P.collisionSlop}if(eL<0||eJ<0){if(this.rev){eV=-eV;eU=-eU}var fi=0;var ff=0;fi=fN-this.b1.posx;ff=fL-this.b1.posy;var eK=0;var eI=0;eK=fN-this.b2.posx;eI=fL-this.b2.posy;var fq=0;var fn=0;var eT=0;var eR=0;if(this.hpc2){fq=fG-this.b1.posx;fn=fE-this.b1.posy;eT=fG-this.b2.posx;eR=fE-this.b2.posy;var en=eU*fi-eV*ff;var el=eU*eK-eV*eI;var ga=eU*fq-eV*fn;var f8=eU*eT-eV*eR;var et=this.b1.smass+this.b2.smass;this.kMassa=et+this.b1.sinertia*en*en+this.b2.sinertia*el*el;this.kMassb=et+this.b1.sinertia*en*ga+this.b2.sinertia*el*f8;this.kMassc=et+this.b1.sinertia*ga*ga+this.b2.sinertia*f8*f8;var eS=0;var eP=0;var eN=0;eS=this.kMassa;eP=this.kMassb;eN=this.kMassc;var fk=eL*this.biasCoef;var fh=eJ*this.biasCoef;while(true){var f7=0;var f5=0;f7=fk;f5=fh;f7=-fk;f5=-fh;var f0=this.kMassa*this.kMassc-this.kMassb*this.kMassb;if(f0!=f0){f5=0;f7=f5}else{if(f0==0){if(this.kMassa!=0){f7/=this.kMassa}else{f7=0}if(this.kMassc!=0){f5/=this.kMassc}else{f5=0}}else{f0=1/f0;var gb=f0*(this.kMassc*f7-this.kMassb*f5);f5=f0*(this.kMassa*f5-this.kMassb*f7);f7=gb}}if(f7>=0&&f5>=0){var f9=(f7+f5)*this.b1.imass;this.b1.posx-=eV*f9;this.b1.posy-=eU*f9;var fa=this.b1;var es=-this.b1.iinertia*(en*f7+ga*f5);fa.rot+=es;if(es*es>0.0001){fa.axisx=Math.sin(fa.rot);fa.axisy=Math.cos(fa.rot)}else{var fp=es*es;var fD=1-0.5*fp;var eh=1-fp*fp/8;var fW=(fD*fa.axisx+es*fa.axisy)*eh;fa.axisy=(fD*fa.axisy-es*fa.axisx)*eh;fa.axisx=fW}var f6=(f7+f5)*this.b2.imass;this.b2.posx+=eV*f6;this.b2.posy+=eU*f6;var e9=this.b2;var er=this.b2.iinertia*(el*f7+f8*f5);e9.rot+=er;if(er*er>0.0001){e9.axisx=Math.sin(e9.rot);e9.axisy=Math.cos(e9.rot)}else{var fm=er*er;var fB=1-0.5*fm;var eg=1-fm*fm/8;var fV=(fB*e9.axisx+er*e9.axisy)*eg;e9.axisy=(fB*e9.axisy-er*e9.axisx)*eg;e9.axisx=fV}break}f7=-fk/eS;f5=0;var eB=eP*f7+fh;if(f7>=0&&eB>=0){var f4=(f7+f5)*this.b1.imass;this.b1.posx-=eV*f4;this.b1.posy-=eU*f4;var e7=this.b1;var eq=-this.b1.iinertia*(en*f7+ga*f5);e7.rot+=eq;if(eq*eq>0.0001){e7.axisx=Math.sin(e7.rot);e7.axisy=Math.cos(e7.rot)}else{var fl=eq*eq;var fA=1-0.5*fl;var ef=1-fl*fl/8;var fU=(fA*e7.axisx+eq*e7.axisy)*ef;e7.axisy=(fA*e7.axisy-eq*e7.axisx)*ef;e7.axisx=fU}var f3=(f7+f5)*this.b2.imass;this.b2.posx+=eV*f3;this.b2.posy+=eU*f3;var e6=this.b2;var ep=this.b2.iinertia*(el*f7+f8*f5);e6.rot+=ep;if(ep*ep>0.0001){e6.axisx=Math.sin(e6.rot);e6.axisy=Math.cos(e6.rot)}else{var fj=ep*ep;var fz=1-0.5*fj;var ee=1-fj*fj/8;var fT=(fz*e6.axisx+ep*e6.axisy)*ee;e6.axisy=(fz*e6.axisy-ep*e6.axisx)*ee;e6.axisx=fT}break}f7=0;f5=-fh/eN;var eC=eP*f5+fk;if(f5>=0&&eC>=0){var f2=(f7+f5)*this.b1.imass;this.b1.posx-=eV*f2;this.b1.posy-=eU*f2;var e5=this.b1;var eo=-this.b1.iinertia*(en*f7+ga*f5);e5.rot+=eo;if(eo*eo>0.0001){e5.axisx=Math.sin(e5.rot);e5.axisy=Math.cos(e5.rot)}else{var fg=eo*eo;var fy=1-0.5*fg;var ed=1-fg*fg/8;var fS=(fy*e5.axisx+eo*e5.axisy)*ed;e5.axisy=(fy*e5.axisy-eo*e5.axisx)*ed;e5.axisx=fS}var f1=(f7+f5)*this.b2.imass;this.b2.posx+=eV*f1;this.b2.posy+=eU*f1;var e3=this.b2;var em=this.b2.iinertia*(el*f7+f8*f5);e3.rot+=em;if(em*em>0.0001){e3.axisx=Math.sin(e3.rot);e3.axisy=Math.cos(e3.rot)}else{var fe=em*em;var fx=1-0.5*fe;var ec=1-fe*fe/8;var fR=(fx*e3.axisx+em*e3.axisy)*ec;e3.axisy=(fx*e3.axisy-em*e3.axisx)*ec;e3.axisx=fR}break}break}}else{var eQ=eU*fi-eV*ff;var ez=eU*eK-eV*eI;var fH=this.b2.smass+ez*ez*this.b2.sinertia+this.b1.smass+eQ*eQ*this.b1.sinertia;if(fH!=0){var fC=-this.biasCoef*eL/fH;var ge=0;var fQ=0;ge=eV*fC;fQ=eU*fC;var ey=this.b1.imass;this.b1.posx-=ge*ey;this.b1.posy-=fQ*ey;var e2=this.b1;var ek=-eQ*this.b1.iinertia*fC;e2.rot+=ek;if(ek*ek>0.0001){e2.axisx=Math.sin(e2.rot);e2.axisy=Math.cos(e2.rot)}else{var fd=ek*ek;var fw=1-0.5*fd;var eb=1-fd*fd/8;var fP=(fw*e2.axisx+ek*e2.axisy)*eb;e2.axisy=(fw*e2.axisy-ek*e2.axisx)*eb;e2.axisx=fP}var ex=this.b2.imass;this.b2.posx+=ge*ex;this.b2.posy+=fQ*ex;var e0=this.b2;var ej=ez*this.b2.iinertia*fC;e0.rot+=ej;if(ej*ej>0.0001){e0.axisx=Math.sin(e0.rot);e0.axisy=Math.cos(e0.rot)}else{var fb=ej*ej;var fv=1-0.5*fb;var ea=1-fb*fb/8;var fO=(fv*e0.axisx+ej*e0.axisy)*ea;e0.axisy=(fv*e0.axisy-ej*e0.axisx)*ea;e0.axisx=fO}}}}}};d9.prototype.__class__=d9;var c2=zpp_nape.dynamics.ZPP_Contact=function(){this.length=0;this.pushmod=false;this.modified=false;this._inuse=false;this.next=null;this.elasticity=0;this.dist=0;this.fresh=false;this.hash=0;this.stamp=0;this.posOnly=false;this.active=false;this.inner=null;this.arbiter=null;this.wrap_position=null;this.py=0;this.px=0;this.outer=null;this.inner=new I()};c2.__name__=["zpp_nape","dynamics","ZPP_Contact"];c2.prototype.outer=null;c2.prototype.wrapper=function(){if(this.outer==null){c2.internal=true;this.outer=new d8();c2.internal=false;this.outer.zpp_inner=this}return this.outer};c2.prototype.px=null;c2.prototype.py=null;c2.prototype.position_validate=function(){this.wrap_position.zpp_inner.x=this.px;this.wrap_position.zpp_inner.y=this.py};c2.prototype.wrap_position=null;c2.prototype.getposition=function(){var ea;if(au.poolVec2==null){ea=new r()}else{ea=au.poolVec2;au.poolVec2=ea.zpp_pool;ea.zpp_pool=null}if(ea.zpp_inner==null){var ee;if(bB.zpp_pool==null){ee=new bB()}else{ee=bB.zpp_pool;bB.zpp_pool=ee.next;ee.next=null}ee.weak=false;ee._immutable=false;ee.x=0;ee.y=0;ea.zpp_inner=ee;ea.zpp_inner.outer=ea}else{var eb;var ef=ea.zpp_inner;if(ef._validate!=null){ef._validate()}if(ea.zpp_inner.x==0){var ed=ea.zpp_inner;if(ed._validate!=null){ed._validate()}eb=ea.zpp_inner.y==0}else{eb=false}if(!eb){ea.zpp_inner.x=0;ea.zpp_inner.y=0;var ec=ea.zpp_inner;if(ec._invalidate!=null){ec._invalidate(ec)}}}ea.zpp_inner.weak=false;this.wrap_position=ea;this.wrap_position.zpp_inner._inuse=true;this.wrap_position.zpp_inner._immutable=true;this.wrap_position.zpp_inner._validate=dX(this,this.position_validate)};c2.prototype.inactiveme=function(){return !(this.active&&this.arbiter!=null&&!(!this.arbiter.active))};c2.prototype.arbiter=null;c2.prototype.inner=null;c2.prototype.active=null;c2.prototype.posOnly=null;c2.prototype.stamp=null;c2.prototype.hash=null;c2.prototype.fresh=null;c2.prototype.dist=null;c2.prototype.elasticity=null;c2.prototype.free=function(){this.arbiter=null};c2.prototype.alloc=function(){};c2.prototype.next=null;c2.prototype.elem=function(){return this};c2.prototype.begin=function(){return this.next};c2.prototype._inuse=null;c2.prototype.modified=null;c2.prototype.pushmod=null;c2.prototype.length=null;c2.prototype.setbegin=function(ea){this.next=ea;this.modified=true;this.pushmod=true};c2.prototype.add=function(ea){ea._inuse=true;ea.next=this.next;this.next=ea;this.modified=true;this.length++;return ea};c2.prototype.inlined_add=function(ea){ea._inuse=true;ea.next=this.next;this.next=ea;this.modified=true;this.length++;return ea};c2.prototype.addAll=function(ea){var eb=ea.next;while(eb!=null){this.add(eb);eb=eb.next}};c2.prototype.insert=function(eb,ea){ea._inuse=true;if(eb==null){ea.next=this.next;this.next=ea}else{ea.next=eb.next;eb.next=ea}this.pushmod=this.modified=true;this.length++;return ea};c2.prototype.inlined_insert=function(eb,ea){ea._inuse=true;if(eb==null){ea.next=this.next;this.next=ea}else{ea.next=eb.next;eb.next=ea}this.pushmod=this.modified=true;this.length++;return ea};c2.prototype.pop=function(){var ea=this.next;this.next=ea.next;ea._inuse=false;if(this.next==null){this.pushmod=true}this.modified=true;this.length--};c2.prototype.inlined_pop=function(){var ea=this.next;this.next=ea.next;ea._inuse=false;if(this.next==null){this.pushmod=true}this.modified=true;this.length--};c2.prototype.pop_unsafe=function(){var ea=this.next;this.pop();return ea};c2.prototype.inlined_pop_unsafe=function(){var ea=this.next;this.pop();return ea};c2.prototype.remove=function(ed){var ec=null;var ee=this.next;while(ee!=null){if(ee==ed){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;break}ec=ee;ee=ee.next}};c2.prototype.try_remove=function(ec){var eb=null;var ed=this.next;var ea=false;while(ed!=null){if(ed==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};c2.prototype.inlined_remove=function(ed){var ec=null;var ee=this.next;while(ee!=null){if(ee==ed){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;break}ec=ee;ee=ee.next}};c2.prototype.inlined_try_remove=function(ee){var ed=null;var ef=this.next;var eb=false;while(ef!=null){if(ef==ee){var ea;var ec;if(ed==null){ea=this.next;ec=ea.next;this.next=ec;if(this.next==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=ef;ef=ef.next}return eb};c2.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;return eb};c2.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;return eb};c2.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};c2.prototype.clear=function(){};c2.prototype.inlined_clear=function(){};c2.prototype.reverse=function(){var ec=this.next;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.next=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};c2.prototype.empty=function(){return this.next==null};c2.prototype.size=function(){return this.length};c2.prototype.has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};c2.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};c2.prototype.front=function(){return this.next};c2.prototype.back=function(){var ea=this.next;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea};c2.prototype.iterator_at=function(eb){var ea=this.next;while(eb-->0&&ea!=null){ea=ea.next}return ea};c2.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea}else{return null}};c2.prototype.__class__=c2;var I=zpp_nape.dynamics.ZPP_IContact=function(){this.length=0;this.pushmod=false;this.modified=false;this._inuse=false;this.next=null;this.lr2y=0;this.lr2x=0;this.lr1y=0;this.lr1x=0;this.jtAcc=0;this.jnAcc=0;this.friction=0;this.bounce=0;this.tMass=0;this.nMass=0;this.r2y=0;this.r2x=0;this.r1y=0;this.r1x=0};I.__name__=["zpp_nape","dynamics","ZPP_IContact"];I.prototype.r1x=null;I.prototype.r1y=null;I.prototype.r2x=null;I.prototype.r2y=null;I.prototype.nMass=null;I.prototype.tMass=null;I.prototype.bounce=null;I.prototype.friction=null;I.prototype.jnAcc=null;I.prototype.jtAcc=null;I.prototype.lr1x=null;I.prototype.lr1y=null;I.prototype.lr2x=null;I.prototype.lr2y=null;I.prototype.next=null;I.prototype.elem=function(){return this};I.prototype.begin=function(){return this.next};I.prototype._inuse=null;I.prototype.modified=null;I.prototype.pushmod=null;I.prototype.length=null;I.prototype.setbegin=function(ea){this.next=ea;this.modified=true;this.pushmod=true};I.prototype.add=function(ea){ea._inuse=true;ea.next=this.next;this.next=ea;this.modified=true;this.length++;return ea};I.prototype.inlined_add=function(ea){ea._inuse=true;ea.next=this.next;this.next=ea;this.modified=true;this.length++;return ea};I.prototype.addAll=function(ea){var eb=ea.next;while(eb!=null){this.add(eb);eb=eb.next}};I.prototype.insert=function(eb,ea){ea._inuse=true;if(eb==null){ea.next=this.next;this.next=ea}else{ea.next=eb.next;eb.next=ea}this.pushmod=this.modified=true;this.length++;return ea};I.prototype.inlined_insert=function(eb,ea){ea._inuse=true;if(eb==null){ea.next=this.next;this.next=ea}else{ea.next=eb.next;eb.next=ea}this.pushmod=this.modified=true;this.length++;return ea};I.prototype.pop=function(){var ea=this.next;this.next=ea.next;ea._inuse=false;if(this.next==null){this.pushmod=true}this.modified=true;this.length--};I.prototype.inlined_pop=function(){var ea=this.next;this.next=ea.next;ea._inuse=false;if(this.next==null){this.pushmod=true}this.modified=true;this.length--};I.prototype.pop_unsafe=function(){var ea=this.next;this.pop();return ea};I.prototype.inlined_pop_unsafe=function(){var ea=this.next;this.pop();return ea};I.prototype.remove=function(ed){var ec=null;var ee=this.next;while(ee!=null){if(ee==ed){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;break}ec=ee;ee=ee.next}};I.prototype.try_remove=function(ec){var eb=null;var ed=this.next;var ea=false;while(ed!=null){if(ed==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};I.prototype.inlined_remove=function(ed){var ec=null;var ee=this.next;while(ee!=null){if(ee==ed){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;break}ec=ee;ee=ee.next}};I.prototype.inlined_try_remove=function(ee){var ed=null;var ef=this.next;var eb=false;while(ef!=null){if(ef==ee){var ea;var ec;if(ed==null){ea=this.next;ec=ea.next;this.next=ec;if(this.next==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=ef;ef=ef.next}return eb};I.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;return eb};I.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;return eb};I.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};I.prototype.clear=function(){};I.prototype.inlined_clear=function(){};I.prototype.reverse=function(){var ec=this.next;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.next=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};I.prototype.empty=function(){return this.next==null};I.prototype.size=function(){return this.length};I.prototype.has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};I.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};I.prototype.front=function(){return this.next};I.prototype.back=function(){var ea=this.next;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea};I.prototype.iterator_at=function(eb){var ea=this.next;while(eb-->0&&ea!=null){ea=ea.next}return ea};I.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea}else{return null}};I.prototype.__class__=I;var cA=zpp_nape.dynamics.ZPP_InteractionFilter=function(){this.fluidMask=0;this.fluidGroup=0;this.sensorMask=0;this.sensorGroup=0;this.collisionMask=0;this.collisionGroup=0;this.wrap_shapes=null;this.shapes=null;this.outer=null;this.userData=null;this.next=null;this.shapes=new s();this.collisionGroup=this.sensorGroup=this.fluidGroup=1;this.collisionMask=this.sensorMask=this.fluidMask=-1};cA.__name__=["zpp_nape","dynamics","ZPP_InteractionFilter"];cA.prototype.next=null;cA.prototype.userData=null;cA.prototype.outer=null;cA.prototype.wrapper=function(){if(this.outer==null){this.outer=new G();var ea=this.outer.zpp_inner;ea.outer=null;ea.next=cA.zpp_pool;cA.zpp_pool=ea;this.outer.zpp_inner=this}return this.outer};cA.prototype.free=function(){this.outer=null};cA.prototype.alloc=function(){};cA.prototype.shapes=null;cA.prototype.wrap_shapes=null;cA.prototype.feature_cons=function(){this.shapes=new s()};cA.prototype.addShape=function(ea){this.shapes.add(ea)};cA.prototype.remShape=function(ea){this.shapes.remove(ea)};cA.prototype.copy=function(){var ea;if(cA.zpp_pool==null){ea=new cA()}else{ea=cA.zpp_pool;cA.zpp_pool=ea.next;ea.next=null}ea.collisionGroup=this.collisionGroup;ea.collisionMask=this.collisionMask;ea.sensorGroup=this.sensorGroup;ea.sensorMask=this.sensorMask;ea.fluidGroup=this.fluidGroup;ea.fluidMask=this.fluidMask;return ea};cA.prototype.collisionGroup=null;cA.prototype.collisionMask=null;cA.prototype.shouldCollide=function(ea){if((this.collisionMask&ea.collisionGroup)!=0){return(ea.collisionMask&this.collisionGroup)!=0}else{return false}};cA.prototype.sensorGroup=null;cA.prototype.sensorMask=null;cA.prototype.shouldSense=function(ea){if((this.sensorMask&ea.sensorGroup)!=0){return(ea.sensorMask&this.sensorGroup)!=0}else{return false}};cA.prototype.fluidGroup=null;cA.prototype.fluidMask=null;cA.prototype.shouldFlow=function(ea){if((this.fluidMask&ea.fluidGroup)!=0){return(ea.fluidMask&this.fluidGroup)!=0}else{return false}};cA.prototype.invalidate=function(){var ea=this.shapes.head;while(ea!=null){ea.elt.invalidate_filter();ea=ea.next}};cA.prototype.__class__=cA;var ax=zpp_nape.dynamics.ZPP_InteractionGroup=function(){this.depth=0;this.wrap_interactors=null;this.interactors=null;this.wrap_groups=null;this.groups=null;this.group=null;this.ignore=false;this.outer=null;this.depth=0;this.groups=new da();this.interactors=new bn()};ax.__name__=["zpp_nape","dynamics","ZPP_InteractionGroup"];ax.prototype.outer=null;ax.prototype.ignore=null;ax.prototype.group=null;ax.prototype.setGroup=function(ea){if(this.group!=ea){if(this.group!=null){this.group.groups.remove(this);this.depth=0;this.group.invalidate(true)}this.group=ea;if(ea!=null){ea.groups.add(this);this.depth=ea.depth+1;ea.invalidate(true)}else{this.invalidate(true)}}};ax.prototype.groups=null;ax.prototype.wrap_groups=null;ax.prototype.interactors=null;ax.prototype.wrap_interactors=null;ax.prototype.depth=null;ax.prototype.invalidate=function(ed){if(ed==null){ed=false}if(!(ed||this.ignore)){return}var eb=this.interactors.head;while(eb!=null){var ea=eb.elt;if(ea.ibody!=null){ea.ibody.wake()}else{if(ea.ishape!=null){ea.ishape.body.wake()}else{ea.icompound.wake()}}eb=eb.next}var ec=this.groups.head;while(ec!=null){ec.elt.invalidate(ed);ec=ec.next}};ax.prototype.addGroup=function(ea){this.groups.add(ea);ea.depth=this.depth+1};ax.prototype.remGroup=function(ea){this.groups.remove(ea);ea.depth=0};ax.prototype.addInteractor=function(ea){this.interactors.add(ea)};ax.prototype.remInteractor=function(eb,ea){if(ea==null){ea=-1}this.interactors.remove(eb)};ax.prototype.__class__=ax;var aP=zpp_nape.dynamics.ZPP_SpaceArbiterList=function(){this.at_index_3=0;this.at_index_2=0;this.at_index_1=0;this.at_index_0=0;this.ite_3=null;this.ite_2=null;this.ite_1=null;this.ite_0=null;this.lengths=null;this.zip_length=false;this._length=0;this.space=null;dD.call(this);this.at_index_0=0;this.at_index_1=0;this.at_index_2=0;this.at_index_3=0;this.zip_length=true;this._length=0;this.lengths=[];var ea=0;while(ea<4){++ea;this.lengths.push(0)}};aP.__name__=["zpp_nape","dynamics","ZPP_SpaceArbiterList"];aP.__super__=dD;aP.prototype=Object.create(dD.prototype);aP.prototype.space=null;aP.prototype._length=null;aP.prototype.zip_length=null;aP.prototype.zpp_gl=function(){this.zpp_vm();if(this.zip_length){this._length=0;var ea=0;var ef=this.space.c_arbiters_true.head;while(ef!=null){if(ef.elt.active){++ea}ef=ef.next}this.lengths[0]=ea;this._length+=ea;var ed=0;var eh=this.space.c_arbiters_false.head;while(eh!=null){if(eh.elt.active){++ed}eh=eh.next}this.lengths[1]=ed;this._length+=ed;var ec=0;var eg=this.space.f_arbiters.head;while(eg!=null){if(eg.elt.active){++ec}eg=eg.next}this.lengths[2]=ec;this._length+=ec;var eb=0;var ee=this.space.s_arbiters.head;while(ee!=null){if(ee.elt.active){++eb}ee=ee.next}this.lengths[3]=eb;this._length+=eb;this.zip_length=false}return this._length};aP.prototype.lengths=null;aP.prototype.ite_0=null;aP.prototype.ite_1=null;aP.prototype.ite_2=null;aP.prototype.ite_3=null;aP.prototype.at_index_0=null;aP.prototype.at_index_1=null;aP.prototype.at_index_2=null;aP.prototype.at_index_3=null;aP.prototype.zpp_vm=function(){var ea=false;if(this.space.c_arbiters_true.modified){ea=true;this.space.c_arbiters_true.modified=false}if(this.space.c_arbiters_false.modified){ea=true;this.space.c_arbiters_false.modified=false}if(this.space.f_arbiters.modified){ea=true;this.space.f_arbiters.modified=false}if(this.space.s_arbiters.modified){ea=true;this.space.s_arbiters.modified=false}if(ea){this.zip_length=true;this._length=0;this.ite_0=null;this.ite_1=null;this.ite_2=null;this.ite_3=null}};aP.prototype.push=function(ea){return false};aP.prototype.pop=function(){return null};aP.prototype.unshift=function(ea){return false};aP.prototype.shift=function(){return null};aP.prototype.remove=function(ea){return false};aP.prototype.clear=function(){};aP.prototype.at=function(eb){this.zpp_vm();var ea=null;var ef=0;if(ea==null){if(ebthis.maxx||this.minx>ea.maxx)};bT.prototype.intersectY=function(ea){return !(ea.miny>this.maxy||this.miny>ea.maxy)};bT.prototype.intersect=function(ea){if(ea.miny<=this.maxy&&this.miny<=ea.maxy&&ea.minx<=this.maxx){return this.minx<=ea.maxx}else{return false}};bT.prototype.combine=function(ea){if(ea.minxthis.maxx){this.maxx=ea.maxx}if(ea.minythis.maxy){this.maxy=ea.maxy}};bT.prototype.contains=function(ea){if(ea.minx>=this.minx&&ea.miny>=this.miny&&ea.maxx<=this.maxx){return ea.maxy<=this.maxy}else{return false}};bT.prototype.containsPoint=function(ea){if(ea.x>=this.minx&&ea.x<=this.maxx&&ea.y>=this.miny){return ea.y<=this.maxy}else{return false}};bT.prototype.setCombine=function(eb,ea){this.minx=eb.minxea.maxx?eb.maxx:ea.maxx;this.maxy=eb.maxy>ea.maxy?eb.maxy:ea.maxy};bT.prototype.setExpand=function(ea,eb){this.minx=ea.minx-eb;this.miny=ea.miny-eb;this.maxx=ea.maxx+eb;this.maxy=ea.maxy+eb};bT.prototype.setExpandPoint=function(ea,eb){if(eathis.maxx){this.maxx=ea}if(ebthis.maxy){this.maxy=eb}};bT.prototype.toString=function(){return"{ x: "+this.minx+" y: "+this.miny+" w: "+(this.maxx-this.minx)+" h: "+(this.maxy-this.miny)+" }"};bT.prototype.__class__=bT;var aG=zpp_nape.util.ZNPList_ZPP_Vec2=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};aG.__name__=["zpp_nape","util","ZNPList_ZPP_Vec2"];aG.prototype.head=null;aG.prototype.begin=function(){return this.head};aG.prototype.modified=null;aG.prototype.pushmod=null;aG.prototype.length=null;aG.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};aG.prototype.add=function(ec){var eb;if(aV.zpp_pool==null){eb=new aV()}else{eb=aV.zpp_pool;aV.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};aG.prototype.inlined_add=function(ec){var eb;if(aV.zpp_pool==null){eb=new aV()}else{eb=aV.zpp_pool;aV.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};aG.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};aG.prototype.insert=function(ed,ec){var eb;if(aV.zpp_pool==null){eb=new aV()}else{eb=aV.zpp_pool;aV.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};aG.prototype.inlined_insert=function(ed,ec){var eb;if(aV.zpp_pool==null){eb=new aV()}else{eb=aV.zpp_pool;aV.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};aG.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aV.zpp_pool;aV.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};aG.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aV.zpp_pool;aV.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};aG.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};aG.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};aG.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aV.zpp_pool;aV.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};aG.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};aG.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=aV.zpp_pool;aV.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};aG.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=aV.zpp_pool;aV.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};aG.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aV.zpp_pool;aV.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};aG.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=aV.zpp_pool;aV.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};aG.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};aG.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aV.zpp_pool;aV.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};aG.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=aV.zpp_pool;aV.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};aG.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};aG.prototype.empty=function(){return this.head==null};aG.prototype.size=function(){return this.length};aG.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};aG.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};aG.prototype.front=function(){return this.head.elt};aG.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};aG.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};aG.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};aG.prototype.__class__=aG;var b7=zpp_nape.geom.ZPP_Collide=function(){};b7.__name__=["zpp_nape","geom","ZPP_Collide"];b7.circleContains=function(ed,ec){var eb=0;var ea=0;eb=ec.x-ed.worldCOMx;ea=ec.y-ed.worldCOMy;return eb*eb+ea*ea=es.minx&&eh.miny>=es.miny&&eh.maxx<=es.maxx&&eh.maxy<=es.maxy){if(ee.type==0){if(ed.type==0){var ec=ee.circle.radius+-ed.circle.radius;var el=0;var ek=0;el=ed.circle.worldCOMx-ee.circle.worldCOMx;ek=ed.circle.worldCOMy-ee.circle.worldCOMy;return el*el+ek*ek<=ec*ec}else{var ei;ei=true;var eq=ed.polygon.gverts.next;while(eq!=null){var eo=eq;var eg=ee.circle.radius;var eu=0;var ef=0;eu=eo.x-ee.circle.worldCOMx;ef=eo.y-ee.circle.worldCOMy;if(eu*eu+ef*ef<=eg*eg){eq=eq.next;continue}else{ei=false;break}}return ei}}else{if(ed.type==0){var eb;eb=true;var ep=ee.polygon.edges.head;while(ep!=null){var ev=ep.elt;if(ev.gnormx*ed.circle.worldCOMx+ev.gnormy*ed.circle.worldCOMy+ed.circle.radius<=ev.gprojection){ep=ep.next;continue}else{eb=false;break}}return eb}else{var ea;ea=true;var en=ee.polygon.edges.head;while(en!=null){var ew=en.elt;var et=-1e+100;var em=ed.polygon.gverts.next;while(em!=null){var ej=em;var er=ew.gnormx*ej.x+ew.gnormy*ej.y;if(er>et){et=er}em=em.next}if(et<=ew.gprojection){en=en.next;continue}else{ea=false;break}}return ea}}}else{return false}};b7.contactCollide=function(gd,ga,eD,fz){if(ga.type==1){if(gd.type==1){var gF=true;var fe=-1e+100;var eT=-1;var gJ=null;var gI=null;var eK=gd.polygon.edges.head;while(eK!=null){var gT=eK.elt;var gC=1e+100;var e5=ga.polygon.gverts.next;while(e5!=null){var gu=e5;var gD=gT.gnormx*gu.x+gT.gnormy*gu.y;if(gD=0){gF=false;break}if(gC>fe){fe=gC;gJ=gT;eT=1}eK=eK.next}if(gF){var e4=ga.polygon.edges.head;while(e4!=null){var gL=e4.elt;var eF=1e+100;var e3=gd.polygon.gverts.next;while(e3!=null){var fb=e3;var eQ=gL.gnormx*fb.x+gL.gnormy*fb.y;if(eQ=0){gF=false;break}if(eF>fe){fe=eF;gI=gL;eT=2}e4=e4.next}if(!gF){return false}else{var gE;var gK;var gs;if(eT==1){gE=ga.polygon;gK=gJ;gs=1}else{gE=gd.polygon;gK=gI;gs=-1}var gS=null;var eC=1e+100;var e2=gE.edges.head;while(e2!=null){var eA=e2.elt;var eP=gK.gnormx*eA.gnormx+gK.gnormy*eA.gnormy;if(ePP.epsilon){fo+=eS*gv;fl+=eR*gv}var fG=(-gK.tp0-gM)*gr;if(fG<-P.epsilon){fa+=eS*fG;e9+=eR*fG}var gP=0;var gO=0;var fD=gs;gP=gK.gnormx*fD;gO=gK.gnormy*fD;eD.lnormx=gK.lnormx;eD.lnormy=gK.lnormy;eD.lproj=gK.lprojection;eD.radius=0;eD.rev=fz!=(gs==-1);eD.ptype=eD.rev?1:0;var ft=fo*gK.gnormx+fl*gK.gnormy-gK.gprojection;var ff=fa*gK.gnormx+e9*gK.gnormy-gK.gprojection;if(ft>0&&ff>0){return false}else{if(fz){gP=-gP;gO=-gO}var gq=fo-gK.gnormx*ft*0.5;var gp=fl-gK.gnormy*ft*0.5;var gh=eD.rev?1:0;var gG=null;var e1=eD.contacts.next;while(e1!=null){var gQ=e1;if(gh==gQ.hash){gG=gQ;break}e1=e1.next}if(gG==null){if(c2.zpp_pool==null){gG=new c2()}else{gG=c2.zpp_pool;c2.zpp_pool=gG.next;gG.next=null}var gB=gG.inner;gB.jnAcc=gB.jtAcc=0;gG.hash=gh;gG.fresh=true;gG.arbiter=eD;eD.jrAcc=0;var gl=eD.contacts;gG._inuse=true;var gk=gG;gk.next=gl.next;gl.next=gk;gl.modified=true;gl.length++;eD.innards.add(gB)}else{gG.fresh=false}gG.px=gq;gG.py=gp;eD.nx=gP;eD.ny=gO;gG.dist=ft;gG.stamp=eD.stamp;gG.posOnly=ft>0;var fd=gG;fo-=gE.body.posx;fl-=gE.body.posy;fd.inner.lr1x=fo*gE.body.axisy+fl*gE.body.axisx;fd.inner.lr1y=fl*gE.body.axisy-fo*gE.body.axisx;var eI=fa-gK.gnormx*ff*0.5;var el=e9-gK.gnormy*ff*0.5;var gj=eD.rev?0:1;var g3=null;var e0=eD.contacts.next;while(e0!=null){var fY=e0;if(gj==fY.hash){g3=fY;break}e0=e0.next}if(g3==null){if(c2.zpp_pool==null){g3=new c2()}else{g3=c2.zpp_pool;c2.zpp_pool=g3.next;g3.next=null}var hm=g3.inner;hm.jnAcc=hm.jtAcc=0;g3.hash=gj;g3.fresh=true;g3.arbiter=eD;eD.jrAcc=0;var fr=eD.contacts;g3._inuse=true;var fL=g3;fL.next=fr.next;fr.next=fL;fr.modified=true;fr.length++;eD.innards.add(hm)}else{g3.fresh=false}g3.px=eI;g3.py=el;eD.nx=gP;eD.ny=gO;g3.dist=ff;g3.stamp=eD.stamp;g3.posOnly=ff>0;fd=g3;fa-=gE.body.posx;e9-=gE.body.posy;fd.inner.lr1x=fa*gE.body.axisy+e9*gE.body.axisx;fd.inner.lr1y=e9*gE.body.axisy-fa*gE.body.axisx;if(eT==1){eD.__ref_edge1=gK;eD.__ref_edge2=gS}else{eD.__ref_edge2=gK;eD.__ref_edge1=gS}return true}}}else{return false}}else{var fn=-1e+100;var go=true;var ec=null;var eO=null;var fu=ga.polygon.gverts.next;var eZ=ga.polygon.edges.head;while(eZ!=null){var gH=eZ.elt;var gm=gH.gnormx*gd.circle.worldCOMx+gH.gnormy*gd.circle.worldCOMy-gH.gprojection-gd.circle.radius;if(gm>0){go=false;break}if(gm>fn){fn=gm;ec=gH;eO=fu}fu=fu.next;eZ=eZ.next}if(go){var fc=eO;var gR=eO.next==null?ga.polygon.gverts.next:eO.next;var gn=gd.circle.worldCOMy*ec.gnormx-gd.circle.worldCOMx*ec.gnormy;if(gn<=fc.y*ec.gnormx-fc.x*ec.gnormy){var eU=gd.circle.radius;var eG=0;var ek=0;eG=fc.x-gd.circle.worldCOMx;ek=fc.y-gd.circle.worldCOMy;var gU=eG*eG+ek*ek;var gw;if(gU>eU*eU){gw=null}else{if(gU=gR.y*ec.gnormx-gR.x*ec.gnormy){var eW=gd.circle.radius;var ey=0;var eg=0;ey=gR.x-gd.circle.worldCOMx;eg=gR.y-gd.circle.worldCOMy;var gA=ey*ey+eg*eg;var fI;if(gA>eW*eW){fI=null}else{if(gAeV*eV){fC=null}else{if(gy0){ef=false;break}ex=ex.next}if(ef){var et=ec.polygon.edges.head;while(et!=null){var el=et.elt;var ey=1e+100;var es=ee.polygon.gverts.next;while(es!=null){var eg=es;var ek=el.gnormx*eg.x+el.gnormy*eg.y;if(ek0){ef=false;break}et=et.next}return ef}else{return false}}else{var eI=null;var eG=null;var eE=true;var eC=-1e+100;var eH=ec.polygon.gverts.next;var er=ec.polygon.edges.head;while(er!=null){var eF=er.elt;var ev=eF.gnormx*ee.circle.worldCOMx+eF.gnormy*ee.circle.worldCOMy-eF.gprojection-ee.circle.radius;if(ev>0){eE=false;break}if(ev>eC){eC=ev;eI=eF;eG=eH}eH=eH.next;er=er.next}if(eE){var eh=eG;var eD=eG.next==null?ec.polygon.gverts.next:eG.next;var eq=ee.circle.worldCOMy*eI.gnormx-ee.circle.worldCOMx*eI.gnormy;if(eq<=eh.y*eI.gnormx-eh.x*eI.gnormy){var eb=ee.circle.radius;var ep=0;var eo=0;ep=eh.x-ee.circle.worldCOMx;eo=eh.y-ee.circle.worldCOMy;return ep*ep+eo*eo<=eb*eb}else{if(eq>=eD.y*eI.gnormx-eD.x*eI.gnormy){var ej=ee.circle.radius;var eB=0;var ed=0;eB=eD.x-ee.circle.worldCOMx;ed=eD.y-ee.circle.worldCOMy;return eB*eB+ed*ed<=ej*ej}else{return true}}}else{return false}}}else{var ei=ee.circle.radius+ec.circle.radius;var eA=0;var ea=0;eA=ec.circle.worldCOMx-ee.circle.worldCOMx;ea=ec.circle.worldCOMy-ee.circle.worldCOMy;return eA*eA+ea*ea<=ei*ei}};b7.flowCollide=function(hw,hu,ke){if(hu.type==1){if(hw.type==1){var hR=[];var hO=[];var fb=true;var gW=true;var j5=hw.polygon.edges.head;while(j5!=null){var mb=j5.elt;var eI=1e+100;var lC=0;var gd=hu.polygon.gverts.next;while(gd!=null){var lj=gd;var lz=mb.gnormx*lj.x+mb.gnormy*lj.y;if(lz=mb.gprojection+P.epsilon){hO[lC]=true;gW=false}++lC;gd=gd.next}eI-=mb.gprojection;if(eI>0){fb=false;break}j5=j5.next}if(gW){var gz=hu.polygon;if(gz.zip_worldCOM){if(gz.body!=null){gz.zip_worldCOM=false;if(gz.zip_localCOM){gz.zip_localCOM=false;if(gz.type==1){var eY=gz.polygon;if(eY.lverts.next.next==null){eY.localCOMx=eY.lverts.next.x;eY.localCOMy=eY.lverts.next.y}else{if(eY.lverts.next.next.next==null){eY.localCOMx=eY.lverts.next.x;eY.localCOMy=eY.lverts.next.y;eY.localCOMx+=eY.lverts.next.next.x;eY.localCOMy+=eY.lverts.next.next.y;eY.localCOMx*=0.5;eY.localCOMy*=0.5}else{eY.localCOMx=0;eY.localCOMy=0;var iu=0;var gb=eY.lverts.next;var lm=gb;gb=gb.next;var gl=gb;gb=gb.next;while(gb!=null){var lg=gb;iu+=gl.x*(lg.y-lm.y);var lB=lg.y*gl.x-lg.x*gl.y;eY.localCOMx+=(gl.x+lg.x)*lB;eY.localCOMy+=(gl.y+lg.y)*lB;lm=gl;gl=lg;gb=gb.next}gb=eY.lverts.next;var fZ=gb;iu+=gl.x*(fZ.y-lm.y);var kG=fZ.y*gl.x-fZ.x*gl.y;eY.localCOMx+=(gl.x+fZ.x)*kG;eY.localCOMy+=(gl.y+fZ.y)*kG;lm=gl;gb=gb.next;var fX=gb;iu+=fZ.x*(fX.y-lm.y);var kE=fX.y*fZ.x-fX.x*fZ.y;eY.localCOMx+=(fZ.x+fX.x)*kE;eY.localCOMy+=(fZ.y+fX.y)*kE;iu=1/(3*iu);var lo=iu;eY.localCOMx*=lo;eY.localCOMy*=lo}}}if(gz.wrap_localCOM!=null){gz.wrap_localCOM.zpp_inner.x=gz.localCOMx;gz.wrap_localCOM.zpp_inner.y=gz.localCOMy}}var eW=gz.body;if(eW.zip_axis){eW.zip_axis=false;eW.axisx=Math.sin(eW.rot);eW.axisy=Math.cos(eW.rot)}gz.worldCOMx=gz.body.posx+(gz.body.axisy*gz.localCOMx-gz.body.axisx*gz.localCOMy);gz.worldCOMy=gz.body.posy+(gz.localCOMx*gz.body.axisx+gz.localCOMy*gz.body.axisy)}}var lZ=hu.polygon.area;var lc=hu.polygon.worldCOMx;var lb=hu.polygon.worldCOMy;ke.overlap=lZ;ke.centroidx=lc;ke.centroidy=lb;return true}else{if(fb){gW=true;var f9=hu.polygon.edges.head;while(f9!=null){var jp=f9.elt;var hm=1e+100;var kF=0;var f7=hw.polygon.gverts.next;while(f7!=null){var gj=f7;var jJ=jp.gnormx*gj.x+jp.gnormy*gj.y;if(jJ=jp.gprojection+P.epsilon){hR[kF]=true;gW=false}++kF;f7=f7.next}hm-=jp.gprojection;if(hm>0){fb=false;break}f9=f9.next}if(gW){var eU=hw.polygon;if(eU.zip_worldCOM){if(eU.body!=null){eU.zip_worldCOM=false;if(eU.zip_localCOM){eU.zip_localCOM=false;if(eU.type==1){var eT=eU.polygon;if(eT.lverts.next.next==null){eT.localCOMx=eT.lverts.next.x;eT.localCOMy=eT.lverts.next.y}else{if(eT.lverts.next.next.next==null){eT.localCOMx=eT.lverts.next.x;eT.localCOMy=eT.lverts.next.y;eT.localCOMx+=eT.lverts.next.next.x;eT.localCOMy+=eT.lverts.next.next.y;eT.localCOMx*=0.5;eT.localCOMy*=0.5}else{eT.localCOMx=0;eT.localCOMy=0;var lX=0;var f6=eT.lverts.next;var gM=f6;f6=f6.next;var gh=f6;f6=f6.next;while(f6!=null){var fV=f6;lX+=gh.x*(fV.y-gM.y);var kC=fV.y*gh.x-fV.x*gh.y;eT.localCOMx+=(gh.x+fV.x)*kC;eT.localCOMy+=(gh.y+fV.y)*kC;gM=gh;gh=fV;f6=f6.next}f6=eT.lverts.next;var fT=f6;lX+=gh.x*(fT.y-gM.y);var kA=fT.y*gh.x-fT.x*gh.y;eT.localCOMx+=(gh.x+fT.x)*kA;eT.localCOMy+=(gh.y+fT.y)*kA;gM=gh;f6=f6.next;var fR=f6;lX+=fT.x*(fR.y-gM.y);var ky=fR.y*fT.x-fR.x*fT.y;eT.localCOMx+=(fT.x+fR.x)*ky;eT.localCOMy+=(fT.y+fR.y)*ky;lX=1/(3*lX);var g6=lX;eT.localCOMx*=g6;eT.localCOMy*=g6}}}if(eU.wrap_localCOM!=null){eU.wrap_localCOM.zpp_inner.x=eU.localCOMx;eU.wrap_localCOM.zpp_inner.y=eU.localCOMy}}var eS=eU.body;if(eS.zip_axis){eS.zip_axis=false;eS.axisx=Math.sin(eS.rot);eS.axisy=Math.cos(eS.rot)}eU.worldCOMx=eU.body.posx+(eU.body.axisy*eU.localCOMx-eU.body.axisx*eU.localCOMy);eU.worldCOMy=eU.body.posy+(eU.localCOMx*eU.body.axisx+eU.localCOMy*eU.body.axisy)}}var lW=hw.polygon.area;var eO=hw.polygon.worldCOMx;var ee=hw.polygon.worldCOMy;ke.overlap=lW;ke.centroidx=eO;ke.centroidy=ee;return true}else{if(fb){while(b7.flowpoly.head!=null){var lv=b7.flowpoly.pop_unsafe();if(!lv._inuse){if(lv.outer!=null){lv.outer.zpp_inner=null;lv.outer=null}lv._isimmutable=null;lv._validate=null;lv._invalidate=null;lv.next=bB.zpp_pool;bB.zpp_pool=lv}}var i0=null;var jY=false;var gO=hw.polygon.gverts.next;var l3=0;var gN=hu.polygon.gverts.next;var kD=0;var kj=0;var ez=hu.polygon.edgeCnt;while(kjP.epsilon*P.epsilon){iJ=1/iJ;var j0=(g5*gm-g7*gk)*iJ;if(j0>P.epsilon&&j0<1-P.epsilon){var l5=(eK*gm-eN*gk)*iJ;if(l5>P.epsilon&&l5<1-P.epsilon){g4=j0;fH=true}else{fH=false}}else{fH=false}}else{fH=false}if(fH){if(g4P.epsilon*P.epsilon){lr=1/lr;var gw=(jx*fL-jQ*e7)*lr;if(gw>P.epsilon&&gw<1-P.epsilon){var ey=(hS*fL-ie*e7)*lr;if(ey>P.epsilon&&ey<1-P.epsilon){g3=gw;hz=true}else{hz=false}}else{hz=false}}else{hz=false}if(hz){if(g3P.epsilon*P.epsilon){lp=1/lp;var gu=(jw*fJ-jO*e6)*lp;if(gu>P.epsilon&&gu<1-P.epsilon){var ew=(hP*fJ-ib*e6)*lp;if(ew>P.epsilon&&ew<1-P.epsilon){g2=gu;hy=true}else{hy=false}}else{hy=false}}else{hy=false}if(hy){if(g2P.epsilon*P.epsilon){ln=1/ln;var gs=(jv*fG-jM*e5)*ln;if(gs>P.epsilon&&gs<1-P.epsilon){var ev=(hM*fG-h8*e5)*ln;if(ev>P.epsilon&&ev<1-P.epsilon){g1=gs;hx=true}else{hx=false}}else{hx=false}}else{hx=false}if(hx){if(g1P.epsilon*P.epsilon){ll=1/ll;var gr=(ju*fE-jK*e4)*ll;if(gr>P.epsilon&&gr<1-P.epsilon){var eu=(hK*fE-h6*e4)*ll;if(eu>P.epsilon&&eu<1-P.epsilon){g0=gr;ht=true}else{ht=false}}else{ht=false}}else{ht=false}if(ht){if(g0>=-1){kY=gN;j7=kD;e2=1;if(1==ik){ih=g0;f5=mc;break}else{ih=g0}}}gK=ge;gN=f5;++kD;if(kD>=hu.polygon.edgeCnt){kD=0}f5=f5.next;if(f5==null){f5=hu.polygon.gverts.next}break}while(f5!=mc){var gc=f5;var gZ=0;var fC=0;var e3=0;fC=gK.x-em.x;e3=gK.y-em.y;var h4=0;var hI=0;h4=gc.x-gK.x;hI=gc.y-gK.y;var jG=0;var jt=0;jG=mp.x-em.x;jt=mp.y-em.y;var lh=hI*jG-h4*jt;var hs;if(lh*lh>P.epsilon*P.epsilon){lh=1/lh;var gq=(jt*fC-jG*e3)*lh;if(gq>P.epsilon&&gq<1-P.epsilon){var et=(hI*fC-h4*e3)*lh;if(et>P.epsilon&&et<1-P.epsilon){gZ=gq;hs=true}else{hs=false}}else{hs=false}}else{hs=false}if(hs){if(gZ>=ih){kY=gN;j7=kD;if(++e2==ik){ih=gZ;break}else{ih=gZ}}}gK=gc;gN=f5;++kD;if(kD>=hu.polygon.edgeCnt){kD=0}f5=f5.next;if(f5==null){f5=hu.polygon.gverts.next}}if(kY==null){break}var gJ=kY;var lQ=kY.next;if(lQ==null){lQ=hu.polygon.gverts.next}var ga=lQ;var eG=0;var ea=0;var ja=ih;eG=gJ.x+(ga.x-gJ.x)*ja;ea=gJ.y+(ga.y-gJ.y)*ja;var hr;if(i0!=null){var hE=i0.x;var hf=i0.y;var kR=0;var kr=0;kR=eG-hE;kr=ea-hf;hr=kR*kR+kr*krP.epsilon*P.epsilon){le=1/le;var gp=(jr*fA-jE*e1)*le;if(gp>P.epsilon&&gp<1-P.epsilon){var es=(hG*fA-h2*e1)*le;if(es>P.epsilon&&es<1-P.epsilon){gV=gp;hp=true}else{hp=false}}else{hp=false}}else{hp=false}if(hp){if(gV>=-1){fc=gO;iz=l3;l9=1;if(1==ik){lN=gV;f4=la;break}else{lN=gV}}}gI=f8;gO=f4;++l3;if(l3>=hw.polygon.edgeCnt){l3=0}f4=f4.next;if(f4==null){f4=hw.polygon.gverts.next}break}while(f4!=la){var fM=f4;var gT=0;var fy=0;var e0=0;fy=gI.x-ek.x;e0=gI.y-ek.y;var h0=0;var hF=0;h0=fM.x-gI.x;hF=fM.y-gI.y;var jC=0;var jq=0;jC=mo.x-ek.x;jq=mo.y-ek.y;var ld=hF*jC-h0*jq;var mk;if(ld*ld>P.epsilon*P.epsilon){ld=1/ld;var go=(jq*fy-jC*e0)*ld;if(go>P.epsilon&&go<1-P.epsilon){var ep=(hF*fy-h0*e0)*ld;if(ep>P.epsilon&&ep<1-P.epsilon){gT=go;mk=true}else{mk=false}}else{mk=false}}else{mk=false}if(mk){if(gT>=lN){fc=gO;iz=l3;if(++l9==ik){lN=gT;break}else{lN=gT}}}gI=fM;gO=f4;++l3;if(l3>=hw.polygon.edgeCnt){l3=0}f4=f4.next;if(f4==null){f4=hw.polygon.gverts.next}}if(fc==null){break}var gH=fc;var jc=fc.next;if(jc==null){jc=hw.polygon.gverts.next}var fK=jc;var eF=0;var my=0;var i8=lN;eF=gH.x+(fK.x-gH.x)*i8;my=gH.y+(fK.y-gH.y)*i8;var mj;if(i0!=null){var hC=i0.x;var hb=i0.y;var kP=0;var kp=0;kP=eF-hC;kp=my-hb;mj=kP*kP+kp*kpej.gprojection+hw.circle.radius){gY=false;break}else{if(jn+hw.circle.radius>ej.gprojection+P.epsilon){jX=false;eZ[kB]=true}}jn-=ej.gprojection+hw.circle.radius;if(jn>lL){lL=jn;eo=ej;fq=iv}iv=iv.next;++kB;f1=f1.next}if(gY){if(jX){var lU=hw.circle.area;var eE=hw.circle.worldCOMx;var mx=hw.circle.worldCOMy;ke.overlap=lU;ke.centroidx=eE;ke.centroidy=mx;return true}else{var gn=fq;var fF=fq.next==null?hu.polygon.gverts.next:fq.next;var kW=hw.circle.worldCOMy*eo.gnormx-hw.circle.worldCOMx*eo.gnormy;var mi;if(kW<=gn.y*eo.gnormx-gn.x*eo.gnormy){var j1=hw.circle.radius;var hV=0;var hU=0;hV=gn.x-hw.circle.worldCOMx;hU=gn.y-hw.circle.worldCOMy;mi=hV*hV+hU*hU<=j1*j1}else{if(kW>=fF.y*eo.gnormx-fF.x*eo.gnormy){var kd=hw.circle.radius;var ks=0;var kc=0;ks=fF.x-hw.circle.worldCOMx;kc=fF.y-hw.circle.worldCOMy;mi=ks*ks+kc*kc<=kd*kd}else{mi=true}}if(mi){var lk=[];var kz=0;var jV=true;var li=null;var jW=0;var ei=hu.polygon.gverts.next;while(ei!=null){var fD=ei;var jl=fD.x;var iW=fD.y;var hB=hw.circle.worldCOMx;var ha=hw.circle.worldCOMy;var kN=0;var ko=0;kN=jl-hB;ko=iW-ha;if(!(lk[kz]=kN*kN+ko*ko<=hw.circle.radius*hw.circle.radius)){jV=false}else{jW=kz;li=ei}++kz;ei=ei.next}if(jV){var eR=hu.polygon;if(eR.zip_worldCOM){if(eR.body!=null){eR.zip_worldCOM=false;if(eR.zip_localCOM){eR.zip_localCOM=false;if(eR.type==1){var eQ=eR.polygon;if(eQ.lverts.next.next==null){eQ.localCOMx=eQ.lverts.next.x;eQ.localCOMy=eQ.lverts.next.y}else{if(eQ.lverts.next.next.next==null){eQ.localCOMx=eQ.lverts.next.x;eQ.localCOMy=eQ.lverts.next.y;eQ.localCOMx+=eQ.lverts.next.next.x;eQ.localCOMy+=eQ.lverts.next.next.y;eQ.localCOMx*=0.5;eQ.localCOMy*=0.5}else{eQ.localCOMx=0;eQ.localCOMy=0;var lT=0;var eh=eQ.lverts.next;var gE=eh;eh=eh.next;var fB=eh;eh=eh.next;while(eh!=null){var fN=eh;lT+=fB.x*(fN.y-gE.y);var ku=fN.y*fB.x-fN.x*fB.y;eQ.localCOMx+=(fB.x+fN.x)*ku;eQ.localCOMy+=(fB.y+fN.y)*ku;gE=fB;fB=fN;eh=eh.next}eh=eQ.lverts.next;var ly=eh;lT+=fB.x*(ly.y-gE.y);var l4=ly.y*fB.x-ly.x*fB.y;eQ.localCOMx+=(fB.x+ly.x)*l4;eQ.localCOMy+=(fB.y+ly.y)*l4;gE=fB;eh=eh.next;var lx=eh;lT+=ly.x*(lx.y-gE.y);var l2=lx.y*ly.x-lx.x*ly.y;eQ.localCOMx+=(ly.x+lx.x)*l2;eQ.localCOMy+=(ly.y+lx.y)*l2;lT=1/(3*lT);var jR=lT;eQ.localCOMx*=jR;eQ.localCOMy*=jR}}}if(eR.wrap_localCOM!=null){eR.wrap_localCOM.zpp_inner.x=eR.localCOMx;eR.wrap_localCOM.zpp_inner.y=eR.localCOMy}}var eP=eR.body;if(eP.zip_axis){eP.zip_axis=false;eP.axisx=Math.sin(eP.rot);eP.axisy=Math.cos(eP.rot)}eR.worldCOMx=eR.body.posx+(eR.body.axisy*eR.localCOMx-eR.body.axisx*eR.localCOMy);eR.worldCOMy=eR.body.posy+(eR.localCOMx*eR.body.axisx+eR.localCOMy*eR.body.axisy)}}var lR=hu.polygon.area;var eD=hu.polygon.worldCOMx;var mw=hu.polygon.worldCOMy;ke.overlap=lR;ke.centroidx=eD;ke.centroidy=mw;return true}else{while(b7.flowpoly.head!=null){var iC=b7.flowpoly.pop_unsafe();if(!iC._inuse){if(iC.outer!=null){iC.outer.zpp_inner=null;iC.outer=null}iC._isimmutable=null;iC._validate=null;iC._invalidate=null;iC.next=bB.zpp_pool;bB.zpp_pool=iC}}b7.flowsegs.clear();var iD=null;var f2=1;if(li==null){li=hu.polygon.gverts.next;f2=2}else{iD=li;b7.flowpoly.add(iD)}while(f2!=0){if(f2==1){li=li.next;if(li==null){li=hu.polygon.gverts.next}++jW;if(jW>=hu.polygon.edgeCnt){jW=0}if(lk[jW]){var jk=iD.x;var iU=iD.y;var hA=li.x;var g9=li.y;var kL=0;var kn=0;kL=jk-hA;kn=iU-g9;if(kL*kL+kn*knP.epsilon){var ig=0;var fv=0;var i5=g8;ig=il.x+(fx.x-il.x)*i5;fv=il.y+(fx.y-il.y)*i5;var mh;if(iD!=null){var je=iD.x;var iP=iD.y;var kI=0;var kg=0;kI=je-ig;kg=iP-fv;mh=kI*kI+kg*kgP.epsilon){var h7=0;var fr=0;var i2=j2;h7=il.x+(fw.x-il.x)*i2;fr=il.y+(fw.y-il.y)*i2;var mg;if(iD!=null){var eA=iD.x;var iL=iD.y;var iX=0;var he=0;iX=eA-h7;he=iL-fr;mg=iX*iX+he*helD.gprojection){mn=false;break}ef=ef.next}if(mn){var lO=hw.circle.area;var h3=hw.circle.worldCOMx;var fo=hw.circle.worldCOMy;ke.overlap=lO;ke.centroidx=h3;ke.centroidy=fo;return true}else{return false}}else{var jj=0;var iR=0;var lM=0;if(b7.flowpoly.head.next.next!=null){var jZ=0;var j4=0;var j3=0;j4=0;j3=0;jZ=0;var ed=b7.flowpoly.head;var ij=ed.elt;ed=ed.next;var fu=ed.elt;ed=ed.next;while(ed!=null){var lw=ed.elt;jZ+=fu.x*(lw.y-ij.y);var l1=lw.y*fu.x-lw.x*fu.y;j4+=(fu.x+lw.x)*l1;j3+=(fu.y+lw.y)*l1;ij=fu;fu=lw;ed=ed.next}ed=b7.flowpoly.head;var lu=ed.elt;jZ+=fu.x*(lu.y-ij.y);var l0=lu.y*fu.x-lu.x*fu.y;j4+=(fu.x+lu.x)*l0;j3+=(fu.y+lu.y)*l0;ij=fu;ed=ed.next;var ls=ed.elt;jZ+=lu.x*(ls.y-ij.y);var lY=ls.y*lu.x-ls.x*lu.y;j4+=(lu.x+ls.x)*lY;j3+=(lu.y+ls.y)*lY;jZ*=0.5;var iE=1/(6*jZ);j4*=iE;j3*=iE;var jD=-jZ;jj+=j4*jD;iR+=j3*jD;lM=0-jZ}else{b7.flowsegs.add(b7.flowpoly.head.elt);b7.flowsegs.add(b7.flowpoly.head.next.elt)}while(b7.flowsegs.head!=null){var ii=b7.flowsegs.pop_unsafe();var e8=b7.flowsegs.pop_unsafe();var iV=0;var hc=0;iV=e8.x-ii.x;hc=e8.y-ii.y;var iy=0;var iw=0;iy=iV;iw=hc;var fd=1/Math.sqrt(iy*iy+iw*iw);iy*=fd;iw*=fd;var jB=iy;iy=-iw;iw=jB;var h1=0;var fn=0;h1=ii.x+e8.x;fn=ii.y+e8.y;h1*=0.5;fn*=0.5;h1-=hw.circle.worldCOMx;fn-=hw.circle.worldCOMy;var er=iy*h1+iw*fn;var jh=0;var fe=0;var hW=er/hw.circle.radius;var iZ=Math.sqrt(1-hW*hW);var gi=Math.acos(hW);jh=hw.circle.radius*(hw.circle.radius*gi-er*iZ);fe=0.6666666666666666*hw.circle.radius*iZ*iZ*iZ/(gi-hW*iZ);h1=hw.circle.worldCOMx;fn=hw.circle.worldCOMy;var jA=fe;h1+=iy*jA;fn+=iw*jA;var jz=jh;jj+=h1*jz;iR+=fn*jz;lM+=jh}var jy=1/lM;jj*=jy;iR*=jy;ke.overlap=lM;ke.centroidx=jj;ke.centroidy=iR;return true}}}}else{return false}}}else{return false}}}else{var mf=hw.circle;var me=hu.circle;var lH=0;var lF=0;lH=me.worldCOMx-mf.worldCOMx;lF=me.worldCOMy-mf.worldCOMy;var lq=mf.radius+me.radius;var kX=lH*lH+lF*lF;if(kX>lq*lq){return false}else{if(kX=0};an.optimise=function(ei){var ep=ei.vertices;var el=ei.vertices;if(ep!=null){var ef=ep;while(true){ef.sort();ef=ef.next;if(!(ef!=el)){break}}}var ej=ei.vertices;var eg=ei.vertices;if(ej!=null){var eq=ej;while(true){var ec=eq;var ed=ec.prev;var ea=null;var ee=ec.diagonals.head;while(ee!=null){var em=ee.elt;if(!an.isinner(ee.next==null?ec.next:ee.next.elt,ec,ed)){ea=ee;ed=em;ee=ee.next;continue}var eb=true;var eh=em.prev;var eo=null;var en=em.diagonals.head;while(en!=null){var ek=en.elt;if(ek==ec){eb=an.isinner(en.next==null?em.next:en.next.elt,em,eh);break}eh=ek;eo=en;en=en.next}if(eb){ee=ec.diagonals.erase(ea);em.diagonals.erase(eo);continue}ed=em;ea=ee;ee=ee.next}eq=eq.next;if(!(eq!=eg)){break}}}};an.prototype.__class__=an;var a4=zpp_nape.geom.ZPP_ConvexRayResult=function(){this.toiDistance=0;this.next=null;this.inner=false;this.ray=null;this.position=null;this.convex=null;this.shape=null;this.normal=null};a4.__name__=["zpp_nape","geom","ZPP_ConvexRayResult"];a4.getRay=function(ef,ee,eb,ea){var ed;if(a4.rayPool==null){a4.internal=true;ed=new df();ed.zpp_inner=new a4();ed.zpp_inner.ray=ed;a4.internal=false}else{ed=a4.rayPool.ray;a4.rayPool=a4.rayPool.next;ed.zpp_inner.next=null}var ec=ed.zpp_inner;ec.normal=ef;ef.zpp_inner._immutable=true;ec.toiDistance=ee;ec.inner=eb;ec.shape=ea;return ed};a4.getConvex=function(ef,ea,ee,ec){var ed;if(a4.convexPool==null){a4.internal=true;ed=new bJ();ed.zpp_inner=new a4();ed.zpp_inner.convex=ed;a4.internal=false}else{ed=a4.convexPool.convex;a4.convexPool=a4.convexPool.next;ed.zpp_inner.next=null}var eb=ed.zpp_inner;eb.normal=ef;eb.position=ea;ef.zpp_inner._immutable=true;ea.zpp_inner._immutable=true;eb.toiDistance=ee;eb.shape=ec;return ed};a4.prototype.normal=null;a4.prototype.shape=null;a4.prototype.convex=null;a4.prototype.position=null;a4.prototype.ray=null;a4.prototype.inner=null;a4.prototype.next=null;a4.prototype.toiDistance=null;a4.prototype.disposed=function(){};a4.prototype.free=function(){this.normal.zpp_inner._immutable=false;var ed=this.normal;var eb=ed.zpp_inner;ed.zpp_inner.outer=null;ed.zpp_inner=null;ed.zpp_pool=au.poolVec2;au.poolVec2=ed;if(eb.outer!=null){eb.outer.zpp_inner=null;eb.outer=null}eb._isimmutable=null;eb._validate=null;eb._invalidate=null;eb.next=bB.zpp_pool;bB.zpp_pool=eb;if(this.position!=null){this.position.zpp_inner._immutable=false;var ec=this.position;var ea=ec.zpp_inner;ec.zpp_inner.outer=null;ec.zpp_inner=null;ec.zpp_pool=au.poolVec2;au.poolVec2=ec;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea._isimmutable=null;ea._validate=null;ea._invalidate=null;ea.next=bB.zpp_pool;bB.zpp_pool=ea}this.shape=null;this.toiDistance=0;if(this.convex!=null){this.next=a4.convexPool;a4.convexPool=this}else{this.next=a4.rayPool;a4.rayPool=this}};a4.prototype.__class__=a4;var E=zpp_nape.geom.ZPP_CutVert=function(){this.used=false;this.rank=0;this.parent=null;this.positive=false;this.value=0;this.vert=null;this.posy=0;this.posx=0;this.next=null;this.prev=null};E.__name__=["zpp_nape","geom","ZPP_CutVert"];E.path=function(eb){var ea;if(E.zpp_pool==null){ea=new E()}else{ea=E.zpp_pool;E.zpp_pool=ea.next;ea.next=null}ea.vert=eb;ea.parent=ea;ea.rank=0;ea.used=false;return ea};E.prototype.prev=null;E.prototype.next=null;E.prototype.posx=null;E.prototype.posy=null;E.prototype.vert=null;E.prototype.value=null;E.prototype.positive=null;E.prototype.parent=null;E.prototype.rank=null;E.prototype.used=null;E.prototype.alloc=function(){};E.prototype.free=function(){this.vert=null;this.parent=null};E.prototype.__class__=E;var c3=zpp_nape.geom.ZPP_CutInt=function(){this.path1=null;this.start=null;this.end=null;this.path0=null;this.vertex=false;this.virtualint=false;this.time=0;this.next=null};c3.__name__=["zpp_nape","geom","ZPP_CutInt"];c3.get=function(ee,ea,eh,eg,ef,ec,ed){if(ed==null){ed=false}if(ec==null){ec=false}var eb;if(c3.zpp_pool==null){eb=new c3()}else{eb=c3.zpp_pool;c3.zpp_pool=eb.next;eb.next=null}eb.virtualint=ec;eb.end=ea;eb.start=eh;eb.path0=eg;eb.path1=ef;eb.time=ee;eb.vertex=ed;return eb};c3.prototype.next=null;c3.prototype.time=null;c3.prototype.virtualint=null;c3.prototype.vertex=null;c3.prototype.path0=null;c3.prototype.end=null;c3.prototype.start=null;c3.prototype.path1=null;c3.prototype.alloc=function(){};c3.prototype.free=function(){this.end=this.start=null;this.path0=this.path1=null};c3.prototype.__class__=c3;var az=zpp_nape.geom.ZPP_Cutter=function(){};az.__name__=["zpp_nape","geom","ZPP_Cutter"];az.run=function(g9,eX,h0,eh,f9,hR){var f7=0;var f6=0;var f5=eX.zpp_inner;if(f5._validate!=null){f5._validate()}f7=eX.zpp_inner.x;var fn=eX.zpp_inner;if(fn._validate!=null){fn._validate()}f6=eX.zpp_inner.y;var f4=0;var f3=0;var fm=h0.zpp_inner;if(fm._validate!=null){fm._validate()}f4=h0.zpp_inner.x-f7;var fl=h0.zpp_inner;if(fl._validate!=null){fl._validate()}f3=h0.zpp_inner.y-f6;var gl=eh?0:-Infinity;var e1=f9?1:Infinity;var el=-(f6*f4-f7*f3);var hM=null;var gt=false;var gi=g9;while(true){var gy;if(E.zpp_pool==null){gy=new E()}else{gy=E.zpp_pool;E.zpp_pool=gy.next;gy.next=null}gy.vert=gi;gy.posx=gy.vert.x;gy.posy=gy.vert.y;gy.value=gy.posy*f4-gy.posx*f3+el;gy.positive=gy.value>0;if(gy.value==0){gt=true}var eY=gy;if(hM==null){hM=eY.prev=eY.next=eY}else{eY.prev=hM;eY.next=hM.next;hM.next.prev=eY;hM.next=eY}hM=eY;gi=gi.next;if(!(gi!=g9)){break}}if(gt){var hb=null;var ho=hM;var hf=hM;if(ho!=null){var gs=ho;while(true){var hi=gs;if(hi.value!=0){hb=hi;break}gs=gs.next;if(!(gs!=hf)){break}}}var g7=0;var g6=0;g7=f4;g6=f3;var eB=1/Math.sqrt(g7*g7+g6*g6);g7*=eB;g6*=eB;var ge=g7;g7=-g6;g6=ge;var fI=null;var hh=hb;while(true){if(hh.value!=0&&(fI==null||hh==fI.next)){fI=hh;hh=hh.next;if(!(hh!=hb)){break}else{continue}}var hX=fI.value*hh.value;if(hX==0){hh=hh.next;if(!(hh!=hb)){break}else{continue}}var gF=fI.next;var em;if(hX>0){em=fI.positive}else{var gB=gF.next;var gU=0;var gP=0;gU=gF.posx+gB.posx;gP=gF.posy+gB.posy;gU*=0.5;gP*=0.5;var gd=gU+g7*1e-8;var gc=gP+g6*1e-8;var fG=false;if(g9!=null){var e7=g9;while(true){var hg=e7;var gh=hg.prev;if((hg.y=gc||gh.y=gc)&&(hg.x<=gd||gh.x<=gd)){if(hg.x+(gc-hg.y)/(gh.y-hg.y)*(gh.x-hg.x)0){ef=fI.positive}else{var hQ=eb.next;var eW=0;var eI=0;eW=eb.posx+hQ.posx;eI=eb.posy+hQ.posy;eW*=0.5;eI*=0.5;var eH=eW+g7*1e-8;var et=eI+g6*1e-8;var g2=false;if(g9!=null){var e4=g9;while(true){var he=e4;var gr=he.prev;if((he.y=et||gr.y=et)&&(he.x<=eH||gr.x<=eH)){if(he.x+(et-he.y)/(gr.y-he.y)*(gr.x-he.x)e1){var gT;if(c3.zpp_pool==null){gT=new c3()}else{gT=c3.zpp_pool;c3.zpp_pool=gT.next;gT.next=null}gT.virtualint=true;gT.end=null;gT.start=null;gT.path0=null;gT.path1=null;gT.time=gg;gT.vertex=false;az.ints.add(gT);if(fi==null){fi=gb.prev=gb.next=gb}else{gb.next=fi;gb.prev=fi.prev;fi.prev.next=gb;fi.prev=gb}}else{if(gq.value==0){var eJ=fi.prev;fi=null;var eE=eJ.x;var eo=eJ.y;var gO;if(dr.zpp_pool==null){gO=new dr()}else{gO=dr.zpp_pool;dr.zpp_pool=gO.next;gO.next=null}gO.forced=false;gO.x=eE;gO.y=eo;var fE=gO;if(fi==null){fi=fE.prev=fE.next=fE}else{fE.next=fi;fE.prev=fi.prev;fi.prev.next=fE;fi.prev=fE}if(fi==null){fi=gb.prev=gb.next=gb}else{gb.next=fi;gb.prev=fi.prev;fi.prev.next=gb;fi.prev=gb}var f8=az.paths.head.elt;var gJ;if(E.zpp_pool==null){gJ=new E()}else{gJ=E.zpp_pool;E.zpp_pool=gJ.next;gJ.next=null}gJ.vert=fi;gJ.parent=gJ;gJ.rank=0;gJ.used=false;az.paths.add(gJ);var e0=az.paths.head.elt;var gE;if(c3.zpp_pool==null){gE=new c3()}else{gE=c3.zpp_pool;c3.zpp_pool=gE.next;gE.next=null}gE.virtualint=true;gE.end=eJ;gE.start=fi;gE.path0=f8;gE.path1=e0;gE.time=gg;gE.vertex=false;az.ints.add(gE)}else{if(go.value==0){if(fi==null){fi=gb.prev=gb.next=gb}else{gb.next=fi;gb.prev=fi.prev;fi.prev.next=gb;fi.prev=gb}var g5=fi.prev;fi=null;var eD=go.posx;var en=go.posy;var gA;if(dr.zpp_pool==null){gA=new dr()}else{gA=dr.zpp_pool;dr.zpp_pool=gA.next;gA.next=null}gA.forced=false;gA.x=eD;gA.y=en;var fC=gA;if(fi==null){fi=fC.prev=fC.next=fC}else{fC.next=fi;fC.prev=fi.prev;fi.prev.next=fC;fi.prev=fC}var hV=az.paths.head.elt;var f2;if(E.zpp_pool==null){f2=new E()}else{f2=E.zpp_pool;E.zpp_pool=f2.next;f2.next=null}f2.vert=fi;f2.parent=f2;f2.rank=0;f2.used=false;az.paths.add(f2);var ek=az.paths.head.elt;var f1;if(c3.zpp_pool==null){f1=new c3()}else{f1=c3.zpp_pool;c3.zpp_pool=f1.next;f1.next=null}f1.virtualint=true;f1.end=g5;f1.start=fi;f1.path0=hV;f1.path1=ek;f1.time=gg;f1.vertex=false;az.ints.add(f1)}else{var fH=(f3*hl-f4*hj)*fo;var fL=0;var fJ=0;fL=gq.posx;fJ=gq.posy;fL+=eR*fH;fJ+=eP*fH;var f0;if(dr.zpp_pool==null){f0=new dr()}else{f0=dr.zpp_pool;dr.zpp_pool=f0.next;f0.next=null}f0.forced=false;f0.x=fL;f0.y=fJ;var fy=f0;if(fi==null){fi=fy.prev=fy.next=fy}else{fy.next=fi;fy.prev=fi.prev;fi.prev.next=fy;fi.prev=fy}var g4=fi.prev;fi=null;var fY;if(dr.zpp_pool==null){fY=new dr()}else{fY=dr.zpp_pool;dr.zpp_pool=fY.next;fY.next=null}fY.forced=false;fY.x=fL;fY.y=fJ;var fw=fY;if(fi==null){fi=fw.prev=fw.next=fw}else{fw.next=fi;fw.prev=fi.prev;fi.prev.next=fw;fi.prev=fw}if(fi==null){fi=gb.prev=gb.next=gb}else{gb.next=fi;gb.prev=fi.prev;fi.prev.next=gb;fi.prev=gb}var hU=az.paths.head.elt;var fX;if(E.zpp_pool==null){fX=new E()}else{fX=E.zpp_pool;E.zpp_pool=fX.next;fX.next=null}fX.vert=fi;fX.parent=fX;fX.rank=0;fX.used=false;az.paths.add(fX);var ej=az.paths.head.elt;var fW;if(c3.zpp_pool==null){fW=new c3()}else{fW=c3.zpp_pool;c3.zpp_pool=fW.next;fW.next=null}fW.virtualint=false;fW.end=g4;fW.start=fi;fW.path0=hU;fW.path1=ej;fW.time=gg;fW.vertex=false;az.ints.add(fW)}}}}gq=gq.next;if(!(gq!=hM)){break}}var g3=fi.prev;g3.next.prev=hY.prev;hY.prev.next=g3.next;g3.next=hY;hY.prev=g3;var fs=az.paths.head.elt;var hZ;if(e2==e2.parent){hZ=e2}else{var fv=e2;var ed=null;while(fv!=fv.parent){var hW=fv.parent;fv.parent=ed;ed=fv;fv=hW}while(ed!=null){var eV=ed.parent;ed.parent=fv;ed=eV}hZ=fv}var hP;if(fs==fs.parent){hP=fs}else{var fu=fs;var gW=null;while(fu!=fu.parent){var eU=fu.parent;fu.parent=gW;gW=fu;fu=eU}while(gW!=null){var eT=gW.parent;gW.parent=fu;gW=eT}hP=fu}if(hZ!=hP){if(hZ.rankhP.rank){hP.parent=hZ}else{hP.parent=hZ;hZ.rank++}}}var fq=az.ints;if(fq.head!=null&&fq.head.next!=null){var ea=fq.head;var hT=null;var fp=null;var fB=null;var eS=null;var fz=1;var gv;var eL;var hz;while(true){gv=0;fp=ea;ea=null;hT=ea;while(fp!=null){++gv;fB=fp;eL=0;hz=fz;while(fB!=null&&eL0||hz>0&&fB!=null){if(eL==0){eS=fB;fB=fB.next;--hz}else{if(hz==0||fB==null){eS=fp;fp=fp.next;--eL}else{if(fp.elt.time1)){break}}fq.head=ea;fq.modified=true;fq.pushmod=true}while(az.ints.head!=null){var e8=az.ints.pop_unsafe();var eZ=az.ints.pop_unsafe();if(!e8.virtualint&&!eZ.virtualint){e8.end.next.prev=eZ.start.prev;eZ.start.prev.next=e8.end.next;e8.end.next=eZ.start;eZ.start.prev=e8.end;eZ.end.next.prev=e8.start.prev;e8.start.prev.next=eZ.end.next;eZ.end.next=e8.start;e8.start.prev=eZ.end;var fO;if(e8.path0==e8.path0.parent){fO=e8.path0}else{var ft=e8.path0;var gS=null;while(ft!=ft.parent){var eQ=ft.parent;ft.parent=gS;gS=ft;ft=eQ}while(gS!=null){var eO=gS.parent;gS.parent=ft;gS=eO}fO=ft}var ei;if(eZ.path1==eZ.path1.parent){ei=eZ.path1}else{var fr=eZ.path1;var gN=null;while(fr!=fr.parent){var eN=fr.parent;fr.parent=gN;gN=fr;fr=eN}while(gN!=null){var eM=gN.parent;gN.parent=fr;gN=eM}ei=fr}if(fO!=ei){if(fO.rankei.rank){ei.parent=fO}else{ei.parent=fO;fO.rank++}}}var fN;if(e8.path1==e8.path1.parent){fN=e8.path1}else{var hJ=e8.path1;var gI=null;while(hJ!=hJ.parent){var eK=hJ.parent;hJ.parent=gI;gI=hJ;hJ=eK}while(gI!=null){var hw=gI.parent;gI.parent=hJ;gI=hw}fN=hJ}var eg;if(eZ.path0==eZ.path0.parent){eg=eZ.path0}else{var hH=eZ.path0;var gD=null;while(hH!=hH.parent){var hv=hH.parent;hH.parent=gD;gD=hH;hH=hv}while(gD!=null){var hu=gD.parent;gD.parent=hH;gD=hu}eg=hH}if(fN!=eg){if(fN.rankeg.rank){eg.parent=fN}else{eg.parent=fN;fN.rank++}}}}else{if(e8.virtualint&&!eZ.virtualint){var hs;if(eZ.end!=null&&eZ.end.prev==eZ.end){eZ.end.next=eZ.end.prev=null;var gj=eZ.end;if(gj.wrap!=null){gj.wrap.zpp_inner._inuse=false;var fk=gj.wrap;var gM=fk.zpp_inner;fk.zpp_inner.outer=null;fk.zpp_inner=null;fk.zpp_pool=au.poolVec2;au.poolVec2=fk;if(gM.outer!=null){gM.outer.zpp_inner=null;gM.outer=null}gM._isimmutable=null;gM._validate=null;gM._invalidate=null;gM.next=bB.zpp_pool;bB.zpp_pool=gM;gj.wrap=null}gj.prev=gj.next=null;gj.next=dr.zpp_pool;dr.zpp_pool=gj;hs=null}else{var fZ=eZ.end.prev;eZ.end.prev.next=eZ.end.next;eZ.end.next.prev=eZ.end.prev;eZ.end.next=eZ.end.prev=null;var hO=eZ.end;if(hO.wrap!=null){hO.wrap.zpp_inner._inuse=false;var fh=hO.wrap;var eA=fh.zpp_inner;fh.zpp_inner.outer=null;fh.zpp_inner=null;fh.zpp_pool=au.poolVec2;au.poolVec2=fh;if(eA.outer!=null){eA.outer.zpp_inner=null;eA.outer=null}eA._isimmutable=null;eA._validate=null;eA._invalidate=null;eA.next=bB.zpp_pool;bB.zpp_pool=eA;hO.wrap=null}hO.prev=hO.next=null;hO.next=dr.zpp_pool;dr.zpp_pool=hO;eZ.end=null;hs=fZ}eZ.end=hs;if(!eZ.vertex){if(eZ.end!=eZ.path0.vert){eZ.start.x=eZ.end.x;eZ.start.y=eZ.end.y;var fD;if(eZ.end!=null&&eZ.end.prev==eZ.end){eZ.end.next=eZ.end.prev=null;var hN=eZ.end;if(hN.wrap!=null){hN.wrap.zpp_inner._inuse=false;var ff=hN.wrap;var ez=ff.zpp_inner;ff.zpp_inner.outer=null;ff.zpp_inner=null;ff.zpp_pool=au.poolVec2;au.poolVec2=ff;if(ez.outer!=null){ez.outer.zpp_inner=null;ez.outer=null}ez._isimmutable=null;ez._validate=null;ez._invalidate=null;ez.next=bB.zpp_pool;bB.zpp_pool=ez;hN.wrap=null}hN.prev=hN.next=null;hN.next=dr.zpp_pool;dr.zpp_pool=hN;fD=null}else{var g0=eZ.end.prev;eZ.end.prev.next=eZ.end.next;eZ.end.next.prev=eZ.end.prev;eZ.end.next=eZ.end.prev=null;var hL=eZ.end;if(hL.wrap!=null){hL.wrap.zpp_inner._inuse=false;var fc=hL.wrap;var ey=fc.zpp_inner;fc.zpp_inner.outer=null;fc.zpp_inner=null;fc.zpp_pool=au.poolVec2;au.poolVec2=fc;if(ey.outer!=null){ey.outer.zpp_inner=null;ey.outer=null}ey._isimmutable=null;ey._validate=null;ey._invalidate=null;ey.next=bB.zpp_pool;bB.zpp_pool=ey;hL.wrap=null}hL.prev=hL.next=null;hL.next=dr.zpp_pool;dr.zpp_pool=hL;eZ.end=null;fD=g0}eZ.end=fD}else{var gk=eZ.start.next;eZ.start.x=gk.x;eZ.start.y=gk.y;if(gk!=null&&gk.prev==gk){gk.next=gk.prev=null;var hK=gk;if(hK.wrap!=null){hK.wrap.zpp_inner._inuse=false;var fa=hK.wrap;var ex=fa.zpp_inner;fa.zpp_inner.outer=null;fa.zpp_inner=null;fa.zpp_pool=au.poolVec2;au.poolVec2=fa;if(ex.outer!=null){ex.outer.zpp_inner=null;ex.outer=null}ex._isimmutable=null;ex._validate=null;ex._invalidate=null;ex.next=bB.zpp_pool;bB.zpp_pool=ex;hK.wrap=null}hK.prev=hK.next=null;hK.next=dr.zpp_pool;dr.zpp_pool=hK;gk=null}else{gk.prev.next=gk.next;gk.next.prev=gk.prev;gk.next=gk.prev=null;var hI=gk;if(hI.wrap!=null){hI.wrap.zpp_inner._inuse=false;var e9=hI.wrap;var ew=e9.zpp_inner;e9.zpp_inner.outer=null;e9.zpp_inner=null;e9.zpp_pool=au.poolVec2;au.poolVec2=e9;if(ew.outer!=null){ew.outer.zpp_inner=null;ew.outer=null}ew._isimmutable=null;ew._validate=null;ew._invalidate=null;ew.next=bB.zpp_pool;bB.zpp_pool=ew;hI.wrap=null}hI.prev=hI.next=null;hI.next=dr.zpp_pool;dr.zpp_pool=hI}}}eZ.end.next.prev=eZ.start.prev;eZ.start.prev.next=eZ.end.next;eZ.end.next=eZ.start;eZ.start.prev=eZ.end;var fM;if(eZ.path0==eZ.path0.parent){fM=eZ.path0}else{var hF=eZ.path0;var gz=null;while(hF!=hF.parent){var ht=hF.parent;hF.parent=gz;gz=hF;hF=ht}while(gz!=null){var hr=gz.parent;gz.parent=hF;gz=hr}fM=hF}var ee;if(eZ.path1==eZ.path1.parent){ee=eZ.path1}else{var hD=eZ.path1;var gx=null;while(hD!=hD.parent){var hq=hD.parent;hD.parent=gx;gx=hD;hD=hq}while(gx!=null){var hp=gx.parent;gx.parent=hD;gx=hp}ee=hD}if(fM!=ee){if(fM.rankee.rank){ee.parent=fM}else{ee.parent=fM;fM.rank++}}}}else{if(eZ.virtualint&&!e8.virtualint){var fA;if(e8.end!=null&&e8.end.prev==e8.end){e8.end.next=e8.end.prev=null;var hG=e8.end;if(hG.wrap!=null){hG.wrap.zpp_inner._inuse=false;var fU=hG.wrap;var ev=fU.zpp_inner;fU.zpp_inner.outer=null;fU.zpp_inner=null;fU.zpp_pool=au.poolVec2;au.poolVec2=fU;if(ev.outer!=null){ev.outer.zpp_inner=null;ev.outer=null}ev._isimmutable=null;ev._validate=null;ev._invalidate=null;ev.next=bB.zpp_pool;bB.zpp_pool=ev;hG.wrap=null}hG.prev=hG.next=null;hG.next=dr.zpp_pool;dr.zpp_pool=hG;fA=null}else{var gY=e8.end.prev;e8.end.prev.next=e8.end.next;e8.end.next.prev=e8.end.prev;e8.end.next=e8.end.prev=null;var hE=e8.end;if(hE.wrap!=null){hE.wrap.zpp_inner._inuse=false;var fT=hE.wrap;var eu=fT.zpp_inner;fT.zpp_inner.outer=null;fT.zpp_inner=null;fT.zpp_pool=au.poolVec2;au.poolVec2=fT;if(eu.outer!=null){eu.outer.zpp_inner=null;eu.outer=null}eu._isimmutable=null;eu._validate=null;eu._invalidate=null;eu.next=bB.zpp_pool;bB.zpp_pool=eu;hE.wrap=null}hE.prev=hE.next=null;hE.next=dr.zpp_pool;dr.zpp_pool=hE;e8.end=null;fA=gY}e8.end=fA;if(!e8.vertex){if(e8.end!=e8.path0.vert){e8.start.x=e8.end.x;e8.start.y=e8.end.y;var fx;if(e8.end!=null&&e8.end.prev==e8.end){e8.end.next=e8.end.prev=null;var hC=e8.end;if(hC.wrap!=null){hC.wrap.zpp_inner._inuse=false;var fS=hC.wrap;var es=fS.zpp_inner;fS.zpp_inner.outer=null;fS.zpp_inner=null;fS.zpp_pool=au.poolVec2;au.poolVec2=fS;if(es.outer!=null){es.outer.zpp_inner=null;es.outer=null}es._isimmutable=null;es._validate=null;es._invalidate=null;es.next=bB.zpp_pool;bB.zpp_pool=es;hC.wrap=null}hC.prev=hC.next=null;hC.next=dr.zpp_pool;dr.zpp_pool=hC;fx=null}else{var gV=e8.end.prev;e8.end.prev.next=e8.end.next;e8.end.next.prev=e8.end.prev;e8.end.next=e8.end.prev=null;var hB=e8.end;if(hB.wrap!=null){hB.wrap.zpp_inner._inuse=false;var fR=hB.wrap;var eq=fR.zpp_inner;fR.zpp_inner.outer=null;fR.zpp_inner=null;fR.zpp_pool=au.poolVec2;au.poolVec2=fR;if(eq.outer!=null){eq.outer.zpp_inner=null;eq.outer=null}eq._isimmutable=null;eq._validate=null;eq._invalidate=null;eq.next=bB.zpp_pool;bB.zpp_pool=eq;hB.wrap=null}hB.prev=hB.next=null;hB.next=dr.zpp_pool;dr.zpp_pool=hB;e8.end=null;fx=gV}e8.end=fx}else{var hS=e8.start.next;e8.start.x=hS.x;e8.start.y=hS.y;if(hS!=null&&hS.prev==hS){hS.next=hS.prev=null;var fj=hS;if(fj.wrap!=null){fj.wrap.zpp_inner._inuse=false;var fQ=fj.wrap;var gH=fQ.zpp_inner;fQ.zpp_inner.outer=null;fQ.zpp_inner=null;fQ.zpp_pool=au.poolVec2;au.poolVec2=fQ;if(gH.outer!=null){gH.outer.zpp_inner=null;gH.outer=null}gH._isimmutable=null;gH._validate=null;gH._invalidate=null;gH.next=bB.zpp_pool;bB.zpp_pool=gH;fj.wrap=null}fj.prev=fj.next=null;fj.next=dr.zpp_pool;dr.zpp_pool=fj;hS=null}else{hS.prev.next=hS.next;hS.next.prev=hS.prev;hS.next=hS.prev=null;var fg=hS;if(fg.wrap!=null){fg.wrap.zpp_inner._inuse=false;var fP=fg.wrap;var gC=fP.zpp_inner;fP.zpp_inner.outer=null;fP.zpp_inner=null;fP.zpp_pool=au.poolVec2;au.poolVec2=fP;if(gC.outer!=null){gC.outer.zpp_inner=null;gC.outer=null}gC._isimmutable=null;gC._validate=null;gC._invalidate=null;gC.next=bB.zpp_pool;bB.zpp_pool=gC;fg.wrap=null}fg.prev=fg.next=null;fg.next=dr.zpp_pool;dr.zpp_pool=fg}}}e8.end.next.prev=e8.start.prev;e8.start.prev.next=e8.end.next;e8.end.next=e8.start;e8.start.prev=e8.end;var fK;if(e8.path0==e8.path0.parent){fK=e8.path0}else{var hA=e8.path0;var gw=null;while(hA!=hA.parent){var hn=hA.parent;hA.parent=gw;gw=hA;hA=hn}while(gw!=null){var hm=gw.parent;gw.parent=hA;gw=hm}fK=hA}var ec;if(e8.path1==e8.path1.parent){ec=e8.path1}else{var hy=e8.path1;var gu=null;while(hy!=hy.parent){var hk=hy.parent;hy.parent=gu;gu=hy;hy=hk}while(gu!=null){var gR=gu.parent;gu.parent=hy;gu=gR}ec=hy}if(fK!=ec){if(fK.rankec.rank){ec.parent=fK}else{ec.parent=fK;fK.rank++}}}}}}e8.end=e8.start=null;e8.path0=e8.path1=null;e8.next=c3.zpp_pool;c3.zpp_pool=e8;eZ.end=eZ.start=null;eZ.path0=eZ.path1=null;eZ.next=c3.zpp_pool;c3.zpp_pool=eZ}var fV=hR==null?new u():hR;var eC=az.paths.head;while(eC!=null){var hd=eC.elt;var gf;if(hd==hd.parent){gf=hd}else{var hx=hd;var hc=null;while(hx!=hx.parent){var gL=hx.parent;hx.parent=hc;hc=hx;hx=gL}while(hc!=null){var gG=hc.parent;hc.parent=hx;hc=gG}gf=hx}if(gf.used){eC=eC.next;continue}gf.used=true;var ha=gf.vert;var ga=true;while(gf.vert!=null&&(ga||ha!=gf.vert)){ga=false;if(ha.x==ha.next.x&&ha.y==ha.next.y){if(ha==gf.vert){gf.vert=ha.next==ha?null:ha.next;ga=true}if(ha!=null&&ha.prev==ha){ha.next=ha.prev=null;ha=null;ha=ha}else{var gQ=ha.next;ha.prev.next=ha.next;ha.next.prev=ha.prev;ha.next=ha.prev=null;ha=null;ha=gQ}}else{ha=ha.next}}if(gf.vert!=null){var e5=a7.get();e5.zpp_inner.vertices=gf.vert;if(fV.zpp_inner.reverse_flag){fV.push(e5)}else{fV.unshift(e5)}}eC=eC.next}while(az.paths.head!=null){var g8=az.paths.pop_unsafe();g8.vert=null;g8.parent=null;g8.next=E.zpp_pool;E.zpp_pool=g8}while(hM!=null){if(hM!=null&&hM.prev==hM){hM.next=hM.prev=null;var fe=hM;fe.vert=null;fe.parent=null;fe.next=E.zpp_pool;E.zpp_pool=fe;hM=null;hM=hM}else{var gK=hM.next;hM.prev.next=hM.next;hM.next.prev=hM.prev;hM.next=hM.prev=null;var fb=hM;fb.vert=null;fb.parent=null;fb.next=E.zpp_pool;E.zpp_pool=fb;hM=null;hM=gK}}return fV};az.prototype.__class__=az;var bM=zpp_nape.geom.ZPP_Geom=function(){};bM.__name__=["zpp_nape","geom","ZPP_Geom"];bM.validateShape=function(eQ){if(eQ.type==1){var ea=eQ.polygon;if(ea.zip_gaxi){if(ea.body!=null){ea.zip_gaxi=false;ea.validate_laxi();var eO=ea.body;if(eO.zip_axis){eO.zip_axis=false;eO.axisx=Math.sin(eO.rot);eO.axisy=Math.cos(eO.rot)}if(ea.zip_gverts){if(ea.body!=null){ea.zip_gverts=false;ea.validate_lverts();var eM=ea.body;if(eM.zip_axis){eM.zip_axis=false;eM.axisx=Math.sin(eM.rot);eM.axisy=Math.cos(eM.rot)}var ev=ea.lverts.next;var eb=ea.gverts.next;while(eb!=null){var eU=eb;var eS=ev;ev=ev.next;eU.x=ea.body.posx+(ea.body.axisy*eS.x-ea.body.axisx*eS.y);eU.y=ea.body.posy+(eS.x*ea.body.axisx+eS.y*ea.body.axisy);eb=eb.next}}}var eV=ea.edges.head;var ej=ea.gverts.next;var eN=ej;ej=ej.next;while(ej!=null){var eL=ej;var eW=eV.elt;eV=eV.next;eW.gp0=eN;eW.gp1=eL;eW.gnormx=ea.body.axisy*eW.lnormx-ea.body.axisx*eW.lnormy;eW.gnormy=eW.lnormx*ea.body.axisx+eW.lnormy*ea.body.axisy;eW.gprojection=ea.body.posx*eW.gnormx+ea.body.posy*eW.gnormy+eW.lprojection;if(eW.wrap_gnorm!=null){eW.wrap_gnorm.zpp_inner.x=eW.gnormx;eW.wrap_gnorm.zpp_inner.y=eW.gnormy}eW.tp0=eW.gp0.y*eW.gnormx-eW.gp0.x*eW.gnormy;eW.tp1=eW.gp1.y*eW.gnormx-eW.gp1.x*eW.gnormy;eN=eL;ej=ej.next}var el=eV.elt;el.gp0=eN;el.gp1=ea.gverts.next;el.gnormx=ea.body.axisy*el.lnormx-ea.body.axisx*el.lnormy;el.gnormy=el.lnormx*ea.body.axisx+el.lnormy*ea.body.axisy;el.gprojection=ea.body.posx*el.gnormx+ea.body.posy*el.gnormy+el.lprojection;if(el.wrap_gnorm!=null){el.wrap_gnorm.zpp_inner.x=el.gnormx;el.wrap_gnorm.zpp_inner.y=el.gnormy}el.tp0=el.gp0.y*el.gnormx-el.gp0.x*el.gnormy;el.tp1=el.gp1.y*el.gnormx-el.gp1.x*el.gnormy}}}if(eQ.zip_aabb){if(eQ.body!=null){eQ.zip_aabb=false;if(eQ.type==0){var eK=eQ.circle;if(eK.zip_worldCOM){if(eK.body!=null){eK.zip_worldCOM=false;if(eK.zip_localCOM){eK.zip_localCOM=false;if(eK.type==1){var eI=eK.polygon;if(eI.lverts.next.next==null){eI.localCOMx=eI.lverts.next.x;eI.localCOMy=eI.lverts.next.y}else{if(eI.lverts.next.next.next==null){eI.localCOMx=eI.lverts.next.x;eI.localCOMy=eI.lverts.next.y;eI.localCOMx+=eI.lverts.next.next.x;eI.localCOMy+=eI.lverts.next.next.y;eI.localCOMx*=0.5;eI.localCOMy*=0.5}else{eI.localCOMx=0;eI.localCOMy=0;var et=0;var ei=eI.lverts.next;var ee=ei;ei=ei.next;var eZ=ei;ei=ei.next;while(ei!=null){var eJ=ei;et+=eZ.x*(eJ.y-ee.y);var eq=eJ.y*eZ.x-eJ.x*eZ.y;eI.localCOMx+=(eZ.x+eJ.x)*eq;eI.localCOMy+=(eZ.y+eJ.y)*eq;ee=eZ;eZ=eJ;ei=ei.next}ei=eI.lverts.next;var ew=ei;et+=eZ.x*(ew.y-ee.y);var eH=ew.y*eZ.x-ew.x*eZ.y;eI.localCOMx+=(eZ.x+ew.x)*eH;eI.localCOMy+=(eZ.y+ew.y)*eH;ee=eZ;ei=ei.next;var eu=ei;et+=ew.x*(eu.y-ee.y);var eF=eu.y*ew.x-eu.x*ew.y;eI.localCOMx+=(ew.x+eu.x)*eF;eI.localCOMy+=(ew.y+eu.y)*eF;et=1/(3*et);var eP=et;eI.localCOMx*=eP;eI.localCOMy*=eP}}}if(eK.wrap_localCOM!=null){eK.wrap_localCOM.zpp_inner.x=eK.localCOMx;eK.wrap_localCOM.zpp_inner.y=eK.localCOMy}}var eG=eK.body;if(eG.zip_axis){eG.zip_axis=false;eG.axisx=Math.sin(eG.rot);eG.axisy=Math.cos(eG.rot)}eK.worldCOMx=eK.body.posx+(eK.body.axisy*eK.localCOMx-eK.body.axisx*eK.localCOMy);eK.worldCOMy=eK.body.posy+(eK.localCOMx*eK.body.axisx+eK.localCOMy*eK.body.axisy)}}var en=eK.radius;var em=eK.radius;eK.aabb.minx=eK.worldCOMx-en;eK.aabb.miny=eK.worldCOMy-em;eK.aabb.maxx=eK.worldCOMx+en;eK.aabb.maxy=eK.worldCOMy+em}else{var eE=eQ.polygon;if(eE.zip_gverts){if(eE.body!=null){eE.zip_gverts=false;eE.validate_lverts();var eC=eE.body;if(eC.zip_axis){eC.zip_axis=false;eC.axisx=Math.sin(eC.rot);eC.axisy=Math.cos(eC.rot)}var eD=eE.lverts.next;var eh=eE.gverts.next;while(eh!=null){var eT=eh;var ec=eD;eD=eD.next;eT.x=eE.body.posx+(eE.body.axisy*ec.x-eE.body.axisx*ec.y);eT.y=eE.body.posy+(ec.x*eE.body.axisx+ec.y*eE.body.axisy);eh=eh.next}}}var eX=eE.gverts.next;eE.aabb.minx=eX.x;eE.aabb.miny=eX.y;eE.aabb.maxx=eX.x;eE.aabb.maxy=eX.y;var eg=eE.gverts.next.next;while(eg!=null){var eR=eg;if(eR.xeE.aabb.maxx){eE.aabb.maxx=eR.x}if(eR.yeE.aabb.maxy){eE.aabb.maxy=eR.y}eg=eg.next}}}}if(eQ.zip_worldCOM){if(eQ.body!=null){eQ.zip_worldCOM=false;if(eQ.zip_localCOM){eQ.zip_localCOM=false;if(eQ.type==1){var eA=eQ.polygon;if(eA.lverts.next.next==null){eA.localCOMx=eA.lverts.next.x;eA.localCOMy=eA.lverts.next.y}else{if(eA.lverts.next.next.next==null){eA.localCOMx=eA.lverts.next.x;eA.localCOMy=eA.lverts.next.y;eA.localCOMx+=eA.lverts.next.next.x;eA.localCOMy+=eA.lverts.next.next.y;eA.localCOMx*=0.5;eA.localCOMy*=0.5}else{eA.localCOMx=0;eA.localCOMy=0;var ek=0;var ef=eA.lverts.next;var ed=ef;ef=ef.next;var eY=ef;ef=ef.next;while(ef!=null){var es=ef;ek+=eY.x*(es.y-ed.y);var eB=es.y*eY.x-es.x*eY.y;eA.localCOMx+=(eY.x+es.x)*eB;eA.localCOMy+=(eY.y+es.y)*eB;ed=eY;eY=es;ef=ef.next}ef=eA.lverts.next;var ep=ef;ek+=eY.x*(ep.y-ed.y);var ez=ep.y*eY.x-ep.x*eY.y;eA.localCOMx+=(eY.x+ep.x)*ez;eA.localCOMy+=(eY.y+ep.y)*ez;ed=eY;ef=ef.next;var eo=ef;ek+=ep.x*(eo.y-ed.y);var ey=eo.y*ep.x-eo.x*ep.y;eA.localCOMx+=(ep.x+eo.x)*ey;eA.localCOMy+=(ep.y+eo.y)*ey;ek=1/(3*ek);var er=ek;eA.localCOMx*=er;eA.localCOMy*=er}}}if(eQ.wrap_localCOM!=null){eQ.wrap_localCOM.zpp_inner.x=eQ.localCOMx;eQ.wrap_localCOM.zpp_inner.y=eQ.localCOMy}}var ex=eQ.body;if(ex.zip_axis){ex.zip_axis=false;ex.axisx=Math.sin(ex.rot);ex.axisy=Math.cos(ex.rot)}eQ.worldCOMx=eQ.body.posx+(eQ.body.axisy*eQ.localCOMx-eQ.body.axisx*eQ.localCOMy);eQ.worldCOMy=eQ.body.posy+(eQ.localCOMx*eQ.body.axisx+eQ.localCOMy*eQ.body.axisy)}}};bM.prototype.__class__=bM;var dr=zpp_nape.geom.ZPP_GeomVert=function(){this.forced=false;this.wrap=null;this.next=null;this.prev=null;this.y=0;this.x=0};dr.__name__=["zpp_nape","geom","ZPP_GeomVert"];dr.get=function(ea,ec){var eb;if(dr.zpp_pool==null){eb=new dr()}else{eb=dr.zpp_pool;dr.zpp_pool=eb.next;eb.next=null}eb.forced=false;eb.x=ea;eb.y=ec;return eb};dr.prototype.x=null;dr.prototype.y=null;dr.prototype.prev=null;dr.prototype.next=null;dr.prototype.wrap=null;dr.prototype.forced=null;dr.prototype.free=function(){if(this.wrap!=null){this.wrap.zpp_inner._inuse=false;var eb=this.wrap;var ea=eb.zpp_inner;eb.zpp_inner.outer=null;eb.zpp_inner=null;eb.zpp_pool=au.poolVec2;au.poolVec2=eb;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea._isimmutable=null;ea._validate=null;ea._invalidate=null;ea.next=bB.zpp_pool;bB.zpp_pool=ea;this.wrap=null}this.prev=this.next=null};dr.prototype.alloc=function(){this.forced=false};dr.prototype.wrapper=function(){if(this.wrap==null){var ea=this.x;var eh=this.y;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap=eb;this.wrap.zpp_inner._inuse=true;this.wrap.zpp_inner._invalidate=dX(this,this.modwrap);this.wrap.zpp_inner._validate=dX(this,this.getwrap)}return this.wrap};dr.prototype.modwrap=function(ea){this.x=ea.x;this.y=ea.y};dr.prototype.getwrap=function(){this.wrap.zpp_inner.x=this.x;this.wrap.zpp_inner.y=this.y};dr.prototype.__class__=dr;var b5=zpp_nape.geom.ZPP_GeomPoly=function(ea){this.vertices=null;this.outer=null;this.outer=ea};b5.__name__=["zpp_nape","geom","ZPP_GeomPoly"];b5.prototype.outer=null;b5.prototype.vertices=null;b5.prototype.__class__=b5;var dn=zpp_nape.geom.ZPP_GeomVertexIterator=function(){this.next=null;this.outer=null;this.forward=false;this.first=false;this.start=null;this.ptr=null;this.outer=new cz()};dn.__name__=["zpp_nape","geom","ZPP_GeomVertexIterator"];dn.get=function(ec,eb){var ea;if(dn.zpp_pool==null){ea=new dn()}else{ea=dn.zpp_pool;dn.zpp_pool=ea.next;ea.next=null}ea.outer.zpp_inner=ea;ea.ptr=ec;ea.forward=eb;ea.start=ec;ea.first=ec!=null;return ea.outer};dn.prototype.ptr=null;dn.prototype.start=null;dn.prototype.first=null;dn.prototype.forward=null;dn.prototype.outer=null;dn.prototype.next=null;dn.prototype.free=function(){this.outer.zpp_inner=null;this.ptr=this.start=null};dn.prototype.alloc=function(){};dn.prototype.__class__=dn;var W=zpp_nape.geom.ZPP_MarchSpan=function(){this.next=null;this.out=false;this.rank=0;this.parent=null;this.parent=this};W.__name__=["zpp_nape","geom","ZPP_MarchSpan"];W.prototype.parent=null;W.prototype.rank=null;W.prototype.out=null;W.prototype.next=null;W.prototype.free=function(){this.parent=this};W.prototype.alloc=function(){this.out=false;this.rank=0};W.prototype.__class__=W;var T=zpp_nape.geom.ZPP_MarchPair=function(){this.next=null;this.spanr=null;this.span2=null;this.span1=null;this.pd=null;this.okeyr=0;this.keyr=0;this.pr=null;this.okey2=0;this.key2=0;this.p2=null;this.okey1=0;this.key1=0;this.p1=null};T.__name__=["zpp_nape","geom","ZPP_MarchPair"];T.prototype.p1=null;T.prototype.key1=null;T.prototype.okey1=null;T.prototype.p2=null;T.prototype.key2=null;T.prototype.okey2=null;T.prototype.pr=null;T.prototype.keyr=null;T.prototype.okeyr=null;T.prototype.pd=null;T.prototype.span1=null;T.prototype.span2=null;T.prototype.spanr=null;T.prototype.next=null;T.prototype.free=function(){this.p1=this.p2=this.pr=this.pd=null;this.span1=this.span2=this.spanr=null};T.prototype.alloc=function(){};T.prototype.__class__=T;var bc=zpp_nape.geom.ZPP_MarchingSquares=function(){};bc.__name__=["zpp_nape","geom","ZPP_MarchingSquares"];bc.isos=null;bc.ints=null;bc.map=null;bc.run=function(fe,eI,en,eG,ek,eR,fE,fR,e6){var ex=eG-eI;var eK=eR.zpp_inner;if(eK._validate!=null){eK._validate()}var fP=ex/eR.zpp_inner.x;var fQ=fP|0;var eF=ek-en;var fc=eR.zpp_inner;if(fc._validate!=null){fc._validate()}var fB=eF/eR.zpp_inner.y;var fC=fB|0;if(fP!=fQ){++fQ}if(fB!=fC){++fC}if(fR){if(bc.map==null){bc.map=new ae(fQ,fC)}else{bc.map.resize(fQ,fC,null)}}if(bc.isos==null){bc.isos=new cb(fQ+1,fC+1)}else{bc.isos.resize(fQ+1,fC+1,0)}var er=0;var eq=fC+1;while(er>5;var e9=0;if((fW&1)!=0){e9=1}if((fW&2)!=0){++e9}if((fW&4)!=0){++e9}eE=e9>=2}else{eE=false}if(eE){bc.me.combLR(fd,eL);eL.span1=fd.spanr}else{if(W.zpp_pool==null){eL.span1=new W()}else{eL.span1=W.zpp_pool;W.zpp_pool=eL.span1.next;eL.span1.next=null}var e2=eL.span1;e2.out=false;e2.rank=0;eL.span1.next=fz;fz=eL.span1}if(eL.p2!=null){if(W.zpp_pool==null){eL.span2=new W()}else{eL.span2=W.zpp_pool;W.zpp_pool=eL.span2.next;eL.span2.next=null}var e1=eL.span2;e1.out=false;e1.rank=0;eL.span2.next=fz;fz=eL.span2;eL.spanr=eL.span2}else{eL.spanr=eL.span1}var fr=(eL.keyr&28)>>2;var ev=0;if((fr&1)!=0){ev=1}if((fr&2)!=0){++ev}if((fr&4)!=0){++ev}if(ev>=2){fd=eL}else{fd=null}}else{bc.me.output(e6,eL.p1);if(eL.p2!=null){bc.me.output(e6,eL.p2)}eL.p1=eL.p2=eL.pr=eL.pd=null;eL.span1=eL.span2=eL.spanr=null;eL.next=T.zpp_pool;T.zpp_pool=eL}}}if(!fR){return}var ep=1;var eg=fC;while(ep>4;var et=0;if((fp&1)!=0){et=1}if((fp&2)!=0){++et}if((fp&4)!=0){++et}if(et<2){fu=null;continue}var fy=fj.p2!=null&&fj.okey2==56?fj.span2:fj.span1;var fg=fh.p2!=null&&fh.okey2==14?fh.span2:fh.span1;var eD;if(fy==fy.parent){eD=fy}else{var eX=fy;var ft=null;while(eX!=eX.parent){var ff=eX.parent;eX.parent=ft;ft=eX;eX=ff}while(ft!=null){var ei=ft.parent;ft.parent=eX;ft=ei}eD=eX}var eC;if(fg==fg.parent){eC=fg}else{var eW=fg;var fN=null;while(eW!=eW.parent){var ef=eW.parent;eW.parent=fN;fN=eW;eW=ef}while(fN!=null){var ee=fN.parent;fN.parent=eW;fN=ee}eC=eW}if(eD==eC){if(fu!=fg){bc.me.combUD_virtual(fj,fh)}}else{var fO;if(fy==fy.parent){fO=fy}else{var eV=fy;var fM=null;while(eV!=eV.parent){var ec=eV.parent;eV.parent=fM;fM=eV;eV=ec}while(fM!=null){var ea=fM.parent;fM.parent=eV;fM=ea}fO=eV}var fA;if(fg==fg.parent){fA=fg}else{var eU=fg;var fK=null;while(eU!=eU.parent){var fX=eU.parent;eU.parent=fK;fK=eU;eU=fX}while(fK!=null){var fV=fK.parent;fK.parent=eU;fK=fV}fA=eU}if(fO!=fA){if(fO.rankfA.rank){fA.parent=fO}else{fA.parent=fO;fO.rank++}}}bc.me.combUD(fj,fh)}if(((fg==fh.span2?fh.okey2:fh.okey1)&4)!=0){fu=fg}else{fu=null}}}var el=0;var ed=fC;while(el>5;var eb=0;if((ea&1)!=0){eb=1}if((ea&2)!=0){++eb}if((ea&4)!=0){++eb}return eb>=2};bc.prototype.combRight=function(ec){var ea=(ec&28)>>2;var eb=0;if((ea&1)!=0){eb=1}if((ea&2)!=0){++eb}if((ea&4)!=0){++eb}return eb>=2};bc.prototype.combUp=function(ec){var ea=ec&7;var eb=0;if((ea&1)!=0){eb=1}if((ea&2)!=0){++eb}if((ea&4)!=0){++eb}return eb>=2};bc.prototype.combDown=function(ec){var ea=(ec&112)>>4;var eb=0;if((ea&1)!=0){eb=1}if((ea&2)!=0){++eb}if((ea&4)!=0){++eb}return eb>=2};bc.prototype.comb=function(ea){var eb=0;if((ea&1)!=0){eb=1}if((ea&2)!=0){++eb}if((ea&4)!=0){++eb}return eb>=2};bc.prototype.marchSquare=function(iD,it,ex,fo,eP,fl,eM,iK,ir,ip,io,g9,g7,gS){var ej=0;var gi=it.list[ir*it.width+iK];if(gi<0){ej=8}var gg=it.list[ir*it.width+(iK+1)];if(gg<0){ej|=4}var gf=it.list[(ir+1)*it.width+(iK+1)];if(gf<0){ej|=2}var gd=it.list[(ir+1)*it.width+iK];if(gd<0){ej|=1}if(ej==0){return null}else{var gV;if(T.zpp_pool==null){gV=new T()}else{gV=T.zpp_pool;T.zpp_pool=gV.next;gV.next=null}if(ej!=10&&ej!=5){var h4=bc.look_march[ej];gV.okey1=h4;var en=0;while(en<8){var hQ=en++;if((h4&1<1){ec=1}}return ee+ec*(eb-ee)}}};bc.prototype.xlerp=function(ec,eb,eh,ek,ei,em,ej){var ef;if(ek==0){ef=ec}else{if(ei==0){ef=eb}else{var ea=ek-ei;var el=ea*ea1){el=1}}ef=ec+el*(eb-ec)}}while(ej--!=0&&ec1){ee=1}}ef=ec+ee*(eb-ec)}}}return ef};bc.prototype.ylerp=function(ei,ef,eg,ek,eh,em,ej){var eb;if(ek==0){eb=ei}else{if(eh==0){eb=ef}else{var ea=ek-eh;var el=ea*ea1){el=1}}eb=ei+el*(ef-ei)}}while(ej--!=0&&ei1){ed=1}}eb=ei+ed*(ef-ei)}}}return eb};bc.prototype.__class__=bc;var cm=zpp_nape.geom.ZPP_Mat23=function(){this.next=null;this._invalidate=null;this.ty=0;this.tx=0;this.d=0;this.c=0;this.b=0;this.a=0;this.outer=null};cm.__name__=["zpp_nape","geom","ZPP_Mat23"];cm.get=function(){var ea;if(cm.zpp_pool==null){ea=new cm()}else{ea=cm.zpp_pool;cm.zpp_pool=ea.next;ea.next=null}return ea};cm.identity=function(){var ea=cm.get();ea.setas(1,0,0,1,0,0);return ea};cm.prototype.outer=null;cm.prototype.wrapper=function(){if(this.outer==null){this.outer=new cI();var ea=this.outer.zpp_inner;ea.next=cm.zpp_pool;cm.zpp_pool=ea;this.outer.zpp_inner=this}return this.outer};cm.prototype.a=null;cm.prototype.b=null;cm.prototype.c=null;cm.prototype.d=null;cm.prototype.tx=null;cm.prototype.ty=null;cm.prototype._invalidate=null;cm.prototype.invalidate=function(){if(this._invalidate!=null){this._invalidate()}};cm.prototype.set=function(ea){this.setas(ea.a,ea.b,ea.c,ea.d,ea.tx,ea.ty)};cm.prototype.setas=function(ed,eb,ef,ee,ec,ea){this.tx=ec;this.ty=ea;this.a=ed;this.b=eb;this.c=ef;this.d=ee};cm.prototype.next=null;cm.prototype.free=function(){};cm.prototype.alloc=function(){};cm.prototype.__class__=cm;var bI=zpp_nape.geom.ZPP_MatMN=function(ea,ed){this.x=null;this.n=0;this.m=0;this.outer=null;this.m=ea;this.n=ed;this.x=[];var eb=0;var ec=ea*ed;while(ebed.y){return false}else{if(ee.xed.x){return false}else{var ea=aE.bisector(ee);var ec=aE.bisector(ed);ea.x+=ee.x;ea.y+=ee.y;ec.x+=ed.x;ec.y+=ed.y;var eb=ea.xeb.y)){if(ea.y==eb.y){return eb.next.yek.y){ek=ea}ec=ec.next;if(!(ec!=eh)){break}}}var ei=true;var eb=ed;if(ek!=ed.next){var eg=ed.next;var ej=ek;if(eg!=null){var ep=eg;while(true){var em=ep;if(em.y0;eG.type=aE.below(eG.prev,eG)?aE.below(eG.next,eG)?en?0:3:4:aE.below(eG,eG.next)?en?1:2:4;eb=eb.next;if(!(eb!=ef)){break}}}var eq=aE.queue;if(eq.head!=null&&eq.head.next!=null){var ej=eq.head;var eK=null;var ed=null;var eF=null;var eI=null;var em=1;var ec;var eA;var ea;while(true){ec=0;ed=ej;ej=null;eK=ej;while(ed!=null){++ec;eF=ed;eA=0;ea=em;while(eF!=null&&eA0||ea>0&&eF!=null){if(eA==0){eI=eF;eF=eF.next;--ea}else{if(ea==0||eF==null){eI=ed;ed=ed.next;--eA}else{if(aE.above(ed.elt,eF.elt)){eI=ed;ed=ed.next;--eA}else{eI=eF;eF=eF.next;--ea}}}if(eK!=null){eK.next=eI}else{ej=eI}eK=eI}ed=eF}eK.next=null;em<<=1;if(!(ec>1)){break}}eq.head=ej;eq.modified=true;eq.pushmod=true}if(aE.edges==null){if(b8.zpp_pool==null){aE.edges=new b8()}else{aE.edges=b8.zpp_pool;b8.zpp_pool=aE.edges.next;aE.edges.next=null}aE.edges.lt=ah.edge_lt;aE.edges.swapped=ah.edge_swap}while(aE.queue.head!=null){var eD=aE.queue.pop_unsafe();switch(eD.type){case 0:eD.helper=eD;eD.node=aE.edges.insert(eD);break;case 1:var eJ=eD.prev;if(eJ.helper.type==2){ey.add_diagonal(eD,eJ.helper)}aE.edges.remove_node(eJ.node);break;case 2:var es=eD.prev;if(es.helper.type==2){ey.add_diagonal(eD,es.helper)}aE.edges.remove_node(es.node);var ez=null;if(!aE.edges.empty()){var ew=aE.edges.parent;while(ew.prev!=null){ew=ew.prev}while(ew!=null){var eH=ew.data;if(!ah.vert_lt(eH,eD)){ez=eH;break}if(ew.next!=null){ew=ew.next;while(ew.prev!=null){ew=ew.prev}}else{while(ew.parent!=null&&ew==ew.parent.next){ew=ew.parent}ew=ew.parent}}}var er=ez;if(er!=null){if(er.helper.type==2){ey.add_diagonal(eD,er.helper)}er.helper=eD}break;case 3:var eC=null;if(!aE.edges.empty()){var el=aE.edges.parent;while(el.prev!=null){el=el.prev}while(el!=null){var ex=el.data;if(!ah.vert_lt(ex,eD)){eC=ex;break}if(el.next!=null){el=el.next;while(el.prev!=null){el=el.prev}}else{while(el.parent!=null&&el==el.parent.next){el=el.parent}el=el.parent}}}var ep=eC;if(ep!=null){ey.add_diagonal(eD,ep.helper);ep.helper=eD}eD.node=aE.edges.insert(eD);eD.helper=eD;break;case 4:var eE=eD.prev;if(aE.left_vertex(eD)){if(eE.helper.type==2){ey.add_diagonal(eD,eE.helper)}aE.edges.remove_node(eE.node);eD.node=aE.edges.insert(eD);eD.helper=eD}else{var eB=null;if(!aE.edges.empty()){var ek=aE.edges.parent;while(ek.prev!=null){ek=ek.prev}while(ek!=null){var ev=ek.data;if(!ah.vert_lt(ev,eD)){eB=ev;break}if(ek.next!=null){ek=ek.next;while(ek.prev!=null){ek=ek.prev}}else{while(ek.parent!=null&&ek==ek.parent.next){ek=ek.parent}ek=ek.parent}}}var eo=eB;if(eo.helper.type==2){ey.add_diagonal(eD,eo.helper)}eo.helper=eD}break}}return ey};aE.prototype.__class__=aE;var ah=zpp_nape.geom.ZPP_PartitionVertex=function(){this.node=null;this.prev=null;this.next=null;this.rightchain=false;this.helper=null;this.type=0;this.diagonals=null;this.forced=false;this.y=0;this.x=0;this.mag=0;this.id=0;this.id=ah.nextId++;this.diagonals=new dO()};ah.__name__=["zpp_nape","geom","ZPP_PartitionVertex"];ah.get=function(ea){var eb;if(ah.zpp_pool==null){eb=new ah()}else{eb=ah.zpp_pool;ah.zpp_pool=eb.next;eb.next=null}eb.x=ea.x;eb.y=ea.y;return eb};ah.rightdistance=function(ef,eb){var eg=ef.next.y>ef.y;var ec=0;var ea=0;ec=ef.next.x-ef.x;ea=ef.next.y-ef.y;var ee=0;var ed=0;ee=eb.x-ef.x;ed=eb.y-ef.y;return(eg?-1:1)*(ed*ec-ee*ea)};ah.vert_lt=function(ec,eb){if(eb==ec||eb==ec.next){return true}else{if(ec.y==ec.next.y){var ea=ec.x;var ed=ec.next.x;return(eaem?eo:em;var ef=ed.x;var en=ed.next.x;return ei>(ef>en?ef:en)}else{if(!(ah.rightdistance(ed,ee)>0)){return ah.rightdistance(ed,ee.next)>0}else{return true}}}else{var eg=ah.rightdistance(ee,ed);var ej=ah.rightdistance(ee,ed.next);if(eg==0&&ej==0){var ec=ee.x;var el=ee.next.x;var eh=ec>el?ec:el;var eb=ed.x;var ek=ed.next.x;return eh>(eb>ek?eb:ek)}if(eg*ej>=0){if(!(eg<0)){return ej<0}else{return true}}var ep=ah.rightdistance(ed,ee);var ea=ah.rightdistance(ed,ee.next);if(ep*ea>=0){if(!(ep>0)){return ea>0}else{return true}}return false}}}};ah.prototype.id=null;ah.prototype.mag=null;ah.prototype.x=null;ah.prototype.y=null;ah.prototype.forced=null;ah.prototype.diagonals=null;ah.prototype.type=null;ah.prototype.helper=null;ah.prototype.rightchain=null;ah.prototype.next=null;ah.prototype.prev=null;ah.prototype.alloc=function(){};ah.prototype.free=function(){this.helper=null};ah.prototype.copy=function(){var ea;if(ah.zpp_pool==null){ea=new ah()}else{ea=ah.zpp_pool;ah.zpp_pool=ea.next;ea.next=null}ea.x=this.x;ea.y=this.y;ea.forced=this.forced;return ea};ah.prototype.sort=function(){var ej=0;var eh=0;var ep=0;var eo=0;ej=this.prev.x-this.x;eh=this.prev.y-this.y;ep=this.next.x-this.x;eo=this.next.y-this.y;var ex=eo*ej-ep*eh;var em=ex>0?-1:ex==0?0:1;var eq=this.diagonals;if(eq.head!=null&&eq.head.next!=null){var eg=eq.head;var en=null;var eb=null;var et=null;var ee=null;var ea=1;var es;var er;var ed;while(true){es=0;eb=eg;eg=null;en=eg;while(eb!=null){++es;et=eb;er=0;ed=ea;while(et!=null&&er0||ed>0&&et!=null){if(er==0){ee=et;et=et.next;--ed}else{if(ed==0||et==null){ee=eb;eb=eb.next;--er}else{var eu;if(em==1){ej=eb.elt.x-this.x;eh=eb.elt.y-this.y;ep=et.elt.x-this.x;eo=et.elt.y-this.y;var el=eo*ej-ep*eh;eu=(el>0?-1:el==0?0:1)==1}else{ej=this.prev.x-this.x;eh=this.prev.y-this.y;ep=eb.elt.x-this.x;eo=eb.elt.y-this.y;var ei=eo*ej-ep*eh;var ey=ei>0?-1:ei==0?0:1;ej=this.prev.x-this.x;eh=this.prev.y-this.y;ep=et.elt.x-this.x;eo=et.elt.y-this.y;var ef=eo*ej-ep*eh;var ew=ef>0?-1:ef==0?0:1;if(ey*ew==1||ey*ew==0&&(ey==1||ew==1)){ej=eb.elt.x-this.x;eh=eb.elt.y-this.y;ep=et.elt.x-this.x;eo=et.elt.y-this.y;var ec=eo*ej-ep*eh;eu=(ec>0?-1:ec==0?0:1)==1}else{if(ey==-1||ew==-1){eu=ew==-1}else{if(ey==0&&ew==0){ej=this.x-this.prev.x;eh=this.y-this.prev.y;ep=eb.elt.x-this.x;eo=eb.elt.y-this.y;var ev=ej*ep+eh*eo;ep=et.elt.x-this.x;eo=et.elt.y-this.y;var ek=ej*ep+eh*eo;if(ev<0&&ek>0){eu=true}else{if(ek<0&&ev>0){eu=false}else{eu=true}}}else{eu=true}}}}if(eu){ee=eb;eb=eb.next;--er}else{ee=et;et=et.next;--ed}}}if(en!=null){en.next=ee}else{eg=ee}en=ee}eb=et}en.next=null;ea<<=1;if(!(es>1)){break}}eq.head=eg;eq.modified=true;eq.pushmod=true}};ah.prototype.node=null;ah.prototype.__class__=ah;var a=zpp_nape.geom.ZPP_PartitionedPoly=function(ea){this.next=null;this.vertices=null;this.init(ea)};a.__name__=["zpp_nape","geom","ZPP_PartitionedPoly"];a.sharedPPList=null;a.getSharedPP=function(){if(a.sharedPPList==null){a.sharedPPList=new bu()}return a.sharedPPList};a.sharedGVList=null;a.getShared=function(){if(a.sharedGVList==null){a.sharedGVList=new dA()}return a.sharedGVList};a.prototype.vertices=null;a.prototype.eq=function(ec,ea){var ef=ec.x;var ee=ec.y;var eh=ea.x;var eg=ea.y;var ed=0;var eb=0;ed=ef-eh;eb=ee-eg;return ed*ed+eb*eb0;var ea=eh;while(true){var eg;if(ee){var ei;if(ah.zpp_pool==null){ei=new ah()}else{ei=ah.zpp_pool;ah.zpp_pool=ei.next;ei.next=null}ei.x=ea.x;ei.y=ea.y;var ef=ei;if(this.vertices==null){this.vertices=ef.prev=ef.next=ef}else{ef.prev=this.vertices;ef.next=this.vertices.next;this.vertices.next.prev=ef;this.vertices.next=ef}eg=ef}else{var ej;if(ah.zpp_pool==null){ej=new ah()}else{ej=ah.zpp_pool;ah.zpp_pool=ej.next;ej.next=null}ej.x=ea.x;ej.y=ea.y;var ec=ej;if(this.vertices==null){this.vertices=ec.prev=ec.next=ec}else{ec.next=this.vertices;ec.prev=this.vertices.prev;this.vertices.prev.next=ec;this.vertices.prev=ec}eg=ec}this.vertices=eg;this.vertices.forced=ea.forced;ea=ea.next;if(!(ea!=eh)){break}}this.remove_collinear_vertices()};a.prototype.remove_collinear_vertices=function(){var ec=this.vertices;var em=true;while(em||ec!=this.vertices){em=false;if(this.eq(ec,ec.next)){if(ec==this.vertices){this.vertices=ec.next;em=true}if(ec.forced){ec.next.forced=true}if(ec!=null&&ec.prev==ec){ec.next=ec.prev=null;var ee=ec;ee.helper=null;ee.next=ah.zpp_pool;ah.zpp_pool=ee;ec=null;ec=ec}else{var en=ec.next;ec.prev.next=ec.next;ec.next.prev=ec.prev;ec.next=ec.prev=null;var eg=ec;eg.helper=null;eg.next=ah.zpp_pool;ah.zpp_pool=eg;ec=null;ec=en}if(ec==null){this.vertices=null;break}}else{ec=ec.next}}if(this.vertices==null){return true}var ei;while(true){ei=false;ec=this.vertices;em=true;while(em||ec!=this.vertices){em=false;var eh=ec.prev;var eb=0;var ea=0;eb=ec.x-eh.x;ea=ec.y-eh.y;var ek=0;var ej=0;ek=ec.next.x-ec.x;ej=ec.next.y-ec.y;var el=ej*eb-ek*ea;if(el*el>=P.epsilon*P.epsilon){ec=ec.next}else{if(ec==this.vertices){this.vertices=ec.next;em=true}if(ec!=null&&ec.prev==ec){ec.next=ec.prev=null;var ef=ec;ef.helper=null;ef.next=ah.zpp_pool;ah.zpp_pool=ef;ec=null;ec=ec}else{var eo=ec.next;ec.prev.next=ec.next;ec.next.prev=ec.prev;ec.next=ec.prev=null;var ed=ec;ed.helper=null;ed.next=ah.zpp_pool;ah.zpp_pool=ed;ec=null;ec=eo}ei=true;if(ec==null){ei=false;this.vertices=null;break}}}if(!ei){break}}return this.vertices==null};a.prototype.add_diagonal=function(eb,ea){eb.diagonals.add(ea);ea.diagonals.add(eb);eb.forced=ea.forced=true};a.prototype.extract_partitions=function(eg){if(eg==null){eg=new bu()}if(this.vertices!=null){var ej=this.vertices;var eh=this.vertices;if(ej!=null){var ee=ej;while(true){ee.sort();ee=ee.next;if(!(ee!=eh)){break}}}this.pull_partitions(this.vertices,eg);while(this.vertices!=null){var ef;if(this.vertices!=null&&this.vertices.prev==this.vertices){this.vertices.next=this.vertices.prev=null;var ea=this.vertices;ea.helper=null;ea.next=ah.zpp_pool;ah.zpp_pool=ea;ef=this.vertices=null}else{var ei=this.vertices.next;this.vertices.prev.next=this.vertices.next;this.vertices.next.prev=this.vertices.prev;this.vertices.next=this.vertices.prev=null;var ec=this.vertices;ec.helper=null;ec.next=ah.zpp_pool;ah.zpp_pool=ec;this.vertices=null;ef=ei}this.vertices=ef}var ed=null;var eb=eg.head;while(eb!=null){if(eb.elt.remove_collinear_vertices()){eg.erase(ed);continue}ed=eb;eb=eb.next}}return eg};a.prototype.pull_partitions=function(ec,eh){var ea;if(a.zpp_pool==null){ea=new a()}else{ea=a.zpp_pool;a.zpp_pool=ea.next;ea.next=null}var ef=ec;while(true){var ek;if(ah.zpp_pool==null){ek=new ah()}else{ek=ah.zpp_pool;ah.zpp_pool=ek.next;ek.next=null}ek.x=ef.x;ek.y=ef.y;ek.forced=ef.forced;var ee=ek;if(ea.vertices==null){ea.vertices=ee.prev=ee.next=ee}else{ee.prev=ea.vertices;ee.next=ea.vertices.next;ea.vertices.next.prev=ee;ea.vertices.next=ee}ea.vertices=ee;ea.vertices.forced=ef.forced;if(ef.diagonals.head!=null){var eg=ef.diagonals;var ej=eg.head.elt;eg.pop();if(ej==ec){break}else{ef=this.pull_partitions(ef,eh)}}else{ef=ef.next}if(!(ef!=ec)){break}}var eb=0;var em=ea.vertices;var ei=ea.vertices;if(em!=null){var ed=em;while(true){var el=ed;eb+=el.x*(el.next.y-el.prev.y);ed=ed.next;if(!(ed!=ei)){break}}}if(eb*0.5!=0){eh.add(ea)}return ef};a.prototype.extract=function(eb){if(eb==null){eb=new dA()}if(this.vertices!=null){var ed=this.vertices;var ea=this.vertices;if(ed!=null){var ef=ed;while(true){ef.sort();ef=ef.next;if(!(ef!=ea)){break}}}this.pull(this.vertices,eb);while(this.vertices!=null){var ec;if(this.vertices!=null&&this.vertices.prev==this.vertices){this.vertices.next=this.vertices.prev=null;var eh=this.vertices;eh.helper=null;eh.next=ah.zpp_pool;ah.zpp_pool=eh;ec=this.vertices=null}else{var eg=this.vertices.next;this.vertices.prev.next=this.vertices.next;this.vertices.next.prev=this.vertices.prev;this.vertices.next=this.vertices.prev=null;var ee=this.vertices;ee.helper=null;ee.next=ah.zpp_pool;ah.zpp_pool=ee;this.vertices=null;ec=eg}this.vertices=ec}}return eb};a.prototype.pull=function(ec,eG){var eg=null;var ex=ec;while(true){var em=ex.x;var ek=ex.y;var eh;if(dr.zpp_pool==null){eh=new dr()}else{eh=dr.zpp_pool;dr.zpp_pool=eh.next;eh.next=null}eh.forced=false;eh.x=em;eh.y=ek;var es=eh;if(eg==null){eg=es.prev=es.next=es}else{es.prev=eg;es.next=eg.next;eg.next.prev=es;eg.next=es}eg=es;es.forced=ex.forced;if(ex.diagonals.head!=null){var eA=ex.diagonals;var ef=eA.head.elt;eA.pop();if(ef==ec){break}else{ex=this.pull(ex,eG)}}else{ex=ex.next}if(!(ex!=ec)){break}}var eF=0;var er=eg;var ej=eg;if(er!=null){var eE=er;while(true){var eq=eE;eF+=eq.x*(eq.next.y-eq.prev.y);eE=eE.next;if(!(eE!=ej)){break}}}var ez=eF*0.5;if(ez*ez>=P.epsilon*P.epsilon){var ew=eg;var ey=true;while(ey||ew!=eg){ey=false;var eo=ew.x;var el=ew.y;var eD=ew.next.x;var eB=ew.next.y;var ep=0;var en=0;ep=eo-eD;en=el-eB;if(ep*ep+en*en=P.epsilon*P.epsilon){ew=ew.next}else{if(ew==eg){eg=ew.next;ey=true}if(ew!=null&&ew.prev==ew){ew.next=ew.prev=null;ew=null;ew=ew}else{var ea=ew.next;ew.prev.next=ew.next;ew.next.prev=ew.prev;ew.next=ew.prev=null;ew=null;ew=ea}eC=true;if(ew==null){eC=false;eg=null;break}}}if(!eC){break}}}if(eg!=null){eG.add(eg)}}return ex};a.prototype.__class__=a;var bf=zpp_nape.geom.ZPP_Ray=function(){this.zip_dir=false;this.absnormaly=0;this.absnormalx=0;this.normaly=0;this.normalx=0;this.idiry=0;this.idirx=0;this.diry=0;this.dirx=0;this.originy=0;this.originx=0;this.userData=null;this.maxdist=0;this.direction=null;this.origin=null;var eh;if(au.poolVec2==null){eh=new r()}else{eh=au.poolVec2;au.poolVec2=eh.zpp_pool;eh.zpp_pool=null}if(eh.zpp_inner==null){var el;if(bB.zpp_pool==null){el=new bB()}else{el=bB.zpp_pool;bB.zpp_pool=el.next;el.next=null}el.weak=false;el._immutable=false;el.x=0;el.y=0;eh.zpp_inner=el;eh.zpp_inner.outer=eh}else{var eb;var ef=eh.zpp_inner;if(ef._validate!=null){ef._validate()}if(eh.zpp_inner.x==0){var ei=eh.zpp_inner;if(ei._validate!=null){ei._validate()}eb=eh.zpp_inner.y==0}else{eb=false}if(!eb){eh.zpp_inner.x=0;eh.zpp_inner.y=0;var eg=eh.zpp_inner;if(eg._invalidate!=null){eg._invalidate(eg)}}}eh.zpp_inner.weak=false;this.origin=eh;this.origin.zpp_inner._invalidate=dX(this,this.origin_invalidate);var ek;if(au.poolVec2==null){ek=new r()}else{ek=au.poolVec2;au.poolVec2=ek.zpp_pool;ek.zpp_pool=null}if(ek.zpp_inner==null){var ej;if(bB.zpp_pool==null){ej=new bB()}else{ej=bB.zpp_pool;bB.zpp_pool=ej.next;ej.next=null}ej.weak=false;ej._immutable=false;ej.x=0;ej.y=0;ek.zpp_inner=ej;ek.zpp_inner.outer=ek}else{var ea;var ee=ek.zpp_inner;if(ee._validate!=null){ee._validate()}if(ek.zpp_inner.x==0){var ed=ek.zpp_inner;if(ed._validate!=null){ed._validate()}ea=ek.zpp_inner.y==0}else{ea=false}if(!ea){ek.zpp_inner.x=0;ek.zpp_inner.y=0;var ec=ek.zpp_inner;if(ec._invalidate!=null){ec._invalidate(ec)}}}ek.zpp_inner.weak=false;this.direction=ek;this.direction.zpp_inner._invalidate=dX(this,this.direction_invalidate);this.originx=0;this.originy=0;this.dirx=0;this.diry=0;this.zip_dir=false};bf.__name__=["zpp_nape","geom","ZPP_Ray"];bf.prototype.origin=null;bf.prototype.direction=null;bf.prototype.maxdist=null;bf.prototype.userData=null;bf.prototype.originx=null;bf.prototype.originy=null;bf.prototype.dirx=null;bf.prototype.diry=null;bf.prototype.idirx=null;bf.prototype.idiry=null;bf.prototype.normalx=null;bf.prototype.normaly=null;bf.prototype.absnormalx=null;bf.prototype.absnormaly=null;bf.prototype.origin_invalidate=function(ea){this.originx=ea.x;this.originy=ea.y};bf.prototype.direction_invalidate=function(ea){this.dirx=ea.x;this.diry=ea.y;this.zip_dir=true};bf.prototype.zip_dir=null;bf.prototype.invalidate_dir=function(){this.zip_dir=true};bf.prototype.validate_dir=function(){if(this.zip_dir){this.zip_dir=false;var ec=1/Math.sqrt(this.dirx*this.dirx+this.diry*this.diry);this.dirx*=ec;this.diry*=ec;this.idirx=1/this.dirx;this.idiry=1/this.diry;this.normalx=-this.diry;this.normaly=this.dirx;var ea=this.normalx;this.absnormalx=ea<0?-ea:ea;var eb=this.normaly;this.absnormaly=eb<0?-eb:eb}};bf.prototype.rayAABB=function(){var ed=this.originx;var eb=ed;var eg=this.originy;var ee=eg;if(this.maxdist>=Infinity){if(this.dirx>0){eb=Infinity}else{if(this.dirx<0){eb=-Infinity}}if(this.diry>0){ee=Infinity}else{if(this.diry<0){ee=-Infinity}}}else{eb+=this.maxdist*this.dirx;ee+=this.maxdist*this.diry}if(eb=ek.minx&&this.originx<=ek.maxx;var eb=this.originy>=ek.miny&&this.originy<=ek.maxy;if(ec&&eb){return 0}else{var eg=-1;while(!(this.dirx>=0&&this.originx>=ek.maxx)){if(this.dirx<=0&&this.originx<=ek.minx){break}if(this.diry>=0&&this.originy>=ek.maxy){break}if(this.diry<=0&&this.originy<=ek.miny){break}if(this.dirx>0){var el=(ek.minx-this.originx)*this.idirx;if(el>=0&&el<=this.maxdist){var eh=this.originy+el*this.diry;if(eh>=ek.miny&&eh<=ek.maxy){eg=el;break}}}else{if(this.dirx<0){var ef=(ek.maxx-this.originx)*this.idirx;if(ef>=0&&ef<=this.maxdist){var ej=this.originy+ef*this.diry;if(ej>=ek.miny&&ej<=ek.maxy){eg=ef;break}}}}if(this.diry>0){var ee=(ek.miny-this.originy)*this.idiry;if(ee>=0&&ee<=this.maxdist){var ei=this.originx+ee*this.dirx;if(ei>=ek.minx&&ei<=ek.maxx){eg=ee;break}}}else{if(this.diry<0){var ed=(ek.maxy-this.originy)*this.idiry;if(ed>=0&&ed<=this.maxdist){var ea=this.originx+ed*this.dirx;if(ea>=ek.minx&&ea<=ek.maxx){eg=ed;break}}}}break}return eg}};bf.prototype.circlesect=function(eZ,em,el){if(eZ.zip_worldCOM){if(eZ.body!=null){eZ.zip_worldCOM=false;if(eZ.zip_localCOM){eZ.zip_localCOM=false;if(eZ.type==1){var eb=eZ.polygon;if(eb.lverts.next.next==null){eb.localCOMx=eb.lverts.next.x;eb.localCOMy=eb.lverts.next.y}else{if(eb.lverts.next.next.next==null){eb.localCOMx=eb.lverts.next.x;eb.localCOMy=eb.lverts.next.y;eb.localCOMx+=eb.lverts.next.next.x;eb.localCOMy+=eb.lverts.next.next.y;eb.localCOMx*=0.5;eb.localCOMy*=0.5}else{eb.localCOMx=0;eb.localCOMy=0;var et=0;var ec=eb.lverts.next;var eQ=ec;ec=ec.next;var eO=ec;ec=ec.next;while(ec!=null){var eM=ec;et+=eO.x*(eM.y-eQ.y);var eq=eM.y*eO.x-eM.x*eO.y;eb.localCOMx+=(eO.x+eM.x)*eq;eb.localCOMy+=(eO.y+eM.y)*eq;eQ=eO;eO=eM;ec=ec.next}ec=eb.lverts.next;var ex=ec;et+=eO.x*(ex.y-eQ.y);var eI=ex.y*eO.x-ex.x*eO.y;eb.localCOMx+=(eO.x+ex.x)*eI;eb.localCOMy+=(eO.y+ex.y)*eI;eQ=eO;ec=ec.next;var ev=ec;et+=ex.x*(ev.y-eQ.y);var eG=ev.y*ex.x-ev.x*ex.y;eb.localCOMx+=(ex.x+ev.x)*eG;eb.localCOMy+=(ex.y+ev.y)*eG;et=1/(3*et);var eS=et;eb.localCOMx*=eS;eb.localCOMy*=eS}}}if(eZ.wrap_localCOM!=null){eZ.wrap_localCOM.zpp_inner.x=eZ.localCOMx;eZ.wrap_localCOM.zpp_inner.y=eZ.localCOMy}}var eR=eZ.body;if(eR.zip_axis){eR.zip_axis=false;eR.axisx=Math.sin(eR.rot);eR.axisy=Math.cos(eR.rot)}eZ.worldCOMx=eZ.body.posx+(eZ.body.axisy*eZ.localCOMx-eZ.body.axisx*eZ.localCOMy);eZ.worldCOMy=eZ.body.posy+(eZ.localCOMx*eZ.body.axisx+eZ.localCOMy*eZ.body.axisy)}}var ee=0;var ed=0;ee=this.originx-eZ.worldCOMx;ed=this.originy-eZ.worldCOMy;var ek=this.dirx*this.dirx+this.diry*this.diry;var ej=2*(ee*this.dirx+ed*this.diry);var ei=ee*ee+ed*ed-eZ.radius*eZ.radius;var ef=ej*ej-4*ek*ei;if(ef==0){var er=-ej/2*ek;if((!em||ei>0)&&er>0&&er0){if(eu0&&em){if(ea0)&&eC>0&&eC<=this.maxdist){var fa=0;var e9=0;fa=this.originx;e9=this.originy;fa+=this.dirx*eC;e9+=this.diry*eC;fa-=fh.worldCOMx;e9-=fh.worldCOMy;var eY=1/Math.sqrt(fa*fa+e9*e9);fa*=eY;e9*=eY;if(eo<=0){fa=-fa;e9=-e9}var ez;if(au.poolVec2==null){ez=new r()}else{ez=au.poolVec2;au.poolVec2=ez.zpp_pool;ez.zpp_pool=null}if(ez.zpp_inner==null){var eX;if(bB.zpp_pool==null){eX=new bB()}else{eX=bB.zpp_pool;bB.zpp_pool=eX.next;eX.next=null}eX.weak=false;eX._immutable=false;eX.x=fa;eX.y=e9;ez.zpp_inner=eX;ez.zpp_inner.outer=ez}else{var e8;var e3=ez.zpp_inner;if(e3._validate!=null){e3._validate()}if(ez.zpp_inner.x==fa){var e1=ez.zpp_inner;if(e1._validate!=null){e1._validate()}e8=ez.zpp_inner.y==e9}else{e8=false}if(!e8){ez.zpp_inner.x=fa;ez.zpp_inner.y=e9;var eZ=ez.zpp_inner;if(eZ._invalidate!=null){eZ._invalidate(eZ)}}}ez.zpp_inner.weak=false;var eB=a4.getRay(ez,eC,eo<=0,fh.outer);var e4=null;var eu=ev.zpp_inner.inner.head;while(eu!=null){if(eB.zpp_inner.toiDistance0&&eE<=this.maxdist){var ey=0;var em=0;ey=this.originx;em=this.originy;ey+=this.dirx*eE;em+=this.diry*eE;ey-=fh.worldCOMx;em-=fh.worldCOMy;var eH=1/Math.sqrt(ey*ey+em*em);ey*=eH;em*=eH;var eR;if(au.poolVec2==null){eR=new r()}else{eR=au.poolVec2;au.poolVec2=eR.zpp_pool;eR.zpp_pool=null}if(eR.zpp_inner==null){var eP;if(bB.zpp_pool==null){eP=new bB()}else{eP=bB.zpp_pool;bB.zpp_pool=eP.next;eP.next=null}eP.weak=false;eP._immutable=false;eP.x=ey;eP.y=em;eR.zpp_inner=eP;eR.zpp_inner.outer=eR}else{var fg;var eS=eR.zpp_inner;if(eS._validate!=null){eS._validate()}if(eR.zpp_inner.x==ey){var eQ=eR.zpp_inner;if(eQ._validate!=null){eQ._validate()}fg=eR.zpp_inner.y==em}else{fg=false}if(!fg){eR.zpp_inner.x=ey;eR.zpp_inner.y=em;var eO=eR.zpp_inner;if(eO._invalidate!=null){eO._invalidate(eO)}}}eR.zpp_inner.weak=false;var ed=a4.getRay(eR,eE,false,fh.outer);var ep=null;var et=ev.zpp_inner.inner.head;while(et!=null){if(ed.zpp_inner.toiDistance0&&ee<=this.maxdist&&ew){var ex=0;var el=0;ex=this.originx;el=this.originy;ex+=this.dirx*ee;el+=this.diry*ee;ex-=fh.worldCOMx;el-=fh.worldCOMy;var eD=1/Math.sqrt(ex*ex+el*el);ex*=eD;el*=eD;ex=-ex;el=-el;var eL;if(au.poolVec2==null){eL=new r()}else{eL=au.poolVec2;au.poolVec2=eL.zpp_pool;eL.zpp_pool=null}if(eL.zpp_inner==null){var eK;if(bB.zpp_pool==null){eK=new bB()}else{eK=bB.zpp_pool;bB.zpp_pool=eK.next;eK.next=null}eK.weak=false;eK._immutable=false;eK.x=ex;eK.y=el;eL.zpp_inner=eK;eL.zpp_inner.outer=eL}else{var ff;var fe=eL.zpp_inner;if(fe._validate!=null){fe._validate()}if(eL.zpp_inner.x==ex){var fd=eL.zpp_inner;if(fd._validate!=null){fd._validate()}ff=eL.zpp_inner.y==el}else{ff=false}if(!ff){eL.zpp_inner.x=ex;eL.zpp_inner.y=el;var fc=eL.zpp_inner;if(fc._invalidate!=null){fc._invalidate(fc)}}}eL.zpp_inner.weak=false;var ec=a4.getRay(eL,ee,true,fh.outer);var en=null;var es=ev.zpp_inner.inner.head;while(es!=null){if(ec.zpp_inner.toiDistanceP.epsilon){el=1/el;var ek=(eh*eg-ej*ee)*el;if(ek>0&&ek-P.epsilon&&ed<1+P.epsilon){eJ=ek;ef=eH.elt}}}}eH=eH.next;eA=ez;ex=ev;ez=ez.next}while(true){ez=eC.gverts.next;var eK=ez;var ep=eH.elt;if(eo||ep.gnormx*this.dirx+ep.gnormy*this.diry<0){var es=0;var em=0;es=eK.x-ex.x;em=eK.y-ex.y;var ea=0;var et=0;ea=ex.x-this.originx;et=ex.y-this.originy;var eI=em*this.dirx-es*this.diry;if(eI*eI>P.epsilon){eI=1/eI;var er=(em*ea-es*et)*eI;if(er>0&&er-P.epsilon&&eb<1+P.epsilon){eJ=er;ef=eH.elt}}}}eH=eH.next;break}if(ef!=null){var eF=0;var eD=0;eF=ef.gnormx;eD=ef.gnormy;var eE=eF*this.dirx+eD*this.diry>0;if(eE){eF=-eF;eD=-eD}var eq;if(au.poolVec2==null){eq=new r()}else{eq=au.poolVec2;au.poolVec2=eq.zpp_pool;eq.zpp_pool=null}if(eq.zpp_inner==null){var eu;if(bB.zpp_pool==null){eu=new bB()}else{eu=bB.zpp_pool;bB.zpp_pool=eu.next;eu.next=null}eu.weak=false;eu._immutable=false;eu.x=eF;eu.y=eD;eq.zpp_inner=eu;eq.zpp_inner.outer=eq}else{var eB;var ec=eq.zpp_inner;if(ec._validate!=null){ec._validate()}if(eq.zpp_inner.x==eF){var ey=eq.zpp_inner;if(ey._validate!=null){ey._validate()}eB=eq.zpp_inner.y==eD}else{eB=false}if(!eB){eq.zpp_inner.x=eF;eq.zpp_inner.y=eD;var ew=eq.zpp_inner;if(ew._invalidate!=null){ew._invalidate(ew)}}}eq.zpp_inner.weak=false;return a4.getRay(eq,eJ,eE,eC.outer)}else{return null}};bf.prototype.polysect2=function(eY,ev,et){var e7=Infinity;var eu=-1;var ej=null;var ey=null;var e5=eY.edges.head;var eV=eY.gverts.next;var eS=eV;var eU=eV.next;while(eU!=null){var eP=eU;var e4=e5.elt;if(ev||e4.gnormx*this.dirx+e4.gnormy*this.diry<0){var em=0;var el=0;em=eP.x-eS.x;el=eP.y-eS.y;var ek=0;var eh=0;ek=eS.x-this.originx;eh=eS.y-this.originy;var eq=el*this.dirx-em*this.diry;if(eq*eq>P.epsilon){eq=1/eq;var eo=(el*ek-em*eh)*eq;if(eo>0&&eo<=this.maxdist&&(eoeu)){var ee=(this.diry*ek-this.dirx*eh)*eq;if(ee>-P.epsilon&&ee<1+P.epsilon){if(eoeu){eu=eo;ey=e5.elt}}}}}e5=e5.next;eV=eU;eS=eP;eU=eU.next}while(true){eU=eY.gverts.next;var e8=eU;var ew=e5.elt;if(ev||ew.gnormx*this.dirx+ew.gnormy*this.diry<0){var eB=0;var er=0;eB=e8.x-eS.x;er=e8.y-eS.y;var ea=0;var eE=0;ea=eS.x-this.originx;eE=eS.y-this.originy;var e6=er*this.dirx-eB*this.diry;if(e6*e6>P.epsilon){e6=1/e6;var eA=(er*ea-eB*eE)*e6;if(eA>0&&eA<=this.maxdist&&(eAeu)){var ec=(this.diry*ea-this.dirx*eE)*e6;if(ec>-P.epsilon&&ec<1+P.epsilon){if(eAeu){eu=eA;ey=e5.elt}}}}}e5=e5.next;break}if(ej!=null){var e2=0;var eZ=0;e2=ej.gnormx;eZ=ej.gnormy;var e0=e2*this.dirx+eZ*this.diry>0;if(e0){e2=-e2;eZ=-eZ}var ez;if(au.poolVec2==null){ez=new r()}else{ez=au.poolVec2;au.poolVec2=ez.zpp_pool;ez.zpp_pool=null}if(ez.zpp_inner==null){var eM;if(bB.zpp_pool==null){eM=new bB()}else{eM=bB.zpp_pool;bB.zpp_pool=eM.next;eM.next=null}eM.weak=false;eM._immutable=false;eM.x=e2;eM.y=eZ;ez.zpp_inner=eM;ez.zpp_inner.outer=ez}else{var eX;var ed=ez.zpp_inner;if(ed._validate!=null){ed._validate()}if(ez.zpp_inner.x==e2){var eT=ez.zpp_inner;if(eT._validate!=null){eT._validate()}eX=ez.zpp_inner.y==eZ}else{eX=false}if(!eX){ez.zpp_inner.x=e2;ez.zpp_inner.y=eZ;var eR=ez.zpp_inner;if(eR._invalidate!=null){eR._invalidate(eR)}}}ez.zpp_inner.weak=false;var eK=a4.getRay(ez,e7,e0,eY.outer);var eQ=null;var eg=et.zpp_inner.inner.head;while(eg!=null){if(eK.zpp_inner.toiDistance0;if(eW){ex=-ex;en=-en}var eG;if(au.poolVec2==null){eG=new r()}else{eG=au.poolVec2;au.poolVec2=eG.zpp_pool;eG.zpp_pool=null}if(eG.zpp_inner==null){var eF;if(bB.zpp_pool==null){eF=new bB()}else{eF=bB.zpp_pool;bB.zpp_pool=eF.next;eF.next=null}eF.weak=false;eF._immutable=false;eF.x=ex;eF.y=en;eG.zpp_inner=eF;eG.zpp_inner.outer=eG}else{var e3;var eN=eG.zpp_inner;if(eN._validate!=null){eN._validate()}if(eG.zpp_inner.x==ex){var eL=eG.zpp_inner;if(eL._validate!=null){eL._validate()}e3=eG.zpp_inner.y==en}else{e3=false}if(!e3){eG.zpp_inner.x=ex;eG.zpp_inner.y=en;var eJ=eG.zpp_inner;if(eJ._invalidate!=null){eJ._invalidate(eJ)}}}eG.zpp_inner.weak=false;var eD=a4.getRay(eG,eu,eW,eY.outer);var ep=null;var es=et.zpp_inner.inner.head;while(es!=null){if(eD.zpp_inner.toiDistanceea.vertex.x){return false}else{if(eb.vertex.yea.vertex.y){return false}else{return eb.typeeb.left.y}else{return ee.right.y>eb.left.y}}else{eg=ee.right.xee.left.y}else{ef=eb.right.y>ee.left.y}}else{eg=eb.right.xeb.right.y}else{return ee.right.y>eb.right.y}}else{eg=ee.right.xeb.left.y}else{return ee.right.y>eb.left.y}}else{eg=ee.right.x(eb.left.y=0){return ed>=0}else{return this.sweepx>=ee.left.x}}}else{if(eb.left.x==eb.right.x){eg=ee.right.x=0){return ek<0}else{return this.sweepx=0;eg=eb.right.x=0){return el}return(this.sweepx-ee.left.x)/(ee.right.x-ee.left.x)*(ee.right.y-ee.left.y)+ee.left.y>(this.sweepx-eb.left.x)/(eb.right.x-eb.left.x)*(eb.right.y-eb.left.y)+eb.left.y}}}};bz.prototype.clear=function(){this.tree.clear()};bz.prototype.add=function(ec){ec.node=this.tree.insert(ec);var ea=this.tree.successor_node(ec.node);var eb=this.tree.predecessor_node(ec.node);if(ea!=null){ec.next=ea.data;ea.data.prev=ec}if(eb!=null){ec.prev=eb.data;eb.data.next=ec}return ec};bz.prototype.remove=function(ec){var ea=this.tree.successor_node(ec.node);var eb=this.tree.predecessor_node(ec.node);if(ea!=null){ea.data.prev=ec.prev}if(eb!=null){eb.data.next=ec.next}this.tree.remove_node(ec.node);ec.node=null};bz.prototype.intersect=function(ee,ed){if(ee==null||ed==null){return false}else{if(ee.left==ed.left||ee.left==ed.right||ee.right==ed.left||ee.right==ed.right){return false}else{var ea=(ed.left.x-ee.left.x)*(ee.right.y-ee.left.y)-(ee.right.x-ee.left.x)*(ed.left.y-ee.left.y);var eb=(ed.right.x-ee.left.x)*(ee.right.y-ee.left.y)-(ee.right.x-ee.left.x)*(ed.right.y-ee.left.y);if(ea*eb>0){return false}else{var ec=(ee.left.x-ed.left.x)*(ed.right.y-ed.left.y)-(ed.right.x-ed.left.x)*(ee.left.y-ed.left.y);var ef=(ee.right.x-ed.left.x)*(ed.right.y-ed.left.y)-(ed.right.x-ed.left.x)*(ee.right.y-ed.left.y);if(ec*ef>0){return false}else{if(ea*eb>=0&&ec*ef>=0){return true}else{return true}}}}}};bz.prototype.intersection=function(ed,eb){if(ed==null||eb==null){return null}else{if(ed.left==eb.left||ed.left==eb.right||ed.right==eb.left||ed.right==eb.right){return null}else{var ec=0;var ea=0;ec=ed.right.x-ed.left.x;ea=ed.right.y-ed.left.y;var en=0;var ek=0;en=eb.right.x-eb.left.x;ek=eb.right.y-eb.left.y;var eh=ek*ec-en*ea;if(eh==0){return null}eh=1/eh;var ef=0;var ee=0;ef=eb.left.x-ed.left.x;ee=eb.left.y-ed.left.y;var ep=(ek*ef-en*ee)*eh;if(ep<0||ep>1){return null}var eq=(ea*ef-ec*ee)*eh;if(eq<0||eq>1){return null}var eg;if(eq==0||eq==1||ep==0||ep==1){if(eq==0){eg=eb.left}else{if(eq==1){eg=eb.right}else{if(ep==0){eg=ed.left}else{eg=ed.right}}}}else{var eo=0.5*(ed.left.x+ec*ep+eb.left.x+en*eq);var em=0.5*(ed.left.y+ea*ep+eb.left.y+ek*eq);var ei;if(dG.zpp_pool==null){ei=new dG()}else{ei=dG.zpp_pool;dG.zpp_pool=ei.next;ei.next=null}ei.x=eo;ei.y=em;eg=ei}var el;if(dI.zpp_pool==null){el=new dI()}else{el=dI.zpp_pool;dI.zpp_pool=el.next;el.next=null}el.vertex=eg;var ej=el;ej.type=0;ej.segment=ed;ej.segment2=eb;return ej}}};bz.prototype.__class__=bz;var bv=zpp_nape.geom.ZPP_Simple=function(){};bv.__name__=["zpp_nape","geom","ZPP_Simple"];bv.decompose=function(eO,e9){if(bv.sweep==null){bv.sweep=new bz();bv.inthash=new bK()}if(bv.vertices==null){if(bX.zpp_pool==null){bv.vertices=new bX()}else{bv.vertices=bX.zpp_pool;bX.zpp_pool=bv.vertices.next;bv.vertices.next=null}bv.vertices.lt=dG.less_xy;bv.vertices.swapped=dG.swap_nodes}if(bv.queue==null){if(bl.zpp_pool==null){bv.queue=new bl()}else{bv.queue=bl.zpp_pool;bl.zpp_pool=bv.queue.next;bv.queue.next=null}bv.queue.lt=dI.less_xy;bv.queue.swapped=dI.swap_nodes}var fr=null;var fh=null;if(eO!=null){var eG=eO;while(true){var e8=eG;var e7=e8.x;var e5=e8.y;var fd;if(dG.zpp_pool==null){fd=new dG()}else{fd=dG.zpp_pool;dG.zpp_pool=fd.next;fd.next=null}fd.x=e7;fd.y=e5;var f9=fd;var eY=bv.vertices.parent;while(eY!=null){if(bv.vertices.lt(f9,eY.data)){eY=eY.prev}else{if(bv.vertices.lt(eY.data,f9)){eY=eY.next}else{break}}}var eF=eY;if(eF!=null){var fc=f9;fc.links.clear();fc.node=null;fc.forced=false;fc.next=dG.zpp_pool;dG.zpp_pool=fc;f9=eF.data}else{f9.node=bv.vertices.insert(f9)}if(fh!=null){var f5;if(dI.zpp_pool==null){f5=new dI()}else{f5=dI.zpp_pool;dI.zpp_pool=f5.next;f5.next=null}f5.vertex=fh;var e4=f5;var f3;if(dI.zpp_pool==null){f3=new dI()}else{f3=dI.zpp_pool;dI.zpp_pool=f3.next;f3.next=null}f3.vertex=f9;var e3=f3;var fi;if(dI.less_xy(e4,e3)){e4.type=1;e3.type=2;fi=co.get(fh,f9)}else{e4.type=2;e3.type=1;fi=co.get(f9,fh)}e4.segment=e3.segment=fi;bv.queue.insert(e4);bv.queue.insert(e3);fh.links.insert(f9);f9.links.insert(fh)}fh=f9;if(fr==null){fr=f9}eG=eG.next;if(!(eG!=eO)){break}}}var f1;if(dI.zpp_pool==null){f1=new dI()}else{f1=dI.zpp_pool;dI.zpp_pool=f1.next;f1.next=null}f1.vertex=fh;var fH=f1;var fY;if(dI.zpp_pool==null){fY=new dI()}else{fY=dI.zpp_pool;dI.zpp_pool=fY.next;fY.next=null}fY.vertex=fr;var fj=fY;var gb;if(dI.less_xy(fH,fj)){fH.type=1;fj.type=2;gb=co.get(fh,fr)}else{fH.type=2;fj.type=1;gb=co.get(fr,fh)}fH.segment=fj.segment=gb;bv.queue.insert(fH);bv.queue.insert(fj);fh.links.insert(fr);fr.links.insert(fh);if(bv.ints==null){if(bl.zpp_pool==null){bv.ints=new bl()}else{bv.ints=bl.zpp_pool;bl.zpp_pool=bv.ints.next;bv.ints.next=null}bv.ints.lt=dI.less_xy}while(!bv.queue.empty()){var fl=bv.queue.pop_front();bv.sweep.sweepx=fl.vertex.x;if(fl.type==1){var fb=fl.segment;bv.sweep.add(fb);if(fb.next!=null&&fb!=null&&!(fb.next.id=bv.sweep.sweepx){var et=bv.queue.parent;while(et!=null){if(bv.queue.lt(ga,et.data)){et=et.prev}else{if(bv.queue.lt(et.data,ga)){et=et.next}else{break}}}if(et==null){var es=bv.ints.parent;while(es!=null){if(bv.ints.lt(ga,es.data)){es=es.prev}else{if(bv.ints.lt(es.data,ga)){es=es.next}else{break}}}var fC=es;if(fC!=null){var f6=ga.vertex;f6.links.clear();f6.node=null;f6.forced=false;f6.next=dG.zpp_pool;dG.zpp_pool=f6;ga.vertex=fC.data.vertex;fC.data=ga;bv.queue.insert(ga)}else{bv.queue.insert(ga);bv.ints.insert(ga)}if(fb.next.id=bv.sweep.sweepx){var er=bv.queue.parent;while(er!=null){if(bv.queue.lt(fZ,er.data)){er=er.prev}else{if(bv.queue.lt(er.data,fZ)){er=er.next}else{break}}}if(er==null){var ep=bv.ints.parent;while(ep!=null){if(bv.ints.lt(fZ,ep.data)){ep=ep.prev}else{if(bv.ints.lt(ep.data,fZ)){ep=ep.next}else{break}}}var fA=ep;if(fA!=null){var f0=fZ.vertex;f0.links.clear();f0.node=null;f0.forced=false;f0.next=dG.zpp_pool;dG.zpp_pool=f0;fZ.vertex=fA.data.vertex;fA.data=fZ;bv.queue.insert(fZ)}else{bv.queue.insert(fZ);bv.ints.insert(fZ)}if(fb.id=bv.sweep.sweepx){var en=bv.queue.parent;while(en!=null){if(bv.queue.lt(fW,en.data)){en=en.prev}else{if(bv.queue.lt(en.data,fW)){en=en.next}else{break}}}if(en==null){var el=bv.ints.parent;while(el!=null){if(bv.ints.lt(fW,el.data)){el=el.prev}else{if(bv.ints.lt(el.data,fW)){el=el.next}else{break}}}var fy=el;if(fy!=null){var fQ=fW.vertex;fQ.links.clear();fQ.node=null;fQ.forced=false;fQ.next=dG.zpp_pool;dG.zpp_pool=fQ;fW.vertex=fy.data.vertex;fy.data=fW;bv.queue.insert(fW)}else{bv.queue.insert(fW);bv.ints.insert(fW)}if(fk.id=bv.sweep.sweepx){var eg=bv.queue.parent;while(eg!=null){if(bv.queue.lt(fO,eg.data)){eg=eg.prev}else{if(bv.queue.lt(eg.data,fO)){eg=eg.next}else{break}}}if(eg==null){var fG=bv.ints.parent;while(fG!=null){if(bv.ints.lt(fO,fG.data)){fG=fG.prev}else{if(bv.ints.lt(fG.data,fO)){fG=fG.next}else{break}}}var fw=fG;if(fw!=null){var eZ=fO.vertex;eZ.links.clear();eZ.node=null;eZ.forced=false;eZ.next=dG.zpp_pool;dG.zpp_pool=eZ;fO.vertex=fw.data.vertex;fw.data=fO;bv.queue.insert(fO)}else{bv.queue.insert(fO);bv.ints.insert(fO)}if(fm.next.id=bv.sweep.sweepx){var fF=bv.queue.parent;while(fF!=null){if(bv.queue.lt(fL,fF.data)){fF=fF.prev}else{if(bv.queue.lt(fF.data,fL)){fF=fF.next}else{break}}}if(fF==null){var fE=bv.ints.parent;while(fE!=null){if(bv.ints.lt(fL,fE.data)){fE=fE.prev}else{if(bv.ints.lt(fE.data,fL)){fE=fE.next}else{break}}}var fu=fE;if(fu!=null){var eS=fL.vertex;eS.links.clear();eS.node=null;eS.forced=false;eS.next=dG.zpp_pool;dG.zpp_pool=eS;fL.vertex=fu.data.vertex;fu.data=fL;bv.queue.insert(fL)}else{bv.queue.insert(fL);bv.ints.insert(fL)}if(fn.id0&&eu<=0){eN=eK;eu=ea}else{if(eu*ea>=0){var eG=0;var ep=0;eG=eM.x-eK.x;ep=eM.y-eK.y;var ey=0;var el=0;ey=eN.x-eM.x;el=eN.y-eM.y;if(el*eG-ey*ep>0){eN=eK;eu=ea}}}}if(ew.next!=null){ew=ew.next;while(ew.prev!=null){ew=ew.prev}}else{while(ew.parent!=null&&ew==ew.parent.next){ew=ew.parent}ew=ew.parent}}}if(ef.links.empty()){ed.remove(ef);var ei=ef;ei.links.clear();ei.node=null;ei.forced=false;ei.next=dG.zpp_pool;dG.zpp_pool=ei}ef=eM;eM=eN}}ed.remove(er);er.links.clear();er.node=null;er.forced=false;er.next=dG.zpp_pool;dG.zpp_pool=er;eb.add(ex)};bv.isSimple=function(ep){if(bv.sweep==null){bv.sweep=new bz();bv.inthash=new bK()}var eb=bv.list_vertices;if(eb==null){eb=bv.list_vertices=new a8()}if(ep!=null){var ec=ep;while(true){var eA=ec;var ey=eA.x;var ew=eA.y;var eq;if(dG.zpp_pool==null){eq=new dG()}else{eq=dG.zpp_pool;dG.zpp_pool=eq.next;eq.next=null}eq.x=ey;eq.y=ew;eb.add(eq);ec=ec.next;if(!(ec!=ep)){break}}}var ef=bv.list_queue;if(ef==null){ef=bv.list_queue=new dC()}var eg=eb.head;var eB=eg.elt;eg=eg.next;while(eg!=null){var eK=eg.elt;var ez;if(dI.zpp_pool==null){ez=new dI()}else{ez=dI.zpp_pool;dI.zpp_pool=ez.next;ez.next=null}ez.vertex=eB;var eo=ef.add(ez);var ex;if(dI.zpp_pool==null){ex=new dI()}else{ex=dI.zpp_pool;dI.zpp_pool=ex.next;ex.next=null}ex.vertex=eK;var en=ef.add(ex);var eD;if(dI.less_xy(eo,en)){eo.type=1;en.type=2;eD=co.get(eB,eK)}else{eo.type=2;en.type=1;eD=co.get(eK,eB)}eo.segment=en.segment=eD;eB=eK;eg=eg.next}var eJ=eb.head.elt;var ev;if(dI.zpp_pool==null){ev=new dI()}else{ev=dI.zpp_pool;dI.zpp_pool=ev.next;ev.next=null}ev.vertex=eB;var eC=ef.add(ev);var eu;if(dI.zpp_pool==null){eu=new dI()}else{eu=dI.zpp_pool;dI.zpp_pool=eu.next;eu.next=null}eu.vertex=eJ;var ek=ef.add(eu);var eI;if(dI.less_xy(eC,ek)){eC.type=1;ek.type=2;eI=co.get(eB,eJ)}else{eC.type=2;ek.type=1;eI=co.get(eJ,eB)}eC.segment=ek.segment=eI;var em=ef;if(em.head!=null&&em.head.next!=null){var ei=em.head;var eL=null;var ee=null;var eE=null;var eG=null;var ej=1;var ed;var er;var ea;while(true){ed=0;ee=ei;ei=null;eL=ei;while(ee!=null){++ed;eE=ee;er=0;ea=ej;while(eE!=null&&er0||ea>0&&eE!=null){if(er==0){eG=eE;eE=eE.next;--ea}else{if(ea==0||eE==null){eG=ee;ee=ee.next;--er}else{if(dI.less_xy(ee.elt,eE.elt)){eG=ee;ee=ee.next;--er}else{eG=eE;eE=eE.next;--ea}}}if(eL!=null){eL.next=eG}else{ei=eG}eL=eG}ee=eE}eL.next=null;ej<<=1;if(!(ed>1)){break}}em.head=ei;em.modified=true;em.pushmod=true}var et=true;while(ef.head!=null){var eH=ef.pop_unsafe();var es=eH.segment;if(eH.type==1){bv.sweep.add(es);if(bv.sweep.intersect(es,es.next)||bv.sweep.intersect(es,es.prev)){et=false;break}}else{if(eH.type==2){if(bv.sweep.intersect(es.prev,es.next)){et=false;break}bv.sweep.remove(es);es.left=es.right=null;es.prev=null;es.node=null;es.vertices.clear();es.next=co.zpp_pool;co.zpp_pool=es}}eH.vertex=null;eH.segment=eH.segment2=null;eH.node=null;eH.next=dI.zpp_pool;dI.zpp_pool=eH}while(ef.head!=null){var el=ef.pop_unsafe();if(el.type==2){var eF=el.segment;eF.left=eF.right=null;eF.prev=null;eF.node=null;eF.vertices.clear();eF.next=co.zpp_pool;co.zpp_pool=eF}el.vertex=null;el.segment=el.segment2=null;el.node=null;el.next=dI.zpp_pool;dI.zpp_pool=el}bv.sweep.clear();while(eb.head!=null){var eh=eb.pop_unsafe();eh.links.clear();eh.node=null;eh.forced=false;eh.next=dG.zpp_pool;dG.zpp_pool=eh}return et};bv.prototype.__class__=bv;var cD=zpp_nape.geom.ZPP_SimplifyV=function(){this.forced=false;this.flag=false;this.prev=null;this.next=null;this.y=0;this.x=0};cD.__name__=["zpp_nape","geom","ZPP_SimplifyV"];cD.get=function(ea){var eb;if(cD.zpp_pool==null){eb=new cD()}else{eb=cD.zpp_pool;cD.zpp_pool=eb.next;eb.next=null}eb.x=ea.x;eb.y=ea.y;eb.flag=false;return eb};cD.prototype.x=null;cD.prototype.y=null;cD.prototype.next=null;cD.prototype.prev=null;cD.prototype.flag=null;cD.prototype.forced=null;cD.prototype.free=function(){};cD.prototype.alloc=function(){};cD.prototype.__class__=cD;var cG=zpp_nape.geom.ZPP_SimplifyP=function(){this.max=null;this.min=null;this.next=null};cG.__name__=["zpp_nape","geom","ZPP_SimplifyP"];cG.get=function(ec,ea){var eb;if(cG.zpp_pool==null){eb=new cG()}else{eb=cG.zpp_pool;cG.zpp_pool=eb.next;eb.next=null}eb.min=ec;eb.max=ea;return eb};cG.prototype.next=null;cG.prototype.min=null;cG.prototype.max=null;cG.prototype.free=function(){this.min=this.max=null};cG.prototype.alloc=function(){};cG.prototype.__class__=cG;var aL=zpp_nape.geom.ZPP_Simplify=function(){};aL.__name__=["zpp_nape","geom","ZPP_Simplify"];aL.lessval=function(eb,ea){return eb.x-ea.x+(eb.y-ea.y)};aL.less=function(eb,ea){return eb.x-ea.x+(eb.y-ea.y)<0};aL.distance=function(ej,ei,eh){var ee=0;var ed=0;ee=eh.x-ei.x;ed=eh.y-ei.y;var ec=0;var eb=0;ec=ej.x-ei.x;eb=ej.y-ei.y;if(ee*ee+ed*ed==0){return ec*ec+eb*eb}else{var el=(ec*ee+eb*ed)/(ee*ee+ed*ed);if(el<=0){return ec*ec+eb*eb}else{if(el>=1){var ea=ej.x;var en=ej.y;var eg=eh.x;var ef=eh.y;var em=0;var ek=0;em=ea-eg;ek=en-ef;return em*em+ek*ek}else{ec-=ee*el;eb-=ed*el;return ec*ec+eb*eb}}}};aL.simplify=function(ee,eE){var ep=null;var eK=null;var en=null;eE*=eE;if(aL.stack==null){aL.stack=new c0()}var eD=null;var em=null;var ef=ee;while(true){var eA;if(cD.zpp_pool==null){eA=new cD()}else{eA=cD.zpp_pool;cD.zpp_pool=eA.next;eA.next=null}eA.x=ef.x;eA.y=ef.y;eA.flag=false;var eC=eA;eC.forced=ef.forced;if(eC.forced){eC.flag=true;if(eD!=null){var ey;if(cG.zpp_pool==null){ey=new cG()}else{ey=cG.zpp_pool;cG.zpp_pool=ey.next;ey.next=null}ey.min=eD;ey.max=eC;aL.stack.add(ey)}else{em=eC}eD=eC}if(ep==null){ep=eC.prev=eC.next=eC}else{eC.prev=ep;eC.next=ep.next;ep.next.prev=eC;ep.next=eC}ep=eC;if(eK==null){eK=eC;en=eC}else{if(eC.x-eK.x+(eC.y-eK.y)<0){eK=eC}if(en.x-eC.x+(en.y-eC.y)<0){en=eC}}ef=ef.next;if(!(ef!=ee)){break}}if(aL.stack.head==null){if(em==null){eK.flag=en.flag=true;var ew;if(cG.zpp_pool==null){ew=new cG()}else{ew=cG.zpp_pool;cG.zpp_pool=ew.next;ew.next=null}ew.min=eK;ew.max=en;aL.stack.add(ew);var ev;if(cG.zpp_pool==null){ev=new cG()}else{ev=cG.zpp_pool;cG.zpp_pool=ev.next;ev.next=null}ev.min=en;ev.max=eK;aL.stack.add(ev)}else{var eI=eK.x-em.x+(eK.y-em.y);if(eI<0){eI=-eI}var eG=en.x-em.x+(en.y-em.y);if(eG<0){eG=-eG}if(eI>eG){eK.flag=em.flag=true;var eu;if(cG.zpp_pool==null){eu=new cG()}else{eu=cG.zpp_pool;cG.zpp_pool=eu.next;eu.next=null}eu.min=eK;eu.max=em;aL.stack.add(eu);var et;if(cG.zpp_pool==null){et=new cG()}else{et=cG.zpp_pool;cG.zpp_pool=et.next;et.next=null}et.min=em;et.max=eK;aL.stack.add(et)}else{en.flag=em.flag=true;var es;if(cG.zpp_pool==null){es=new cG()}else{es=cG.zpp_pool;cG.zpp_pool=es.next;es.next=null}es.min=en;es.max=em;aL.stack.add(es);var er;if(cG.zpp_pool==null){er=new cG()}else{er=cG.zpp_pool;cG.zpp_pool=er.next;er.next=null}er.min=em;er.max=en;aL.stack.add(er)}}}else{var eq;if(cG.zpp_pool==null){eq=new cG()}else{eq=cG.zpp_pool;cG.zpp_pool=eq.next;eq.next=null}eq.min=eD;eq.max=em;aL.stack.add(eq)}while(aL.stack.head!=null){var el=aL.stack.pop_unsafe();var eg=el.min;var eH=el.max;el.min=el.max=null;el.next=cG.zpp_pool;cG.zpp_pool=el;var eo=eE;var ec=null;var eJ=eg.next;while(eJ!=eH){var ed=aL.distance(eJ,eg,eH);if(ed>eo){eo=ed;ec=eJ}eJ=eJ.next}if(ec!=null){ec.flag=true;var ek;if(cG.zpp_pool==null){ek=new cG()}else{ek=cG.zpp_pool;cG.zpp_pool=ek.next;ek.next=null}ek.min=eg;ek.max=ec;aL.stack.add(ek);var ej;if(cG.zpp_pool==null){ej=new cG()}else{ej=cG.zpp_pool;cG.zpp_pool=ej.next;ej.next=null}ej.min=ec;ej.max=eH;aL.stack.add(ej)}}var eb=null;while(ep!=null){if(ep.flag){var ez=ep.x;var ex=ep.y;var ei;if(dr.zpp_pool==null){ei=new dr()}else{ei=dr.zpp_pool;dr.zpp_pool=ei.next;ei.next=null}ei.forced=false;ei.x=ez;ei.y=ex;var ea=ei;if(eb==null){eb=ea.prev=ea.next=ea}else{ea.prev=eb;ea.next=eb.next;eb.next.prev=ea;eb.next=ea}eb=ea;ea.forced=ep.forced}if(ep!=null&&ep.prev==ep){ep.next=ep.prev=null;var eF=ep;eF.next=cD.zpp_pool;cD.zpp_pool=eF;ep=null;ep=ep}else{var eB=ep.next;ep.prev.next=ep.next;ep.next.prev=ep.prev;ep.next=ep.prev=null;var eh=ep;eh.next=cD.zpp_pool;cD.zpp_pool=eh;ep=null;ep=eB}}return eb};aL.prototype.__class__=aL;var ct=zpp_nape.geom.ZPP_ToiEvent=function(){this.kinematic=false;this.failed=false;this.slipped=false;this.axis=null;this.c2=null;this.c1=null;this.frozen2=false;this.frozen1=false;this.arbiter=null;this.s2=null;this.s1=null;this.toi=0;this.next=null;this.c1=new bB();this.c2=new bB();this.axis=new bB()};ct.__name__=["zpp_nape","geom","ZPP_ToiEvent"];ct.prototype.next=null;ct.prototype.alloc=function(){this.failed=false;this.s1=this.s2=null;this.arbiter=null};ct.prototype.free=function(){};ct.prototype.toi=null;ct.prototype.s1=null;ct.prototype.s2=null;ct.prototype.arbiter=null;ct.prototype.frozen1=null;ct.prototype.frozen2=null;ct.prototype.c1=null;ct.prototype.c2=null;ct.prototype.axis=null;ct.prototype.slipped=null;ct.prototype.failed=null;ct.prototype.kinematic=null;ct.prototype.__class__=ct;var de=zpp_nape.geom.ZPP_SweepDistance=function(){};de.__name__=["zpp_nape","geom","ZPP_SweepDistance"];de.dynamicSweep=function(eC,h7,gR,kq,hj){if(hj==null){hj=false}var gx=eC.s1;var gv=eC.s2;var kp=gx.body;var ko=gv.body;var jS=0;var jQ=0;jS=ko.velx-kp.velx;jQ=ko.vely-kp.vely;var gZ=kp.angvel;if(gZ<0){gZ=-gZ}var gY=ko.angvel;if(gY<0){gY=-gY}var fF=gx.sweepCoef*gZ+gv.sweepCoef*gY;if(!hj&&!eC.kinematic&&jS*jS+jQ*jQ0.0001){kp.axisx=Math.sin(kp.rot);kp.axisy=Math.cos(kp.rot)}else{var jZ=jd*jd;var jC=1-0.5*jZ;var jF=1-jZ*jZ/8;var g6=(jC*kp.axisx+jd*kp.axisy)*jF;kp.axisy=(jC*kp.axisy-jd*kp.axisx)*jF;kp.axisx=g6}}}if(gx.type==0){gx.worldCOMx=kp.posx+(kp.axisy*gx.localCOMx-kp.axisx*gx.localCOMy);gx.worldCOMy=kp.posy+(gx.localCOMx*kp.axisx+gx.localCOMy*kp.axisy)}else{var hf=gx.polygon;var hs=hf.lverts.next;var iG=hf.gverts.next;while(iG!=null){var jL=iG;var jG=hs;hs=hs.next;jL.x=kp.posx+(kp.axisy*jG.x-kp.axisx*jG.y);jL.y=kp.posy+(jG.x*kp.axisx+jG.y*kp.axisy);iG=iG.next}var iw=hf.edges.head;var fv=hf.gverts.next;var jr=fv;fv=fv.next;while(fv!=null){var jp=fv;var jO=iw.elt;iw=iw.next;jO.gnormx=kp.axisy*jO.lnormx-kp.axisx*jO.lnormy;jO.gnormy=jO.lnormx*kp.axisx+jO.lnormy*kp.axisy;jO.gprojection=kp.posx*jO.gnormx+kp.posy*jO.gnormy+jO.lprojection;jO.tp0=jr.y*jO.gnormx-jr.x*jO.gnormy;jO.tp1=jp.y*jO.gnormx-jp.x*jO.gnormy;jr=jp;fv=fv.next}var fB=hf.gverts.next;var jD=iw.elt;jD.gnormx=kp.axisy*jD.lnormx-kp.axisx*jD.lnormy;jD.gnormy=jD.lnormx*kp.axisx+jD.lnormy*kp.axisy;jD.gprojection=kp.posx*jD.gnormx+kp.posy*jD.gnormy+jD.lprojection;jD.tp0=jr.y*jD.gnormx-jr.x*jD.gnormy;jD.tp1=fB.y*jD.gnormx-fB.x*jD.gnormy}var ki=iQ*h7;var km=ki-ko.sweepTime;if(km!=0){ko.sweepTime=ki;ko.posx+=ko.velx*km;ko.posy+=ko.vely*km;if(ko.angvel!=0){var eB=ko.sweep_angvel*km;ko.rot+=eB;if(eB*eB>0.0001){ko.axisx=Math.sin(ko.rot);ko.axisy=Math.cos(ko.rot)}else{var iv=eB*eB;var he=1-0.5*iv;var hG=1-iv*iv/8;var gk=(he*ko.axisx+eB*ko.axisy)*hG;ko.axisy=(he*ko.axisy-eB*ko.axisx)*hG;ko.axisx=gk}}}if(gv.type==0){gv.worldCOMx=ko.posx+(ko.axisy*gv.localCOMx-ko.axisx*gv.localCOMy);gv.worldCOMy=ko.posy+(gv.localCOMx*ko.axisx+gv.localCOMy*ko.axisy)}else{var hc=gv.polygon;var gX=hc.lverts.next;var ft=hc.gverts.next;while(ft!=null){var iZ=ft;var hZ=gX;gX=gX.next;iZ.x=ko.posx+(ko.axisy*hZ.x-ko.axisx*hZ.y);iZ.y=ko.posy+(hZ.x*ko.axisx+hZ.y*ko.axisy);ft=ft.next}var fM=hc.edges.head;var fr=hc.gverts.next;var fJ=fr;fr=fr.next;while(fr!=null){var fA=fr;var jB=fM.elt;fM=fM.next;jB.gnormx=ko.axisy*jB.lnormx-ko.axisx*jB.lnormy;jB.gnormy=jB.lnormx*ko.axisx+jB.lnormy*ko.axisy;jB.gprojection=ko.posx*jB.gnormx+ko.posy*jB.gnormy+jB.lprojection;jB.tp0=fJ.y*jB.gnormx-fJ.x*jB.gnormy;jB.tp1=fA.y*jB.gnormx-fA.x*jB.gnormy;fJ=fA;fr=fr.next}var fz=hc.gverts.next;var jz=fM.elt;jz.gnormx=ko.axisy*jz.lnormx-ko.axisx*jz.lnormy;jz.gnormy=jz.lnormx*ko.axisx+jz.lnormy*ko.axisy;jz.gprojection=ko.posx*jz.gnormx+ko.posy*jz.gnormy+jz.lprojection;jz.tp0=fJ.y*jz.gnormx-fJ.x*jz.gnormy;jz.tp1=fz.y*jz.gnormx-fz.x*jz.gnormy}var jP=gx;var jn=gv;var fe=ka;var fd=j9;var eY;if(gx.type==0&&gv.type==0){var j4=gx.circle;var jU=gv.circle;var hM;var gj=0;var g5=0;gj=jU.worldCOMx-j4.worldCOMx;g5=jU.worldCOMy-j4.worldCOMy;var ho=Math.sqrt(gj*gj+g5*g5);hM=ho-(j4.radius+jU.radius);if(hM<1e+100){if(ho==0){gj=1;g5=0}else{var ju=1/ho;gj*=ju;g5*=ju}var f4=j4.radius;ka.x=j4.worldCOMx+gj*f4;ka.y=j4.worldCOMy+g5*f4;var f2=-jU.radius;j9.x=jU.worldCOMx+gj*f2;j9.y=jU.worldCOMy+g5*f2;iH.x=gj;iH.y=g5}eY=hM}else{var jA=false;if(gx.type==0&&gv.type==1){var gB=gx;jP=gv;jn=gB;var gz=ka;fe=j9;fd=gz;jA=true}if(jP.type==1&&jn.type==0){var fN=jP.polygon;var h2=jn.circle;var fZ=-1e+100;var es=null;var fp=fN.edges.head;while(fp!=null){var jR=fp.elt;var kg=jR.gnormx*h2.worldCOMx+jR.gnormy*h2.worldCOMy-jR.gprojection-h2.radius;if(kg>1e+100){fZ=kg;break}if(kg>0){if(kg>fZ){fZ=kg;es=jR}}else{if(fZ<0&&kg>fZ){fZ=kg;es=jR}}fp=fp.next}if(fZ<1e+100){var fC=es.gp0;var eZ=es.gp1;var kh=h2.worldCOMy*es.gnormx-h2.worldCOMx*es.gnormy;if(kh<=fC.y*es.gnormx-fC.x*es.gnormy){var gi=0;var fS=0;gi=h2.worldCOMx-fC.x;fS=h2.worldCOMy-fC.y;var fc=Math.sqrt(gi*gi+fS*fS);fZ=fc-h2.radius;if(fZ<1e+100){if(fc==0){gi=1;fS=0}else{var f1=1/fc;gi*=f1;fS*=f1}fe.x=fC.x+gi*0;fe.y=fC.y+fS*0;var f0=-h2.radius;fd.x=h2.worldCOMx+gi*f0;fd.y=h2.worldCOMy+fS*f0;iH.x=gi;iH.y=fS}}else{if(kh>=eZ.y*es.gnormx-eZ.x*es.gnormy){var gh=0;var fR=0;gh=h2.worldCOMx-eZ.x;fR=h2.worldCOMy-eZ.y;var fb=Math.sqrt(gh*gh+fR*fR);fZ=fb-h2.radius;if(fZ<1e+100){if(fb==0){gh=1;fR=0}else{var fY=1/fb;gh*=fY;fR*=fY}fe.x=eZ.x+gh*0;fe.y=eZ.y+fR*0;var fX=-h2.radius;fd.x=h2.worldCOMx+gh*fX;fd.y=h2.worldCOMy+fR*fX;iH.x=gh;iH.y=fR}}else{var fW=-h2.radius;fd.x=h2.worldCOMx+es.gnormx*fW;fd.y=h2.worldCOMy+es.gnormy*fW;var fU=-fZ;fe.x=fd.x+es.gnormx*fU;fe.y=fd.y+es.gnormy*fU;iH.x=es.gnormx;iH.y=es.gnormy}}}if(jA){iH.x=-iH.x;iH.y=-iH.y}eY=fZ}else{var iz=jP.polygon;var h6=jn.polygon;var hn=-1e+100;var er=null;var eq=null;var g4=0;var fn=iz.edges.head;while(fn!=null){var eo=fn.elt;var eE=1e+100;var fm=h6.gverts.next;while(fm!=null){var fy=fm;var jH=eo.gnormx*fy.x+eo.gnormy*fy.y;if(jH1e+100){hn=eE;break}if(eE>0){if(eE>hn){hn=eE;er=eo;g4=1}}else{if(hn<0&&eE>hn){hn=eE;er=eo;g4=1}}fn=fn.next}if(hn<1e+100){var fl=h6.edges.head;while(fl!=null){var en=fl.elt;var gq=1e+100;var fk=iz.gverts.next;while(fk!=null){var fx=fk;var ik=en.gnormx*fx.x+en.gnormy*fx.y;if(ik1e+100){hn=gq;break}if(gq>0){if(gq>hn){hn=gq;eq=en;g4=2}}else{if(hn<0&&gq>hn){hn=gq;eq=en;g4=2}}fl=fl.next}if(hn<1e+100){var gP;var j7;if(g4==1){gP=h6;j7=er}else{gP=iz;j7=eq;var gy=fe;fe=fd;fd=gy;jA=!jA}var j6=null;var go=1e+100;var fi=gP.edges.head;while(fi!=null){var em=fi.elt;var ii=j7.gnormx*em.gnormx+j7.gnormy*em.gnormy;if(ii=0){var fj=j7.gp0;var eX=j7.gp1;var gT=j6.gp0;var gQ=j6.gp1;var eO=0;var eN=0;var gs=0;var gr=0;eO=eX.x-fj.x;eN=eX.y-fj.y;gs=gQ.x-gT.x;gr=gQ.y-gT.y;var jo=1/(eO*eO+eN*eN);var eF=1/(gs*gs+gr*gr);var io=-(eO*(fj.x-gT.x)+eN*(fj.y-gT.y))*jo;var h3=-(eO*(fj.x-gQ.x)+eN*(fj.y-gQ.y))*jo;var jN=-(gs*(gT.x-fj.x)+gr*(gT.y-fj.y))*eF;var jm=-(gs*(gT.x-eX.x)+gr*(gT.y-eX.y))*eF;if(io<0){io=0}else{if(io>1){io=1}}if(h3<0){h3=0}else{if(h3>1){h3=1}}if(jN<0){jN=0}else{if(jN>1){jN=1}}if(jm<0){jm=0}else{if(jm>1){jm=1}}var eJ=0;var eI=0;var fT=io;eJ=fj.x+eO*fT;eI=fj.y+eN*fT;var eu=0;var et=0;var iq=h3;eu=fj.x+eO*iq;et=fj.y+eN*iq;var jf=0;var je=0;var im=jN;jf=gT.x+gs*im;je=gT.y+gr*im;var iX=0;var iV=0;var il=jm;iX=gT.x+gs*il;iV=gT.y+gr*il;var jX=gT.x;var jW=gT.y;var jb=0;var ja=0;jb=eJ-jX;ja=eI-jW;var j0=jb*jb+ja*ja;var gH=gQ.x;var gf=gQ.y;var i9=0;var iU=0;i9=eu-gH;iU=et-gf;var iu=i9*i9+iU*iU;var gG=fj.x;var gd=fj.y;var i8=0;var iT=0;i8=jf-gG;iT=je-gd;var hg=i8*i8+iT*iT;var gF=eX.x;var gb=eX.y;var i7=0;var iS=0;i7=iX-gF;iS=iV-gb;var gS=i7*i7+iS*iS;var eL=0;var eK=0;var fE=null;if(j0P.epsilon){jJ+=i1*ih;jI+=i0*ih}var ig=(-j7.tp0-iE)*hr;if(ig<-P.epsilon){jj+=i1*ig;jh+=i0*ig}var jY=jJ*j7.gnormx+jI*j7.gnormy-j7.gprojection;var jw=jj*j7.gnormx+jh*j7.gnormy-j7.gprojection;if(jY0){eC.slipped=true}if(gN<=0||iI=1){iQ=1;var kf=iQ*h7;var kk=kf-kp.sweepTime;if(kk!=0){kp.sweepTime=kf;kp.posx+=kp.velx*kk;kp.posy+=kp.vely*kk;if(kp.angvel!=0){var ez=kp.sweep_angvel*kk;kp.rot+=ez;if(ez*ez>0.0001){kp.axisx=Math.sin(kp.rot);kp.axisy=Math.cos(kp.rot)}else{var it=ez*ez;var hb=1-0.5*it;var hE=1-it*it/8;var gg=(hb*kp.axisx+ez*kp.axisy)*hE;kp.axisy=(hb*kp.axisy-ez*kp.axisx)*hE;kp.axisx=gg}}}if(gx.type==0){gx.worldCOMx=kp.posx+(kp.axisy*gx.localCOMx-kp.axisx*gx.localCOMy);gx.worldCOMy=kp.posy+(gx.localCOMx*kp.axisx+gx.localCOMy*kp.axisy)}else{var ha=gx.polygon;var gW=ha.lverts.next;var el=ha.gverts.next;while(el!=null){var iY=el;var hX=gW;gW=gW.next;iY.x=kp.posx+(kp.axisy*hX.x-kp.axisx*hX.y);iY.y=kp.posy+(hX.x*kp.axisx+hX.y*kp.axisy);el=el.next}var fL=ha.edges.head;var ej=ha.gverts.next;var fI=ej;ej=ej.next;while(ej!=null){var fw=ej;var jy=fL.elt;fL=fL.next;jy.gnormx=kp.axisy*jy.lnormx-kp.axisx*jy.lnormy;jy.gnormy=jy.lnormx*kp.axisx+jy.lnormy*kp.axisy;jy.gprojection=kp.posx*jy.gnormx+kp.posy*jy.gnormy+jy.lprojection;jy.tp0=fI.y*jy.gnormx-fI.x*jy.gnormy;jy.tp1=fw.y*jy.gnormx-fw.x*jy.gnormy;fI=fw;ej=ej.next}var fu=ha.gverts.next;var jv=fL.elt;jv.gnormx=kp.axisy*jv.lnormx-kp.axisx*jv.lnormy;jv.gnormy=jv.lnormx*kp.axisx+jv.lnormy*kp.axisy;jv.gprojection=kp.posx*jv.gnormx+kp.posy*jv.gnormy+jv.lprojection;jv.tp0=fI.y*jv.gnormx-fI.x*jv.gnormy;jv.tp1=fu.y*jv.gnormx-fu.x*jv.gnormy}var kd=iQ*h7;var kj=kd-ko.sweepTime;if(kj!=0){ko.sweepTime=kd;ko.posx+=ko.velx*kj;ko.posy+=ko.vely*kj;if(ko.angvel!=0){var ey=ko.sweep_angvel*kj;ko.rot+=ey;if(ey*ey>0.0001){ko.axisx=Math.sin(ko.rot);ko.axisy=Math.cos(ko.rot)}else{var ir=ey*ey;var g9=1-0.5*ir;var hB=1-ir*ir/8;var ge=(g9*ko.axisx+ey*ko.axisy)*hB;ko.axisy=(g9*ko.axisy-ey*ko.axisx)*hB;ko.axisx=ge}}}if(gv.type==0){gv.worldCOMx=ko.posx+(ko.axisy*gv.localCOMx-ko.axisx*gv.localCOMy);gv.worldCOMy=ko.posy+(gv.localCOMx*ko.axisx+gv.localCOMy*ko.axisy)}else{var g8=gv.polygon;var gU=g8.lverts.next;var eh=g8.gverts.next;while(eh!=null){var iW=eh;var hU=gU;gU=gU.next;iW.x=ko.posx+(ko.axisy*hU.x-ko.axisx*hU.y);iW.y=ko.posy+(hU.x*ko.axisx+hU.y*ko.axisy);eh=eh.next}var fK=g8.edges.head;var eg=g8.gverts.next;var fH=eg;eg=eg.next;while(eg!=null){var fs=eg;var jt=fK.elt;fK=fK.next;jt.gnormx=ko.axisy*jt.lnormx-ko.axisx*jt.lnormy;jt.gnormy=jt.lnormx*ko.axisx+jt.lnormy*ko.axisy;jt.gprojection=ko.posx*jt.gnormx+ko.posy*jt.gnormy+jt.lprojection;jt.tp0=fH.y*jt.gnormx-fH.x*jt.gnormy;jt.tp1=fs.y*jt.gnormx-fs.x*jt.gnormy;fH=fs;eg=eg.next}var fq=g8.gverts.next;var jq=fK.elt;jq.gnormx=ko.axisy*jq.lnormx-ko.axisx*jq.lnormy;jq.gnormy=jq.lnormx*ko.axisx+jq.lnormy*ko.axisy;jq.gprojection=ko.posx*jq.gnormx+ko.posy*jq.gnormy+jq.lprojection;jq.tp0=fH.y*jq.gnormx-fH.x*jq.gnormy;jq.tp1=fq.y*jq.gnormx-fq.x*jq.gnormy}var jM=gx;var jl=gv;var jE=ka;var jg=j9;var gw;if(gx.type==0&&gv.type==0){var j3=gx.circle;var jT=gv.circle;var ke;var gc=0;var fQ=0;gc=jT.worldCOMx-j3.worldCOMx;fQ=jT.worldCOMy-j3.worldCOMy;var fa=Math.sqrt(gc*gc+fQ*fQ);ke=fa-(j3.radius+jT.radius);if(ke<1e+100){if(fa==0){gc=1;fQ=0}else{var h9=1/fa;gc*=h9;fQ*=h9}var h4=j3.radius;ka.x=j3.worldCOMx+gc*h4;ka.y=j3.worldCOMy+fQ*h4;var h1=-jT.radius;j9.x=jT.worldCOMx+gc*h1;j9.y=jT.worldCOMy+fQ*h1;iH.x=gc;iH.y=fQ}gw=ke}else{var hL=false;if(gx.type==0&&gv.type==1){var gu=gx;jM=gv;jl=gu;var j2=ka;jE=j9;jg=j2;hL=true}if(jM.type==1&&jl.type==0){var iA=jM.polygon;var eH=jl.circle;var hm=-1e+100;var hp=null;var ee=iA.edges.head;while(ee!=null){var ek=ee.elt;var kc=ek.gnormx*eH.worldCOMx+ek.gnormy*eH.worldCOMy-ek.gprojection-eH.radius;if(kc>1e+100){hm=kc;break}if(kc>0){if(kc>hm){hm=kc;hp=ek}}else{if(hm<0&&kc>hm){hm=kc;hp=ek}}ee=ee.next}if(hm<1e+100){var fh=hp.gp0;var eW=hp.gp1;var kb=eH.worldCOMy*hp.gnormx-eH.worldCOMx*hp.gnormy;if(kb<=fh.y*hp.gnormx-fh.x*hp.gnormy){var ga=0;var fP=0;ga=eH.worldCOMx-fh.x;fP=eH.worldCOMy-fh.y;var e9=Math.sqrt(ga*ga+fP*fP);hm=e9-eH.radius;if(hm<1e+100){if(e9==0){ga=1;fP=0}else{var h0=1/e9;ga*=h0;fP*=h0}jE.x=fh.x+ga*0;jE.y=fh.y+fP*0;var hY=-eH.radius;jg.x=eH.worldCOMx+ga*hY;jg.y=eH.worldCOMy+fP*hY;iH.x=ga;iH.y=fP}}else{if(kb>=eW.y*hp.gnormx-eW.x*hp.gnormy){var f8=0;var fO=0;f8=eH.worldCOMx-eW.x;fO=eH.worldCOMy-eW.y;var e8=Math.sqrt(f8*f8+fO*fO);hm=e8-eH.radius;if(hm<1e+100){if(e8==0){f8=1;fO=0}else{var hW=1/e8;f8*=hW;fO*=hW}jE.x=eW.x+f8*0;jE.y=eW.y+fO*0;var hT=-eH.radius;jg.x=eH.worldCOMx+f8*hT;jg.y=eH.worldCOMy+fO*hT;iH.x=f8;iH.y=fO}}else{var hR=-eH.radius;jg.x=eH.worldCOMx+hp.gnormx*hR;jg.y=eH.worldCOMy+hp.gnormy*hR;var hQ=-hm;jE.x=jg.x+hp.gnormx*hQ;jE.y=jg.y+hp.gnormy*hQ;iH.x=hp.gnormx;iH.y=hp.gnormy}}}if(hL){iH.x=-iH.x;iH.y=-iH.y}gw=hm}else{var iy=jM.polygon;var h5=jl.polygon;var hl=-1e+100;var hi=null;var g0=null;var eD=0;var ec=iy.edges.head;while(ec!=null){var ei=ec.elt;var gn=1e+100;var eb=h5.gverts.next;while(eb!=null){var e0=eb;var ie=ei.gnormx*e0.x+ei.gnormy*e0.y;if(ie1e+100){hl=gn;break}if(gn>0){if(gn>hl){hl=gn;hi=ei;eD=1}}else{if(hl<0&&gn>hl){hl=gn;hi=ei;eD=1}}ec=ec.next}if(hl<1e+100){var ea=h5.edges.head;while(ea!=null){var ef=ea.elt;var gm=1e+100;var ks=iy.gverts.next;while(ks!=null){var eV=ks;var ic=ef.gnormx*eV.x+ef.gnormy*eV.y;if(ic1e+100){hl=gm;break}if(gm>0){if(gm>hl){hl=gm;g0=ef;eD=2}}else{if(hl<0&&gm>hl){hl=gm;g0=ef;eD=2}}ea=ea.next}if(hl<1e+100){var gK;var hN;if(eD==1){gK=h5;hN=hi}else{gK=iy;hN=g0;var gt=jE;jE=jg;jg=gt;hL=!hL}var hv=null;var gl=1e+100;var kr=gK.edges.head;while(kr!=null){var ed=kr.elt;var ia=hN.gnormx*ed.gnormx+hN.gnormy*ed.gnormy;if(ia=0){var fg=hN.gp0;var eT=hN.gp1;var hh=hv.gp0;var gV=hv.gp1;var fV=0;var fG=0;var hu=0;var hq=0;fV=eT.x-fg.x;fG=eT.y-fg.y;hu=gV.x-hh.x;hq=gV.y-hh.y;var j8=1/(fV*fV+fG*fG);var gp=1/(hu*hu+hq*hq);var ep=-(fV*(fg.x-hh.x)+fG*(fg.y-hh.y))*j8;var hP=-(fV*(fg.x-gV.x)+fG*(fg.y-gV.y))*j8;var jK=-(hu*(hh.x-fg.x)+hq*(hh.y-fg.y))*gp;var jk=-(hu*(hh.x-eT.x)+hq*(hh.y-eT.y))*gp;if(ep<0){ep=0}else{if(ep>1){ep=1}}if(hP<0){hP=0}else{if(hP>1){hP=1}}if(jK<0){jK=0}else{if(jK>1){jK=1}}if(jk<0){jk=0}else{if(jk>1){jk=1}}var j5=0;var jV=0;var hK=ep;j5=fg.x+fV*hK;jV=fg.y+fG*hK;var iF=0;var ix=0;var hJ=hP;iF=fg.x+fV*hJ;ix=fg.y+fG*hJ;var eP=0;var eA=0;var hI=jK;eP=hh.x+hu*hI;eA=hh.y+hq*hI;var ji=0;var i2=0;var hH=jk;ji=hh.x+hu*hH;i2=hh.y+hq*hH;var gE=hh.x;var f9=hh.y;var i6=0;var iR=0;i6=j5-gE;iR=jV-f9;var iD=i6*i6+iR*iR;var gD=gV.x;var f7=gV.y;var i5=0;var iP=0;i5=iF-gD;iP=ix-f7;var ip=i5*i5+iP*iP;var gC=fg.x;var f6=fg.y;var i4=0;var iO=0;i4=eP-gC;iO=eA-f6;var hd=i4*i4+iO*iO;var gA=eT.x;var f5=eT.y;var i3=0;var iN=0;i3=ji-gA;iN=i2-f5;var gO=i3*i3+iN*iN;var gL=0;var gI=0;var iM=null;if(iDP.epsilon){iJ+=ff*hC;iB+=eU*hC}var hz=(-hN.tp0-iC)*jx;if(hz<-P.epsilon){hk+=ff*hz;g7+=eU*hz}var ht=iJ*hN.gnormx+iB*hN.gnormy-hN.gprojection;var f3=hk*hN.gnormx+g7*hN.gnormy-hN.gprojection;if(ht0){eC.slipped=true}if(kn<=0||fo=40){if(iI>kq){eC.failed=true}break}}eC.toi=iQ};de.staticSweep=function(ey,hx,gy,jE){var gg=ey.s1;var ge=ey.s2;var jD=gg.body;var ja=0;var i8=0;ja=-jD.velx;i8=-jD.vely;var gC=jD.sweep_angvel;if(gC<0){gC=-gC}var fu=gg.sweepCoef*gC;var jt=ey.c1;var jr=ey.c2;var h2=ey.axis;var ib=gy;var eO=0;while(true){var iy=ib*hx;var et=iy-jD.sweepTime;if(et!=0){jD.sweepTime=iy;jD.posx+=jD.velx*et;jD.posy+=jD.vely*et;if(jD.angvel!=0){var iz=jD.sweep_angvel*et;jD.rot+=iz;if(iz*iz>0.0001){jD.axisx=Math.sin(jD.rot);jD.axisy=Math.cos(jD.rot)}else{var jh=iz*iz;var iU=1-0.5*jh;var iX=1-jh*jh/8;var gG=(iU*jD.axisx+iz*jD.axisy)*iX;jD.axisy=(iU*jD.axisy-iz*jD.axisx)*iX;jD.axisx=gG}}}if(gg.type==0){gg.worldCOMx=jD.posx+(jD.axisy*gg.localCOMx-jD.axisx*gg.localCOMy);gg.worldCOMy=jD.posy+(gg.localCOMx*jD.axisx+gg.localCOMy*jD.axisy)}else{var gM=gg.polygon;var gY=gM.lverts.next;var h1=gM.gverts.next;while(h1!=null){var i3=h1;var iY=gY;gY=gY.next;i3.x=jD.posx+(jD.axisy*iY.x-jD.axisx*iY.y);i3.y=jD.posy+(iY.x*jD.axisx+iY.y*jD.axisy);h1=h1.next}var hR=gM.edges.head;var fk=gM.gverts.next;var iM=fk;fk=fk.next;while(fk!=null){var iL=fk;var i6=hR.elt;hR=hR.next;i6.gnormx=jD.axisy*i6.lnormx-jD.axisx*i6.lnormy;i6.gnormy=i6.lnormx*jD.axisx+i6.lnormy*jD.axisy;i6.gprojection=jD.posx*i6.gnormx+jD.posy*i6.gnormy+i6.lprojection;i6.tp0=iM.y*i6.gnormx-iM.x*i6.gnormy;i6.tp1=iL.y*i6.gnormx-iL.x*i6.gnormy;iM=iL;fk=fk.next}var fq=gM.gverts.next;var iV=hR.elt;iV.gnormx=jD.axisy*iV.lnormx-jD.axisx*iV.lnormy;iV.gnormy=iV.lnormx*jD.axisx+iV.lnormy*jD.axisy;iV.gprojection=jD.posx*iV.gnormx+jD.posy*iV.gnormy+iV.lprojection;iV.tp0=iM.y*iV.gnormx-iM.x*iV.gnormy;iV.tp1=fq.y*iV.gnormx-fq.x*iV.gnormy}var i7=gg;var iJ=ge;var e5=jt;var e0=jr;var eT;if(gg.type==0&&ge.type==0){var jm=gg.circle;var jc=ge.circle;var hf;var f3=0;var gF=0;f3=jc.worldCOMx-jm.worldCOMx;gF=jc.worldCOMy-jm.worldCOMy;var gU=Math.sqrt(f3*f3+gF*gF);hf=gU-(jm.radius+jc.radius);if(hf<1e+100){if(gU==0){f3=1;gF=0}else{var iN=1/gU;f3*=iN;gF*=iN}var fP=jm.radius;jt.x=jm.worldCOMx+f3*fP;jt.y=jm.worldCOMy+gF*fP;var fN=-jc.radius;jr.x=jc.worldCOMx+f3*fN;jr.y=jc.worldCOMy+gF*fN;h2.x=f3;h2.y=gF}eT=hf}else{var iS=false;if(gg.type==0&&ge.type==1){var gk=gg;i7=ge;iJ=gk;var gi=jt;e5=jr;e0=gi;iS=true}if(i7.type==1&&iJ.type==0){var fy=i7.polygon;var ht=iJ.circle;var fK=-1e+100;var eq=null;var fi=fy.edges.head;while(fi!=null){var i9=fi.elt;var jx=i9.gnormx*ht.worldCOMx+i9.gnormy*ht.worldCOMy-i9.gprojection-ht.radius;if(jx>1e+100){fK=jx;break}if(jx>0){if(jx>fK){fK=jx;eq=i9}}else{if(fK<0&&jx>fK){fK=jx;eq=i9}}fi=fi.next}if(fK<1e+100){var fr=eq.gp0;var eU=eq.gp1;var jz=ht.worldCOMy*eq.gnormx-ht.worldCOMx*eq.gnormy;if(jz<=fr.y*eq.gnormx-fr.x*eq.gnormy){var f2=0;var fD=0;f2=ht.worldCOMx-fr.x;fD=ht.worldCOMy-fr.y;var eZ=Math.sqrt(f2*f2+fD*fD);fK=eZ-ht.radius;if(fK<1e+100){if(eZ==0){f2=1;fD=0}else{var fM=1/eZ;f2*=fM;fD*=fM}e5.x=fr.x+f2*0;e5.y=fr.y+fD*0;var fL=-ht.radius;e0.x=ht.worldCOMx+f2*fL;e0.y=ht.worldCOMy+fD*fL;h2.x=f2;h2.y=fD}}else{if(jz>=eU.y*eq.gnormx-eU.x*eq.gnormy){var f1=0;var fC=0;f1=ht.worldCOMx-eU.x;fC=ht.worldCOMy-eU.y;var eY=Math.sqrt(f1*f1+fC*fC);fK=eY-ht.radius;if(fK<1e+100){if(eY==0){f1=1;fC=0}else{var fJ=1/eY;f1*=fJ;fC*=fJ}e5.x=eU.x+f1*0;e5.y=eU.y+fC*0;var fI=-ht.radius;e0.x=ht.worldCOMx+f1*fI;e0.y=ht.worldCOMy+fC*fI;h2.x=f1;h2.y=fC}}else{var fG=-ht.radius;e0.x=ht.worldCOMx+eq.gnormx*fG;e0.y=ht.worldCOMy+eq.gnormy*fG;var fF=-fK;e5.x=e0.x+eq.gnormx*fF;e5.y=e0.y+eq.gnormy*fF;h2.x=eq.gnormx;h2.y=eq.gnormy}}}if(iS){h2.x=-h2.x;h2.y=-h2.y}eT=fK}else{var hU=i7.polygon;var gL=iJ.polygon;var gT=-1e+100;var ep=null;var eo=null;var gE=0;var fh=hU.edges.head;while(fh!=null){var em=fh.elt;var eA=1e+100;var fg=gL.gverts.next;while(fg!=null){var fp=fg;var iZ=em.gnormx*fp.x+em.gnormy*fp.y;if(iZ1e+100){gT=eA;break}if(eA>0){if(eA>gT){gT=eA;ep=em;gE=1}}else{if(gT<0&&eA>gT){gT=eA;ep=em;gE=1}}fh=fh.next}if(gT<1e+100){var fe=gL.edges.head;while(fe!=null){var el=fe.elt;var f9=1e+100;var fd=hU.gverts.next;while(fd!=null){var fo=fd;var hJ=el.gnormx*fo.x+el.gnormy*fo.y;if(hJ1e+100){gT=f9;break}if(f9>0){if(f9>gT){gT=f9;eo=el;gE=2}}else{if(gT<0&&f9>gT){gT=f9;eo=el;gE=2}}fe=fe.next}if(gT<1e+100){var gv;var jp;if(gE==1){gv=gL;jp=ep}else{gv=hU;jp=eo;var gh=e5;e5=e0;e0=gh;iS=!iS}var jo=null;var f7=1e+100;var fc=gv.edges.head;while(fc!=null){var ek=fc.elt;var hH=jp.gnormx*ek.gnormx+jp.gnormy*ek.gnormy;if(hH=0){var fa=jp.gp0;var eS=jp.gp1;var gz=jo.gp0;var gx=jo.gp1;var eK=0;var eJ=0;var gb=0;var ga=0;eK=eS.x-fa.x;eJ=eS.y-fa.y;gb=gx.x-gz.x;ga=gx.y-gz.y;var iK=1/(eK*eK+eJ*eJ);var eB=1/(gb*gb+ga*ga);var hM=-(eK*(fa.x-gz.x)+eJ*(fa.y-gz.y))*iK;var hu=-(eK*(fa.x-gx.x)+eJ*(fa.y-gx.y))*iK;var i5=-(gb*(gz.x-fa.x)+ga*(gz.y-fa.y))*eB;var iI=-(gb*(gz.x-eS.x)+ga*(gz.y-eS.y))*eB;if(hM<0){hM=0}else{if(hM>1){hM=1}}if(hu<0){hu=0}else{if(hu>1){hu=1}}if(i5<0){i5=0}else{if(i5>1){i5=1}}if(iI<0){iI=0}else{if(iI>1){iI=1}}var eF=0;var eE=0;var fE=hM;eF=fa.x+eK*fE;eE=fa.y+eJ*fE;var es=0;var er=0;var hN=hu;es=fa.x+eK*hN;er=fa.y+eJ*hN;var iB=0;var iA=0;var hL=i5;iB=gz.x+gb*hL;iA=gz.y+ga*hL;var ii=0;var ih=0;var hK=iI;ii=gz.x+gb*hK;ih=gz.y+ga*hK;var jf=gz.x;var je=gz.y;var ix=0;var iw=0;ix=eF-jf;iw=eE-je;var ji=ix*ix+iw*iw;var gq=gx.x;var fY=gx.y;var iv=0;var ig=0;iv=es-gq;ig=er-fY;var hQ=iv*iv+ig*ig;var gp=fa.x;var fW=fa.y;var iu=0;var ie=0;iu=iB-gp;ie=iA-fW;var gN=iu*iu+ie*ie;var go=eS.x;var fU=eS.y;var it=0;var id=0;it=ii-go;id=ih-fU;var iT=it*it+id*id;var eH=0;var eG=0;var ft=null;if(jiP.epsilon){i1+=il*hG;i0+=ik*hG}var hE=(-jp.tp0-hZ)*gX;if(hE<-P.epsilon){iE+=il*hE;iD+=ik*hE}var jg=i1*jp.gnormx+i0*jp.gnormy-jp.gprojection;var iO=iE*jp.gnormx+iD*jp.gnormy-jp.gprojection;if(jg0){ey.slipped=true}if(gu<=0||h3=1){ib=1;var jy=ib*hx;var jA=jy-jD.sweepTime;if(jA!=0){jD.sweepTime=jy;jD.posx+=jD.velx*jA;jD.posy+=jD.vely*jA;if(jD.angvel!=0){var ew=jD.sweep_angvel*jA;jD.rot+=ew;if(ew*ew>0.0001){jD.axisx=Math.sin(jD.rot);jD.axisy=Math.cos(jD.rot)}else{var hP=ew*ew;var gJ=1-0.5*hP;var g9=1-hP*hP/8;var f0=(gJ*jD.axisx+ew*jD.axisy)*g9;jD.axisy=(gJ*jD.axisy-ew*jD.axisx)*g9;jD.axisx=f0}}}if(gg.type==0){gg.worldCOMx=jD.posx+(jD.axisy*gg.localCOMx-jD.axisx*gg.localCOMy);gg.worldCOMy=jD.posy+(gg.localCOMx*jD.axisx+gg.localCOMy*jD.axisy)}else{var gI=gg.polygon;var gB=gI.lverts.next;var fb=gI.gverts.next;while(fb!=null){var ij=fb;var hq=gB;gB=gB.next;ij.x=jD.posx+(jD.axisy*hq.x-jD.axisx*hq.y);ij.y=jD.posy+(hq.x*jD.axisx+hq.y*jD.axisy);fb=fb.next}var fx=gI.edges.head;var e9=gI.gverts.next;var fw=e9;e9=e9.next;while(e9!=null){var fn=e9;var iR=fx.elt;fx=fx.next;iR.gnormx=jD.axisy*iR.lnormx-jD.axisx*iR.lnormy;iR.gnormy=iR.lnormx*jD.axisx+iR.lnormy*jD.axisy;iR.gprojection=jD.posx*iR.gnormx+jD.posy*iR.gnormy+iR.lprojection;iR.tp0=fw.y*iR.gnormx-fw.x*iR.gnormy;iR.tp1=fn.y*iR.gnormx-fn.x*iR.gnormy;fw=fn;e9=e9.next}var fm=gI.gverts.next;var iQ=fx.elt;iQ.gnormx=jD.axisy*iQ.lnormx-jD.axisx*iQ.lnormy;iQ.gnormy=iQ.lnormx*jD.axisx+iQ.lnormy*jD.axisy;iQ.gprojection=jD.posx*iQ.gnormx+jD.posy*iQ.gnormy+iQ.lprojection;iQ.tp0=fw.y*iQ.gnormx-fw.x*iQ.gnormy;iQ.tp1=fm.y*iQ.gnormx-fm.x*iQ.gnormy}var i4=gg;var iH=ge;var iW=jt;var iC=jr;var gf;if(gg.type==0&&ge.type==0){var jl=gg.circle;var jb=ge.circle;var jv;var fZ=0;var fB=0;fZ=jb.worldCOMx-jl.worldCOMx;fB=jb.worldCOMy-jl.worldCOMy;var eX=Math.sqrt(fZ*fZ+fB*fB);jv=eX-(jl.radius+jb.radius);if(jv<1e+100){if(eX==0){fZ=1;fB=0}else{var hz=1/eX;fZ*=hz;fB*=hz}var hv=jl.radius;jt.x=jl.worldCOMx+fZ*hv;jt.y=jl.worldCOMy+fB*hv;var hs=-jb.radius;jr.x=jb.worldCOMx+fZ*hs;jr.y=jb.worldCOMy+fB*hs;h2.x=fZ;h2.y=fB}gf=jv}else{var he=false;if(gg.type==0&&ge.type==1){var gd=gg;i4=ge;iH=gd;var jk=jt;iW=jr;iC=jk;he=true}if(i4.type==1&&iH.type==0){var hV=i4.polygon;var eD=iH.circle;var gS=-1e+100;var gV=null;var ej=hV.edges.head;while(ej!=null){var ei=ej.elt;var ju=ei.gnormx*eD.worldCOMx+ei.gnormy*eD.worldCOMy-ei.gprojection-eD.radius;if(ju>1e+100){gS=ju;break}if(ju>0){if(ju>gS){gS=ju;gV=ei}}else{if(gS<0&&ju>gS){gS=ju;gV=ei}}ej=ej.next}if(gS<1e+100){var e8=gV.gp0;var eR=gV.gp1;var jw=eD.worldCOMy*gV.gnormx-eD.worldCOMx*gV.gnormy;if(jw<=e8.y*gV.gnormx-e8.x*gV.gnormy){var fX=0;var fA=0;fX=eD.worldCOMx-e8.x;fA=eD.worldCOMy-e8.y;var eW=Math.sqrt(fX*fX+fA*fA);gS=eW-eD.radius;if(gS<1e+100){if(eW==0){fX=1;fA=0}else{var hr=1/eW;fX*=hr;fA*=hr}iW.x=e8.x+fX*0;iW.y=e8.y+fA*0;var hp=-eD.radius;iC.x=eD.worldCOMx+fX*hp;iC.y=eD.worldCOMy+fA*hp;h2.x=fX;h2.y=fA}}else{if(jw>=eR.y*gV.gnormx-eR.x*gV.gnormy){var fV=0;var fz=0;fV=eD.worldCOMx-eR.x;fz=eD.worldCOMy-eR.y;var eV=Math.sqrt(fV*fV+fz*fz);gS=eV-eD.radius;if(gS<1e+100){if(eV==0){fV=1;fz=0}else{var ho=1/eV;fV*=ho;fz*=ho}iW.x=eR.x+fV*0;iW.y=eR.y+fz*0;var hm=-eD.radius;iC.x=eD.worldCOMx+fV*hm;iC.y=eD.worldCOMy+fz*hm;h2.x=fV;h2.y=fz}}else{var hk=-eD.radius;iC.x=eD.worldCOMx+gV.gnormx*hk;iC.y=eD.worldCOMy+gV.gnormy*hk;var hj=-gS;iW.x=iC.x+gV.gnormx*hj;iW.y=iC.y+gV.gnormy*hj;h2.x=gV.gnormx;h2.y=gV.gnormy}}}if(he){h2.x=-h2.x;h2.y=-h2.y}gf=gS}else{var hT=i4.polygon;var hw=iH.polygon;var gR=-1e+100;var gP=null;var gD=null;var ez=0;var eh=hT.edges.head;while(eh!=null){var eg=eh.elt;var f6=1e+100;var ef=hw.gverts.next;while(ef!=null){var fl=ef;var hF=eg.gnormx*fl.x+eg.gnormy*fl.y;if(hF1e+100){gR=f6;break}if(f6>0){if(f6>gR){gR=f6;gP=eg;ez=1}}else{if(gR<0&&f6>gR){gR=f6;gP=eg;ez=1}}eh=eh.next}if(gR<1e+100){var ed=hw.edges.head;while(ed!=null){var ee=ed.elt;var f5=1e+100;var ec=hT.gverts.next;while(ec!=null){var fj=ec;var hD=ee.gnormx*fj.x+ee.gnormy*fj.y;if(hD1e+100){gR=f5;break}if(f5>0){if(f5>gR){gR=f5;gD=ee;ez=2}}else{if(gR<0&&f5>gR){gR=f5;gD=ee;ez=2}}ed=ed.next}if(gR<1e+100){var gs;var hg;if(ez==1){gs=hw;hg=gP}else{gs=hT;hg=gD;var gc=iW;iW=iC;iC=gc;he=!he}var g2=null;var f4=1e+100;var ea=gs.edges.head;while(ea!=null){var eb=ea.elt;var hB=hg.gnormx*eb.gnormx+hg.gnormy*eb.gnormy;if(hB=0){var e7=hg.gp0;var eQ=hg.gp1;var gO=g2.gp0;var gA=g2.gp1;var fH=0;var fv=0;var g0=0;var gW=0;fH=eQ.x-e7.x;fv=eQ.y-e7.y;g0=gA.x-gO.x;gW=gA.y-gO.y;var jq=1/(fH*fH+fv*fv);var f8=1/(g0*g0+gW*gW);var en=-(fH*(e7.x-gO.x)+fv*(e7.y-gO.y))*jq;var hi=-(fH*(e7.x-gA.x)+fv*(e7.y-gA.y))*jq;var i2=-(g0*(gO.x-e7.x)+gW*(gO.y-e7.y))*f8;var iG=-(g0*(gO.x-eQ.x)+gW*(gO.y-eQ.y))*f8;if(en<0){en=0}else{if(en>1){en=1}}if(hi<0){hi=0}else{if(hi>1){hi=1}}if(i2<0){i2=0}else{if(i2>1){i2=1}}if(iG<0){iG=0}else{if(iG>1){iG=1}}var jn=0;var jd=0;var hd=en;jn=e7.x+fH*hd;jd=e7.y+fv*hd;var h0=0;var hS=0;var hc=hi;h0=e7.x+fH*hc;hS=e7.y+fv*hc;var eL=0;var ex=0;var hb=i2;eL=gO.x+g0*hb;ex=gO.y+gW*hb;var iF=0;var im=0;var ha=iG;iF=gO.x+g0*ha;im=gO.y+gW*ha;var gn=gO.x;var fT=gO.y;var ir=0;var ic=0;ir=jn-gn;ic=jd-fT;var hY=ir*ir+ic*ic;var gm=gA.x;var fS=gA.y;var iq=0;var ia=0;iq=h0-gm;ia=hS-fS;var hO=iq*iq+ia*ia;var gl=e7.x;var fR=e7.y;var ip=0;var h9=0;ip=eL-gl;h9=ex-fR;var gK=ip*ip+h9*h9;var gj=eQ.x;var fQ=eQ.y;var io=0;var h8=0;io=iF-gj;h8=im-fQ;var gw=io*io+h8*h8;var gt=0;var gr=0;var h7=null;if(hYP.epsilon){h4+=e6*g7;hW+=eP*g7}var g6=(-hg.tp0-hX)*iP;if(g6<-P.epsilon){gQ+=e6*g6;gH+=eP*g6}var gZ=h4*hg.gnormx+hW*hg.gnormy-hg.gprojection;var fO=gQ*hg.gnormx+gH*hg.gnormy-hg.gprojection;if(gZ0){ey.slipped=true}if(jC<=0||ff=40){if(h3>jE){ey.failed=true}break}}ey.toi=ib};de.distanceBody=function(gu,gt,eI,eH){var fu;if(bB.zpp_pool==null){fu=new bB()}else{fu=bB.zpp_pool;bB.zpp_pool=fu.next;fu.next=null}fu.weak=false;var ft;if(bB.zpp_pool==null){ft=new bB()}else{ft=bB.zpp_pool;bB.zpp_pool=ft.next;ft.next=null}ft.weak=false;var gh;if(bB.zpp_pool==null){gh=new bB()}else{gh=bB.zpp_pool;bB.zpp_pool=gh.next;gh.next=null}gh.weak=false;var fQ=1e+100;var eo=gu.shapes.head;while(eo!=null){var fC=eo.elt;var e0=gt.shapes.head;while(e0!=null){var fB=e0.elt;var fa=fC;var eQ=fB;var e6=fu;var eG=ft;var fF;if(fC.type==0&&fB.type==0){var gp=fC.circle;var go=fB.circle;var fw;var f5=0;var f4=0;f5=go.worldCOMx-gp.worldCOMx;f4=go.worldCOMy-gp.worldCOMy;var fA=Math.sqrt(f5*f5+f4*f4);fw=fA-(gp.radius+go.radius);if(fwfQ){eB=fv;break}if(fv>0){if(fv>eB){eB=fv;ef=fV}}else{if(eB<0&&fv>eB){eB=fv;ef=fV}}eZ=eZ.next}if(eB=e7.y*ef.gnormx-e7.x*ef.gnormy){var ep=0;var eh=0;ep=ey.worldCOMx-e7.x;eh=ey.worldCOMy-e7.y;var gv=Math.sqrt(ep*ep+eh*eh);eB=gv-ey.radius;if(eBfQ){ex=el;break}if(el>0){if(el>ex){ex=el;ee=ec;eg=1}}else{if(ex<0&&el>ex){ex=el;ee=ec;eg=1}}eY=eY.next}if(exfQ){ex=ek;break}if(ek>0){if(ek>ex){ex=ek;ed=eb;eg=2}}else{if(ex<0&&ek>ex){ex=ek;ed=eb;eg=2}}eV=eV.next}if(ex=0){var gs=f0.gp0;var gd=f0.gp1;var fU=gf.gp0;var fT=gf.gp1;var en=0;var em=0;var fz=0;var fy=0;en=gd.x-gs.x;em=gd.y-gs.y;fz=fT.x-fU.x;fy=fT.y-fU.y;var fe=1/(en*en+em*em);var eX=1/(fz*fz+fy*fy);var gm=-(en*(gs.x-fU.x)+em*(gs.y-fU.y))*fe;var fY=-(en*(gs.x-fT.x)+em*(gs.y-fT.y))*fe;var e9=-(fz*(fU.x-gs.x)+fy*(fU.y-gs.y))*eX;var eP=-(fz*(fU.x-gd.x)+fy*(fU.y-gd.y))*eX;if(gm<0){gm=0}else{if(gm>1){gm=1}}if(fY<0){fY=0}else{if(fY>1){fY=1}}if(e9<0){e9=0}else{if(e9>1){e9=1}}if(eP<0){eP=0}else{if(eP>1){eP=1}}var f7=0;var f6=0;var gl=gm;f7=gs.x+en*gl;f6=gs.y+em*gl;var fO=0;var fN=0;var gk=fY;fO=gs.x+en*gk;fN=gs.y+em*gk;var eT=0;var eR=0;var gj=e9;eT=fU.x+fz*gj;eR=fU.y+fy*gj;var eA=0;var ez=0;var gi=eP;eA=fU.x+fz*gi;ez=fU.y+fy*gi;var fX=fU.x;var fW=fU.y;var fE=0;var fD=0;fE=f7-fX;fD=f6-fW;var f2=fE*fE+fD*fD;var eO=fT.x;var ew=fT.y;var eL=0;var et=0;eL=fO-eO;et=fN-ew;var f1=eL*eL+et*et;var eN=gs.x;var ev=gs.y;var eK=0;var es=0;eK=eT-eN;es=eR-ev;var fL=eK*eK+es*es;var eM=gd.x;var eu=gd.y;var eJ=0;var er=0;eJ=eA-eM;er=ez-eu;var fJ=eJ*eJ+er*er;var fi=0;var fh=0;var gy=null;if(f2P.epsilon){fg+=eF*ge;ff+=eE*ge}var gc=(-f0.tp0-gz)*fH;if(gc<-P.epsilon){e4+=eF*gc;e3+=eE*gc}var fk=fg*f0.gnormx+ff*f0.gnormy-f0.gprojection;var fd=e4*f0.gnormx+e3*f0.gnormy-f0.gprojection;if(fkfZ){ez=eV;break}if(eV>0){if(eV>ez){ez=eV;ea=fv}}else{if(ez<0&&eV>ez){ez=eV;ea=fv}}fW=fW.next}if(ez=fL.y*ea.gnormx-fL.x*ea.gnormy){var f0=0;var fT=0;f0=fq.worldCOMx-fL.x;fT=fq.worldCOMy-fL.y;var fB=Math.sqrt(f0*f0+fT*fT);ez=fB-fq.radius;if(ezfZ){fu=ge;break}if(ge>0){if(ge>fu){fu=ge;gl=gj;eS=1}}else{if(fu<0&&ge>fu){fu=ge;gl=gj;eS=1}}fP=fP.next}if(fufZ){fu=fo;break}if(fo>0){if(fo>fu){fu=fo;gk=gi;eS=2}}else{if(fu<0&&fo>fu){fu=fo;gk=gi;eS=2}}fM=fM.next}if(fu=0){var e3=fR.gp0;var es=fR.gp1;var fi=fQ.gp0;var fh=fQ.gp1;var e0=0;var eZ=0;var ei=0;var eh=0;e0=es.x-e3.x;eZ=es.y-e3.y;ei=fh.x-fi.x;eh=fh.y-fi.y;var e7=1/(e0*e0+eZ*eZ);var eU=1/(ei*ei+eh*eh);var eI=-(e0*(e3.x-fi.x)+eZ*(e3.y-fi.y))*e7;var gh=-(e0*(e3.x-fh.x)+eZ*(e3.y-fh.y))*e7;var eO=-(ei*(fi.x-e3.x)+eh*(fi.y-e3.y))*eU;var ed=-(ei*(fi.x-es.x)+eh*(fi.y-es.y))*eU;if(eI<0){eI=0}else{if(eI>1){eI=1}}if(gh<0){gh=0}else{if(gh>1){gh=1}}if(eO<0){eO=0}else{if(eO>1){eO=1}}if(ed<0){ed=0}else{if(ed>1){ed=1}}var eY=0;var eW=0;var f2=eI;eY=e3.x+e0*f2;eW=e3.y+eZ*f2;var el=0;var ej=0;var eJ=gh;el=e3.x+e0*eJ;ej=e3.y+eZ*eJ;var eR=0;var eN=0;var eH=eO;eR=fi.x+ei*eH;eN=fi.y+eh*eH;var ef=0;var ec=0;var eF=ed;ef=fi.x+ei*eF;ec=fi.y+eh*eF;var fs=fi.x;var fp=fi.y;var eG=0;var eE=0;eG=eY-fs;eE=eW-fp;var fx=eG*eG+eE*eE;var eT=fh.x;var eg=fh.y;var eB=0;var gf=0;eB=el-eT;gf=ej-eg;var fw=eB*eB+gf*gf;var eQ=e3.x;var ee=e3.y;var ey=0;var gd=0;ey=eR-eQ;gd=eN-ee;var e9=ey*ey+gd*gd;var eM=es.x;var eb=es.y;var ew=0;var gc=0;ew=ef-eM;gc=ec-eb;var e8=ew*ew+gc*gc;var fF=0;var fD=0;var eu=null;if(fxP.epsilon){ft+=eo*eA;fr+=em*eA}var ex=(-fR.tp0-fU)*f5;if(ex<-P.epsilon){e6+=eo*ex;e5+=em*ex}var fH=ft*fR.gnormx+fr*fR.gnormy-fR.gprojection;var fj=e6*fR.gnormx+e5*fR.gnormy-fR.gprojection;if(fH=ea.id){if(eb.id==ea.id){return eb.di0&&ea.next!=null){this.erase(ea)}return ea.next};k.prototype.clear=function(){};k.prototype.inlined_clear=function(){};k.prototype.reverse=function(){var ec=this.next;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.next=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};k.prototype.empty=function(){return this.next==null};k.prototype.size=function(){return this.length};k.prototype.has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};k.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};k.prototype.front=function(){return this.next};k.prototype.back=function(){var ea=this.next;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea};k.prototype.iterator_at=function(eb){var ea=this.next;while(eb-->0&&ea!=null){ea=ea.next}return ea};k.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea}else{return null}};k.prototype.free=function(){this.a=this.b=null;this.node=null};k.prototype.alloc=function(){};k.prototype.a=null;k.prototype.b=null;k.prototype.id=null;k.prototype.di=null;k.prototype.node=null;k.prototype.__class__=k;var z=zpp_nape.geom.ZPP_Triangular=function(){};z.__name__=["zpp_nape","geom","ZPP_Triangular"];z.lt=function(eb,ea){if(!(eb.y=0)){ed=ea.x-ec.x;eb=ea.y-ec.y;ek=ec.x-ee.x;ej=ec.y-ee.y;eg=ej*ed-ek*eb>=0}else{eg=true}if(!eg){ed=ef.x-ea.x;eb=ef.y-ea.y;ek=ea.x-ec.x;ej=ea.y-ec.y;eh=ej*ed-ek*eb>=0}else{eh=true}if(!eh){ed=ee.x-ef.x;eb=ee.y-ef.y;ek=ef.x-ea.x;ej=ef.y-ea.y;ei=ej*ed-ek*eb>=0}else{ei=true}if(ei){return true}return ee.x*(ec.y*ea.mag-ec.mag*ea.y)-ec.x*(ee.y*ea.mag-ee.mag*ea.y)+ea.x*(ee.y*ec.mag-ee.mag*ec.y)-(ef.x*(ec.y*ea.mag-ec.mag*ea.y)-ec.x*(ef.y*ea.mag-ef.mag*ea.y)+ea.x*(ef.y*ec.mag-ef.mag*ec.y))+(ef.x*(ee.y*ea.mag-ee.mag*ea.y)-ee.x*(ef.y*ea.mag-ef.mag*ea.y)+ea.x*(ef.y*ee.mag-ef.mag*ee.y))-(ef.x*(ee.y*ec.mag-ee.mag*ec.y)-ee.x*(ef.y*ec.mag-ef.mag*ec.y)+ec.x*(ef.y*ee.mag-ef.mag*ee.y))>0};z.optimise=function(ee){var eh=ee.vertices;var ef=ee.vertices;if(eh!=null){var ew=eh;while(true){var eq=ew;eq.sort();eq.mag=eq.x*eq.x+eq.y*eq.y;ew=ew.next;if(!(ew!=ef)){break}}}if(z.edgeSet==null){if(am.zpp_pool==null){z.edgeSet=new am()}else{z.edgeSet=am.zpp_pool;am.zpp_pool=z.edgeSet.next;z.edgeSet.next=null}z.edgeSet.lt=k.edge_lt;z.edgeSet.swapped=k.edge_swap}var eu;if(k.zpp_pool==null){eu=new k()}else{eu=k.zpp_pool;k.zpp_pool=eu.next;eu.next=null}var ev=ee.vertices;var ex=ee.vertices;if(ev!=null){var ea=ev;while(true){var ec=ea;var eg=ec.next;ec.diagonals.reverse();var et=ec.diagonals.head;while(et!=null){var en=et.elt;if(en.id=0||!eb.rightchain&&et<=0){break}ef.add_diagonal(ec,eb);em=ec;z.stack.pop()}z.stack.add(em)}z.stack.add(eb);eo=eb}if(z.stack.head!=null){z.stack.pop();while(z.stack.head!=null){var ea=z.stack.pop_unsafe();if(z.stack.head==null){break}ef.add_diagonal(er,ea)}}return ef};z.prototype.__class__=z;var bB=zpp_nape.geom.ZPP_Vec2=function(){this.y=0;this.x=0;this.length=0;this.pushmod=false;this.modified=false;this._inuse=false;this.next=null;this.weak=false;this.outer=null;this._isimmutable=null;this._immutable=false;this._validate=null;this._invalidate=null};bB.__name__=["zpp_nape","geom","ZPP_Vec2"];bB.get=function(ea,ed,ec){if(ec==null){ec=false}var eb;if(bB.zpp_pool==null){eb=new bB()}else{eb=bB.zpp_pool;bB.zpp_pool=eb.next;eb.next=null}eb.weak=false;eb._immutable=ec;eb.x=ea;eb.y=ed;return eb};bB.prototype._invalidate=null;bB.prototype._validate=null;bB.prototype.validate=function(){if(this._validate!=null){this._validate()}};bB.prototype.invalidate=function(){if(this._invalidate!=null){this._invalidate(this)}};bB.prototype._immutable=null;bB.prototype._isimmutable=null;bB.prototype.immutable=function(){};bB.prototype.outer=null;bB.prototype.wrapper=function(){if(this.outer==null){this.outer=new r();var ea=this.outer.zpp_inner;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea._isimmutable=null;ea._validate=null;ea._invalidate=null;ea.next=bB.zpp_pool;bB.zpp_pool=ea;this.outer.zpp_inner=this}return this.outer};bB.prototype.weak=null;bB.prototype.free=function(){if(this.outer!=null){this.outer.zpp_inner=null;this.outer=null}this._isimmutable=null;this._validate=null;this._invalidate=null};bB.prototype.alloc=function(){this.weak=false};bB.prototype.next=null;bB.prototype.elem=function(){return this};bB.prototype.begin=function(){return this.next};bB.prototype._inuse=null;bB.prototype.modified=null;bB.prototype.pushmod=null;bB.prototype.length=null;bB.prototype.setbegin=function(ea){this.next=ea;this.modified=true;this.pushmod=true};bB.prototype.add=function(ea){ea._inuse=true;ea.next=this.next;this.next=ea;this.modified=true;this.length++;return ea};bB.prototype.inlined_add=function(ea){ea._inuse=true;ea.next=this.next;this.next=ea;this.modified=true;this.length++;return ea};bB.prototype.addAll=function(ea){var eb=ea.next;while(eb!=null){this.add(eb);eb=eb.next}};bB.prototype.insert=function(eb,ea){ea._inuse=true;if(eb==null){ea.next=this.next;this.next=ea}else{ea.next=eb.next;eb.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bB.prototype.inlined_insert=function(eb,ea){ea._inuse=true;if(eb==null){ea.next=this.next;this.next=ea}else{ea.next=eb.next;eb.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bB.prototype.pop=function(){var ea=this.next;this.next=ea.next;ea._inuse=false;if(this.next==null){this.pushmod=true}this.modified=true;this.length--};bB.prototype.inlined_pop=function(){var ea=this.next;this.next=ea.next;ea._inuse=false;if(this.next==null){this.pushmod=true}this.modified=true;this.length--};bB.prototype.pop_unsafe=function(){var ea=this.next;this.pop();return ea};bB.prototype.inlined_pop_unsafe=function(){var ea=this.next;this.pop();return ea};bB.prototype.remove=function(ed){var ec=null;var ee=this.next;while(ee!=null){if(ee==ed){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;break}ec=ee;ee=ee.next}};bB.prototype.try_remove=function(ec){var eb=null;var ed=this.next;var ea=false;while(ed!=null){if(ed==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bB.prototype.inlined_remove=function(ed){var ec=null;var ee=this.next;while(ee!=null){if(ee==ed){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;break}ec=ee;ee=ee.next}};bB.prototype.inlined_try_remove=function(ee){var ed=null;var ef=this.next;var eb=false;while(ef!=null){if(ef==ee){var ea;var ec;if(ed==null){ea=this.next;ec=ea.next;this.next=ec;if(this.next==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=ef;ef=ef.next}return eb};bB.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;return eb};bB.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.next;eb=ea.next;this.next=eb;if(this.next==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}ea._inuse=false;this.modified=true;this.length--;this.pushmod=true;return eb};bB.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bB.prototype.clear=function(){};bB.prototype.inlined_clear=function(){};bB.prototype.reverse=function(){var ec=this.next;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.next=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bB.prototype.empty=function(){return this.next==null};bB.prototype.size=function(){return this.length};bB.prototype.has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};bB.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};bB.prototype.front=function(){return this.next};bB.prototype.back=function(){var ea=this.next;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea};bB.prototype.iterator_at=function(eb){var ea=this.next;while(eb-->0&&ea!=null){ea=ea.next}return ea};bB.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea}else{return null}};bB.prototype.x=null;bB.prototype.y=null;bB.prototype.copy=function(){var ea=this.x;var ec=this.y;var eb;if(bB.zpp_pool==null){eb=new bB()}else{eb=bB.zpp_pool;bB.zpp_pool=eb.next;eb.next=null}eb.weak=false;eb._immutable=false;eb.x=ea;eb.y=ec;return eb};bB.prototype.toString=function(){return"{ x: "+this.x+" y: "+this.y+" }"};bB.prototype.__class__=bB;var bA=zpp_nape.geom.ZPP_Vec3=function(){this._validate=null;this.immutable=false;this.z=0;this.y=0;this.x=0;this.outer=null;this.immutable=false;this._validate=null};bA.__name__=["zpp_nape","geom","ZPP_Vec3"];bA.prototype.outer=null;bA.prototype.x=null;bA.prototype.y=null;bA.prototype.z=null;bA.prototype.immutable=null;bA.prototype._validate=null;bA.prototype.validate=function(){if(this._validate!=null){this._validate()}};bA.prototype.__class__=bA;var c9=zpp_nape.geom.ZPP_VecMath=function(){};c9.__name__=["zpp_nape","geom","ZPP_VecMath"];c9.vec_dsq=function(ed,ec,ef,ee){var eb=0;var ea=0;eb=ed-ef;ea=ec-ee;return eb*eb+ea*ea};c9.vec_distance=function(ed,ec,ef,ee){var eb=0;var ea=0;eb=ed-ef;ea=ec-ee;return Math.sqrt(eb*eb+ea*ea)};c9.prototype.__class__=c9;var dM=zpp_nape.phys.ZPP_Interactor=function(){this.wrap_cbTypes=null;this.cbSet=null;this.cbTypes=null;this.group=null;this.cbsets=null;this.icompound=null;this.ibody=null;this.ishape=null;this.userData=null;this.id=0;this.outer_i=null;this.id=cr.Interactor();this.cbsets=new dF();this.cbTypes=new x()};dM.__name__=["zpp_nape","phys","ZPP_Interactor"];dM.get=function(eg,ee){var eh=eg.idef){ed=false}else{var ea=this.posx;var em=this.posy;var ej=this.pre_posx;var ei=this.pre_posy;var en=0;var el=0;en=ea-ej;el=em-ei;if(en*en+el*el>0.25*ef*eb*eb){ed=false}else{var ek=0;var eh=0;ek=this.aabb.maxx-this.aabb.minx;eh=this.aabb.maxy-this.aabb.miny;var ee=ek*ek+eh*eh;var eg=P.angularSleepThreshold;eg*=eg;if(4*this.angvel*this.angvel*ee>eg){ed=false}else{var ec=this.rot-this.pre_rot;if(ec*ec*ee>eg*eb*eb){ed=false}else{ed=true}}}}if(!ed){this.component.waket=this.space.stamp}return this.component.waket+P.sleepDelay0.0001){this.axisx=Math.sin(this.rot);this.axisy=Math.cos(this.rot)}else{var ec=ef*ef;var ee=1-0.5*ec;var eb=1-ec*ec/8;var ea=(ee*this.axisx+ef*this.axisy)*eb;this.axisy=(ee*this.axisy-ef*this.axisx)*eb;this.axisx=ea}}}};cj.prototype.sweepValidate=function(em){if(em.type==0){em.worldCOMx=this.posx+(this.axisy*em.localCOMx-this.axisx*em.localCOMy);em.worldCOMy=this.posy+(em.localCOMx*this.axisx+em.localCOMy*this.axisy)}else{var eb=em.polygon;var ek=eb.lverts.next;var ec=eb.gverts.next;while(ec!=null){var ee=ec;var ed=ek;ek=ek.next;ee.x=this.posx+(this.axisy*ed.x-this.axisx*ed.y);ee.y=this.posy+(ed.x*this.axisx+ed.y*this.axisy);ec=ec.next}var ea=eb.edges.head;var ei=eb.gverts.next;var el=ei;ei=ei.next;while(ei!=null){var ej=ei;var ef=ea.elt;ea=ea.next;ef.gnormx=this.axisy*ef.lnormx-this.axisx*ef.lnormy;ef.gnormy=ef.lnormx*this.axisx+ef.lnormy*this.axisy;ef.gprojection=this.posx*ef.gnormx+this.posy*ef.gnormy+ef.lprojection;ef.tp0=el.y*ef.gnormx-el.x*ef.gnormy;ef.tp1=ej.y*ef.gnormx-ej.x*ef.gnormy;el=ej;ei=ei.next}var eh=eb.gverts.next;var eg=ea.elt;eg.gnormx=this.axisy*eg.lnormx-this.axisx*eg.lnormy;eg.gnormy=eg.lnormx*this.axisx+eg.lnormy*this.axisy;eg.gprojection=this.posx*eg.gnormx+this.posy*eg.gnormy+eg.lprojection;eg.tp0=el.y*eg.gnormx-el.x*eg.gnormy;eg.tp1=eh.y*eg.gnormx-eh.x*eg.gnormy}};cj.prototype.pre_posx=null;cj.prototype.pre_posy=null;cj.prototype.posx=null;cj.prototype.posy=null;cj.prototype.wrap_pos=null;cj.prototype.velx=null;cj.prototype.vely=null;cj.prototype.wrap_vel=null;cj.prototype.forcex=null;cj.prototype.forcey=null;cj.prototype.wrap_force=null;cj.prototype.kinvelx=null;cj.prototype.kinvely=null;cj.prototype.wrap_kinvel=null;cj.prototype.svelx=null;cj.prototype.svely=null;cj.prototype.wrap_svel=null;cj.prototype.invalidate_pos=function(){var ea=this.shapes.head;while(ea!=null){var eb=ea.elt;if(eb.type==1){eb.polygon.invalidate_gverts();eb.polygon.invalidate_gaxi()}eb.invalidate_worldCOM();ea=ea.next}this.zip_worldCOM=true};cj.prototype.pos_invalidate=function(ec){this.immutable_midstep("Body::position");if(!(this.posx==ec.x&&this.posy==ec.y)){this.posx=ec.x;this.posy=ec.y;var ea=this.shapes.head;while(ea!=null){var eb=ea.elt;if(eb.type==1){eb.polygon.invalidate_gverts();eb.polygon.invalidate_gaxi()}eb.invalidate_worldCOM();ea=ea.next}this.zip_worldCOM=true;this.wake()}};cj.prototype.pos_validate=function(){this.wrap_pos.zpp_inner.x=this.posx;this.wrap_pos.zpp_inner.y=this.posy};cj.prototype.vel_invalidate=function(ea){this.velx=ea.x;this.vely=ea.y;this.wake()};cj.prototype.vel_validate=function(){this.wrap_vel.zpp_inner.x=this.velx;this.wrap_vel.zpp_inner.y=this.vely};cj.prototype.kinvel_invalidate=function(ea){this.kinvelx=ea.x;this.kinvely=ea.y;this.wake()};cj.prototype.kinvel_validate=function(){this.wrap_kinvel.zpp_inner.x=this.kinvelx;this.wrap_kinvel.zpp_inner.y=this.kinvely};cj.prototype.svel_invalidate=function(ea){this.svelx=ea.x;this.svely=ea.y;this.wake()};cj.prototype.svel_validate=function(){this.wrap_svel.zpp_inner.x=this.svelx;this.wrap_svel.zpp_inner.y=this.svely};cj.prototype.force_invalidate=function(ea){this.forcex=ea.x;this.forcey=ea.y;this.wake()};cj.prototype.force_validate=function(){this.wrap_force.zpp_inner.x=this.forcex;this.wrap_force.zpp_inner.y=this.forcey};cj.prototype.setupPosition=function(){var ea=this.posx;var eh=this.posy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_pos=eb;this.wrap_pos.zpp_inner._inuse=true;if(this.world){this.wrap_pos.zpp_inner._immutable=true}else{this.wrap_pos.zpp_inner._invalidate=dX(this,this.pos_invalidate);this.wrap_pos.zpp_inner._validate=dX(this,this.pos_validate)}};cj.prototype.setupVelocity=function(){var ea=this.velx;var eh=this.vely;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_vel=eb;this.wrap_vel.zpp_inner._inuse=true;if(this.world){this.wrap_vel.zpp_inner._immutable=true}else{this.wrap_vel.zpp_inner._invalidate=dX(this,this.vel_invalidate);this.wrap_vel.zpp_inner._validate=dX(this,this.vel_validate)}};cj.prototype.setupkinvel=function(){var ea=this.kinvelx;var eh=this.kinvely;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_kinvel=eb;this.wrap_kinvel.zpp_inner._inuse=true;if(this.world){this.wrap_kinvel.zpp_inner._immutable=true}else{this.wrap_kinvel.zpp_inner._invalidate=dX(this,this.kinvel_invalidate);this.wrap_kinvel.zpp_inner._validate=dX(this,this.kinvel_validate)}};cj.prototype.setupsvel=function(){var ea=this.svelx;var eh=this.svely;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_svel=eb;this.wrap_svel.zpp_inner._inuse=true;if(this.world){this.wrap_svel.zpp_inner._immutable=true}else{this.wrap_svel.zpp_inner._invalidate=dX(this,this.svel_invalidate);this.wrap_svel.zpp_inner._validate=dX(this,this.svel_validate)}};cj.prototype.setupForce=function(){var ea=this.forcex;var eh=this.forcey;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_force=eb;this.wrap_force.zpp_inner._inuse=true;if(this.world){this.wrap_force.zpp_inner._immutable=true}else{this.wrap_force.zpp_inner._invalidate=dX(this,this.force_invalidate);this.wrap_force.zpp_inner._validate=dX(this,this.force_validate)}};cj.prototype.cvel_validate=function(){this.wrapcvel.zpp_inner.x=this.velx+this.kinvelx;this.wrapcvel.zpp_inner.y=this.vely+this.kinvely;this.wrapcvel.zpp_inner.z=this.angvel+this.kinangvel};cj.prototype.wrapcvel=null;cj.prototype.setup_cvel=function(){this.wrapcvel=q.get();this.wrapcvel.zpp_inner.immutable=true;this.wrapcvel.zpp_inner._validate=dX(this,this.cvel_validate)};cj.prototype.angvel=null;cj.prototype.torque=null;cj.prototype.kinangvel=null;cj.prototype.pre_rot=null;cj.prototype.rot=null;cj.prototype.invalidate_rot=function(){this.zip_axis=true;var ea=this.shapes.head;while(ea!=null){var eb=ea.elt;if(eb.type==1){eb.polygon.invalidate_gverts();eb.polygon.invalidate_gaxi()}eb.invalidate_worldCOM();ea=ea.next}this.zip_worldCOM=true};cj.prototype.axisx=null;cj.prototype.axisy=null;cj.prototype.zip_axis=null;cj.prototype.validate_axis=function(){if(this.zip_axis){this.zip_axis=false;this.axisx=Math.sin(this.rot);this.axisy=Math.cos(this.rot)}};cj.prototype.quick_validate_axis=function(){this.axisx=Math.sin(this.rot);this.axisy=Math.cos(this.rot)};cj.prototype.delta_rot=function(ee){this.rot+=ee;if(ee*ee>0.0001){this.axisx=Math.sin(this.rot);this.axisy=Math.cos(this.rot)}else{var ec=ee*ee;var ed=1-0.5*ec;var eb=1-ec*ec/8;var ea=(ed*this.axisx+ee*this.axisy)*eb;this.axisy=(ed*this.axisy-ee*this.axisx)*eb;this.axisx=ea}};cj.prototype.kinematicDelaySleep=null;cj.prototype.mass=null;cj.prototype.zip_mass=null;cj.prototype.massMode=null;cj.prototype.imass=null;cj.prototype.smass=null;cj.prototype.cmass=null;cj.prototype.nomove=null;cj.prototype.invalidate_mass=function(){this.zip_mass=true;this.invalidate_gravMass()};cj.prototype.validate_mass=function(){if(this.zip_mass||this.massMode==0&&false){this.zip_mass=false;if(this.massMode==0){this.cmass=0;var ea=this.shapes.head;while(ea!=null){var eb=ea.elt;eb.refmaterial.density=eb.material.density;eb.validate_area_inertia();this.cmass+=eb.area*eb.material.density;ea=ea.next}}if(this.type==2&&!this.nomove){this.mass=this.cmass;this.imass=this.smass=1/this.mass}else{this.mass=Infinity;this.imass=this.smass=0}}};cj.prototype.gravMass=null;cj.prototype.zip_gravMass=null;cj.prototype.gravMassMode=null;cj.prototype.gravMassScale=null;cj.prototype.zip_gravMassScale=null;cj.prototype.invalidate_gravMass=function(){if(this.gravMassMode!=1){this.zip_gravMass=true}if(this.gravMassMode!=2){this.zip_gravMassScale=true}this.wake()};cj.prototype.validate_gravMass=function(){if(this.zip_gravMass){this.zip_gravMass=false;this.validate_mass();if(this.gravMassMode==0){this.validate_mass();this.gravMass=this.cmass}else{if(this.gravMassMode==2){this.validate_mass();this.gravMass=this.cmass*this.gravMassScale}}}};cj.prototype.invalidate_gravMassScale=function(){if(this.gravMassMode!=2){this.zip_gravMassScale=true}else{this.invalidate_gravMass()}};cj.prototype.validate_gravMassScale=function(){if(this.zip_gravMassScale){this.zip_gravMassScale=false;if(this.gravMassMode==0){this.gravMassScale=1}else{if(this.gravMassMode==1){this.validate_mass();this.gravMassScale=this.gravMass/this.cmass}}}};cj.prototype.inertiaMode=null;cj.prototype.inertia=null;cj.prototype.zip_inertia=null;cj.prototype.cinertia=null;cj.prototype.iinertia=null;cj.prototype.sinertia=null;cj.prototype.norotate=null;cj.prototype.invalidate_inertia=function(){this.zip_inertia=true;this.wake()};cj.prototype.validate_inertia=function(){if(this.zip_inertia||this.inertiaMode==0&&false){this.zip_inertia=false;if(this.inertiaMode==0){this.cinertia=0;var ea=this.shapes.head;while(ea!=null){var eb=ea.elt;eb.refmaterial.density=eb.material.density;eb.validate_area_inertia();this.cinertia+=eb.inertia*eb.area*eb.material.density;ea=ea.next}}if(this.type==2&&!this.norotate){this.inertia=this.cinertia;this.sinertia=this.iinertia=1/this.inertia}else{this.inertia=Infinity;this.sinertia=this.iinertia=0}}};cj.prototype.invalidate_wake=function(){this.wake()};cj.prototype.aabb=null;cj.prototype.zip_aabb=null;cj.prototype.validate_aabb=function(){if(this.zip_aabb){this.zip_aabb=false;this.aabb.minx=Infinity;this.aabb.miny=Infinity;this.aabb.maxx=-Infinity;this.aabb.maxy=-Infinity;var eu=this.shapes.head;while(eu!=null){var eo=eu.elt;if(eo.zip_aabb){if(eo.body!=null){eo.zip_aabb=false;if(eo.type==0){var ev=eo.circle;if(ev.zip_worldCOM){if(ev.body!=null){ev.zip_worldCOM=false;if(ev.zip_localCOM){ev.zip_localCOM=false;if(ev.type==1){var eB=ev.polygon;if(eB.lverts.next.next==null){eB.localCOMx=eB.lverts.next.x;eB.localCOMy=eB.lverts.next.y}else{if(eB.lverts.next.next.next==null){eB.localCOMx=eB.lverts.next.x;eB.localCOMy=eB.lverts.next.y;eB.localCOMx+=eB.lverts.next.next.x;eB.localCOMy+=eB.lverts.next.next.y;eB.localCOMx*=0.5;eB.localCOMy*=0.5}else{eB.localCOMx=0;eB.localCOMy=0;var eC=0;var es=eB.lverts.next;var ek=es;es=es.next;var ej=es;es=es.next;while(es!=null){var eh=es;eC+=ej.x*(eh.y-ek.y);var en=eh.y*ej.x-eh.x*ej.y;eB.localCOMx+=(ej.x+eh.x)*en;eB.localCOMy+=(ej.y+eh.y)*en;ek=ej;ej=eh;es=es.next}es=eB.lverts.next;var ei=es;eC+=ej.x*(ei.y-ek.y);var ef=ei.y*ej.x-ei.x*ej.y;eB.localCOMx+=(ej.x+ei.x)*ef;eB.localCOMy+=(ej.y+ei.y)*ef;ek=ej;es=es.next;var eg=es;eC+=ei.x*(eg.y-ek.y);var ed=eg.y*ei.x-eg.x*ei.y;eB.localCOMx+=(ei.x+eg.x)*ed;eB.localCOMy+=(ei.y+eg.y)*ed;eC=1/(3*eC);var em=eC;eB.localCOMx*=em;eB.localCOMy*=em}}}if(ev.wrap_localCOM!=null){ev.wrap_localCOM.zpp_inner.x=ev.localCOMx;ev.wrap_localCOM.zpp_inner.y=ev.localCOMy}}var eA=ev.body;if(eA.zip_axis){eA.zip_axis=false;eA.axisx=Math.sin(eA.rot);eA.axisy=Math.cos(eA.rot)}ev.worldCOMx=ev.body.posx+(ev.body.axisy*ev.localCOMx-ev.body.axisx*ev.localCOMy);ev.worldCOMy=ev.body.posy+(ev.localCOMx*ev.body.axisx+ev.localCOMy*ev.body.axisy)}}var ec=ev.radius;var eb=ev.radius;ev.aabb.minx=ev.worldCOMx-ec;ev.aabb.miny=ev.worldCOMy-eb;ev.aabb.maxx=ev.worldCOMx+ec;ev.aabb.maxy=ev.worldCOMy+eb}else{var ey=eo.polygon;if(ey.zip_gverts){if(ey.body!=null){ey.zip_gverts=false;ey.validate_lverts();var ex=ey.body;if(ex.zip_axis){ex.zip_axis=false;ex.axisx=Math.sin(ex.rot);ex.axisy=Math.cos(ex.rot)}var el=ey.lverts.next;var er=ey.gverts.next;while(er!=null){var ez=er;var et=el;el=el.next;ez.x=ey.body.posx+(ey.body.axisy*et.x-ey.body.axisx*et.y);ez.y=ey.body.posy+(et.x*ey.body.axisx+et.y*ey.body.axisy);er=er.next}}}var ea=ey.gverts.next;ey.aabb.minx=ea.x;ey.aabb.miny=ea.y;ey.aabb.maxx=ea.x;ey.aabb.maxy=ea.y;var ep=ey.gverts.next.next;while(ep!=null){var eq=ep;if(eq.xey.aabb.maxx){ey.aabb.maxx=eq.x}if(eq.yey.aabb.maxy){ey.aabb.maxy=eq.y}ep=ep.next}}}}var ew=this.aabb;var ee=eo.aabb;if(ee.minxew.maxx){ew.maxx=ee.maxx}if(ee.minyew.maxy){ew.maxy=ee.maxy}eu=eu.next}}};cj.prototype.invalidate_aabb=function(){this.zip_aabb=true};cj.prototype.localCOMx=null;cj.prototype.localCOMy=null;cj.prototype.zip_localCOM=null;cj.prototype.worldCOMx=null;cj.prototype.worldCOMy=null;cj.prototype.zip_worldCOM=null;cj.prototype.wrap_localCOM=null;cj.prototype.wrap_worldCOM=null;cj.prototype.invalidate_localCOM=function(){this.zip_localCOM=true;this.zip_worldCOM=true};cj.prototype.invalidate_worldCOM=function(){this.zip_worldCOM=true};cj.prototype.validate_localCOM=function(){if(this.zip_localCOM){this.zip_localCOM=false;var ek=0;var ei=0;var ea=0;var eq=this.shapes.head;while(eq!=null){var eo=eq.elt;if(eo.zip_localCOM){eo.zip_localCOM=false;if(eo.type==1){var er=eo.polygon;if(er.lverts.next.next==null){er.localCOMx=er.lverts.next.x;er.localCOMy=er.lverts.next.y}else{if(er.lverts.next.next.next==null){er.localCOMx=er.lverts.next.x;er.localCOMy=er.lverts.next.y;er.localCOMx+=er.lverts.next.next.x;er.localCOMy+=er.lverts.next.next.y;er.localCOMx*=0.5;er.localCOMy*=0.5}else{er.localCOMx=0;er.localCOMy=0;var es=0;var ep=er.lverts.next;var el=ep;ep=ep.next;var ej=ep;ep=ep.next;while(ep!=null){var eg=ep;es+=ej.x*(eg.y-el.y);var en=eg.y*ej.x-eg.x*ej.y;er.localCOMx+=(ej.x+eg.x)*en;er.localCOMy+=(ej.y+eg.y)*en;el=ej;ej=eg;ep=ep.next}ep=er.lverts.next;var eh=ep;es+=ej.x*(eh.y-el.y);var ee=eh.y*ej.x-eh.x*ej.y;er.localCOMx+=(ej.x+eh.x)*ee;er.localCOMy+=(ej.y+eh.y)*ee;el=ej;ep=ep.next;var ef=ep;es+=eh.x*(ef.y-el.y);var ec=ef.y*eh.x-ef.x*eh.y;er.localCOMx+=(eh.x+ef.x)*ec;er.localCOMy+=(eh.y+ef.y)*ec;es=1/(3*es);var em=es;er.localCOMx*=em;er.localCOMy*=em}}}if(eo.wrap_localCOM!=null){eo.wrap_localCOM.zpp_inner.x=eo.localCOMx;eo.wrap_localCOM.zpp_inner.y=eo.localCOMy}}eo.validate_area_inertia();var ed=eo.area*eo.material.density;ek+=eo.localCOMx*ed;ei+=eo.localCOMy*ed;ea+=eo.area*eo.material.density;eq=eq.next}if(ea!=0){var eb=1/ea;this.localCOMx=ek*eb;this.localCOMy=ei*eb}if(this.wrap_localCOM!=null){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy}if(this.zip_mass&&this.massMode==0){this.zip_mass=false;this.cmass=ea;if(this.type==2){this.mass=this.cmass;this.imass=this.smass=1/this.mass}else{this.mass=Infinity;this.imass=this.smass=0}}}};cj.prototype.validate_worldCOM=function(){if(this.zip_worldCOM){this.zip_worldCOM=false;this.validate_localCOM();if(this.zip_axis){this.zip_axis=false;this.axisx=Math.sin(this.rot);this.axisy=Math.cos(this.rot)}this.worldCOMx=this.posx+(this.axisy*this.localCOMx-this.axisx*this.localCOMy);this.worldCOMy=this.posy+(this.localCOMx*this.axisx+this.localCOMy*this.axisy);if(this.wrap_worldCOM!=null){this.wrap_worldCOM.zpp_inner.x=this.worldCOMx;this.wrap_worldCOM.zpp_inner.y=this.worldCOMy}}};cj.prototype.getlocalCOM=function(){this.validate_localCOM()};cj.prototype.getworldCOM=function(){this.validate_worldCOM()};cj.prototype.__immutable_midstep=function(ea){};cj.prototype.clear=function(){while(this.shapes.head!=null){var ed=this.shapes.pop_unsafe();ed.removedFromBody();ed.body=null}this.invalidate_shapes();this.pre_posx=0;this.pre_posy=0;this.posx=0;this.posy=0;this.velx=0;this.vely=0;this.forcex=0;this.forcey=0;this.kinvelx=0;this.kinvely=0;this.svelx=0;this.svely=0;this.angvel=this.torque=this.kinangvel=this.pre_rot=this.rot=0;var ec=this.shapes.head;while(ec!=null){var eb=ec.elt;if(eb.type==1){eb.polygon.invalidate_gverts();eb.polygon.invalidate_gaxi()}eb.invalidate_worldCOM();ec=ec.next}this.zip_worldCOM=true;this.zip_axis=true;var ee=this.shapes.head;while(ee!=null){var ea=ee.elt;if(ea.type==1){ea.polygon.invalidate_gverts();ea.polygon.invalidate_gaxi()}ea.invalidate_worldCOM();ee=ee.next}this.zip_worldCOM=true;this.axisx=0;this.axisy=1;this.zip_axis=false;this.massMode=0;this.gravMassMode=0;this.gravMassScale=1;this.inertiaMode=0;this.norotate=false;this.nomove=false};cj.prototype.aabb_validate=function(){if(this.zip_aabb){this.zip_aabb=false;this.aabb.minx=Infinity;this.aabb.miny=Infinity;this.aabb.maxx=-Infinity;this.aabb.maxy=-Infinity;var eu=this.shapes.head;while(eu!=null){var eo=eu.elt;if(eo.zip_aabb){if(eo.body!=null){eo.zip_aabb=false;if(eo.type==0){var ev=eo.circle;if(ev.zip_worldCOM){if(ev.body!=null){ev.zip_worldCOM=false;if(ev.zip_localCOM){ev.zip_localCOM=false;if(ev.type==1){var eB=ev.polygon;if(eB.lverts.next.next==null){eB.localCOMx=eB.lverts.next.x;eB.localCOMy=eB.lverts.next.y}else{if(eB.lverts.next.next.next==null){eB.localCOMx=eB.lverts.next.x;eB.localCOMy=eB.lverts.next.y;eB.localCOMx+=eB.lverts.next.next.x;eB.localCOMy+=eB.lverts.next.next.y;eB.localCOMx*=0.5;eB.localCOMy*=0.5}else{eB.localCOMx=0;eB.localCOMy=0;var eC=0;var es=eB.lverts.next;var ek=es;es=es.next;var ej=es;es=es.next;while(es!=null){var eh=es;eC+=ej.x*(eh.y-ek.y);var en=eh.y*ej.x-eh.x*ej.y;eB.localCOMx+=(ej.x+eh.x)*en;eB.localCOMy+=(ej.y+eh.y)*en;ek=ej;ej=eh;es=es.next}es=eB.lverts.next;var ei=es;eC+=ej.x*(ei.y-ek.y);var ef=ei.y*ej.x-ei.x*ej.y;eB.localCOMx+=(ej.x+ei.x)*ef;eB.localCOMy+=(ej.y+ei.y)*ef;ek=ej;es=es.next;var eg=es;eC+=ei.x*(eg.y-ek.y);var ed=eg.y*ei.x-eg.x*ei.y;eB.localCOMx+=(ei.x+eg.x)*ed;eB.localCOMy+=(ei.y+eg.y)*ed;eC=1/(3*eC);var em=eC;eB.localCOMx*=em;eB.localCOMy*=em}}}if(ev.wrap_localCOM!=null){ev.wrap_localCOM.zpp_inner.x=ev.localCOMx;ev.wrap_localCOM.zpp_inner.y=ev.localCOMy}}var eA=ev.body;if(eA.zip_axis){eA.zip_axis=false;eA.axisx=Math.sin(eA.rot);eA.axisy=Math.cos(eA.rot)}ev.worldCOMx=ev.body.posx+(ev.body.axisy*ev.localCOMx-ev.body.axisx*ev.localCOMy);ev.worldCOMy=ev.body.posy+(ev.localCOMx*ev.body.axisx+ev.localCOMy*ev.body.axisy)}}var ec=ev.radius;var eb=ev.radius;ev.aabb.minx=ev.worldCOMx-ec;ev.aabb.miny=ev.worldCOMy-eb;ev.aabb.maxx=ev.worldCOMx+ec;ev.aabb.maxy=ev.worldCOMy+eb}else{var ey=eo.polygon;if(ey.zip_gverts){if(ey.body!=null){ey.zip_gverts=false;ey.validate_lverts();var ex=ey.body;if(ex.zip_axis){ex.zip_axis=false;ex.axisx=Math.sin(ex.rot);ex.axisy=Math.cos(ex.rot)}var el=ey.lverts.next;var er=ey.gverts.next;while(er!=null){var ez=er;var et=el;el=el.next;ez.x=ey.body.posx+(ey.body.axisy*et.x-ey.body.axisx*et.y);ez.y=ey.body.posy+(et.x*ey.body.axisx+et.y*ey.body.axisy);er=er.next}}}var ea=ey.gverts.next;ey.aabb.minx=ea.x;ey.aabb.miny=ea.y;ey.aabb.maxx=ea.x;ey.aabb.maxy=ea.y;var ep=ey.gverts.next.next;while(ep!=null){var eq=ep;if(eq.xey.aabb.maxx){ey.aabb.maxx=eq.x}if(eq.yey.aabb.maxy){ey.aabb.maxy=eq.y}ep=ep.next}}}}var ew=this.aabb;var ee=eo.aabb;if(ee.minxew.maxx){ew.maxx=ee.maxx}if(ee.minyew.maxy){ew.maxy=ee.maxy}eu=eu.next}}};cj.prototype.shapes_adder=function(eb){if(eb.zpp_inner.body!=this){if(eb.zpp_inner.body!=null){eb.zpp_inner.body.wrap_shapes.remove(eb)}eb.zpp_inner.body=this;eb.zpp_inner.addedToBody();if(this.space!=null){var ed=this.space;var ea=eb.zpp_inner;var ec=ea.body;if(!ec.world){ec.component.waket=ed.stamp+(ed.midstep?0:1);if(ec.type==3){ec.kinematicDelaySleep=true}if(ec.component.sleeping){ed.really_wake(ec,false)}}ed.bphase.insert(ea);ea.addedToSpace()}if(eb.zpp_inner.type==1){eb.zpp_inner.polygon.invalidate_gaxi();eb.zpp_inner.polygon.invalidate_gverts()}return true}else{return false}};cj.prototype.shapes_subber=function(ea){if(this.space!=null){this.space.removed_shape(ea.zpp_inner)}ea.zpp_inner.body=null;ea.zpp_inner.removedFromBody()};cj.prototype.shapes_invalidate=function(ea){this.invalidate_shapes()};cj.prototype.addedToSpace=function(){if(bx.zpp_pool==null){this.component=new bx()}else{this.component=bx.zpp_pool;bx.zpp_pool=this.component.next;this.component.next=null}this.component.isBody=true;this.component.body=this;this.__iaddedToSpace()};cj.prototype.removedFromSpace=function(){while(this.arbiters.head!=null){var eb=this.arbiters.pop_unsafe();eb.cleared=true;if(eb.b2==this){var eh=eb.b1.arbiters;var eg=null;var en=eh.head;while(en!=null){if(en.elt==eb){var ed;var ej;if(eg==null){ed=eh.head;ej=ed.next;eh.head=ej;if(eh.head==null){eh.pushmod=true}}else{ed=eg.next;ej=ed.next;eg.next=ej;if(ej==null){eh.pushmod=true}}var ea=ed;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;eh.modified=true;eh.length--;eh.pushmod=true;break}eg=en;en=en.next}}if(eb.b1==this){var ek=eb.b2.arbiters;var ef=null;var em=ek.head;while(em!=null){if(em.elt==eb){var ei;var el;if(ef==null){ei=ek.head;el=ei.next;ek.head=el;if(ek.head==null){ek.pushmod=true}}else{ei=ef.next;el=ei.next;ef.next=el;if(el==null){ek.pushmod=true}}var ee=ei;ee.elt=null;ee.next=dL.zpp_pool;dL.zpp_pool=ee;ek.modified=true;ek.length--;ek.pushmod=true;break}ef=em;em=em.next}}if(eb.pair!=null){eb.pair.arb=null;eb.pair=null}eb.active=false;this.space.f_arbiters.modified=true}var ec=this.component;ec.body=null;ec.constraint=null;ec.next=bx.zpp_pool;bx.zpp_pool=ec;this.component=null;this.__iremovedFromSpace()};cj.prototype.copy=function(){var ea=new at().zpp_inner;ea.type=this.type;ea.bulletEnabled=this.bulletEnabled;ea.disableCCD=this.disableCCD;var eb=this.shapes.head;while(eb!=null){var ef=ea.outer.zpp_inner.wrap_shapes;var ee=eb.elt.outer.copy();if(ef.zpp_inner.reverse_flag){ef.push(ee)}else{ef.unshift(ee)}eb=eb.next}ea.posx=this.posx;ea.posy=this.posy;ea.velx=this.velx;ea.vely=this.vely;ea.forcex=this.forcex;ea.forcey=this.forcey;ea.rot=this.rot;ea.angvel=this.angvel;ea.torque=this.torque;ea.kinvelx=this.kinvelx;ea.kinvely=this.kinvely;ea.kinangvel=this.kinangvel;ea.svelx=this.svelx;ea.svely=this.svely;if(!this.zip_axis){ea.axisx=this.axisx;ea.axisy=this.axisy}else{ea.zip_axis=true;var ed=ea.shapes.head;while(ed!=null){var ec=ed.elt;if(ec.type==1){ec.polygon.invalidate_gverts();ec.polygon.invalidate_gaxi()}ec.invalidate_worldCOM();ed=ed.next}ea.zip_worldCOM=true}ea.rot=this.rot;ea.massMode=this.massMode;ea.gravMassMode=this.gravMassMode;ea.inertiaMode=this.inertiaMode;ea.norotate=this.norotate;ea.nomove=this.nomove;ea.cmass=this.cmass;ea.cinertia=this.cinertia;if(!this.zip_mass){ea.mass=this.mass}else{ea.invalidate_mass()}if(!this.zip_gravMass){ea.gravMass=this.gravMass}else{ea.invalidate_gravMass()}if(!this.zip_gravMassScale){ea.gravMassScale=this.gravMassScale}else{ea.invalidate_gravMassScale()}if(!this.zip_inertia){ea.inertia=this.inertia}else{ea.invalidate_inertia()}if(!this.zip_aabb){ea.aabb.minx=this.aabb.minx;ea.aabb.miny=this.aabb.miny;ea.aabb.maxx=this.aabb.maxx;ea.aabb.maxy=this.aabb.maxy}else{ea.zip_aabb=true}if(!this.zip_localCOM){ea.localCOMx=this.localCOMx;ea.localCOMy=this.localCOMy}else{ea.zip_localCOM=true;ea.zip_worldCOM=true}if(!this.zip_worldCOM){ea.worldCOMx=this.worldCOMx;ea.worldCOMy=this.worldCOMy}else{ea.zip_worldCOM=true}this.copyto(ea.outer);return ea.outer};cj.prototype.__class__=cj;var cQ=zpp_nape.phys.ZPP_Compound=function(){this.space=null;this.compound=null;this.depth=0;this.wrap_compounds=null;this.wrap_constraints=null;this.wrap_bodies=null;this.compounds=null;this.constraints=null;this.bodies=null;this.outer=null;dM.call(this);this.icompound=this;this.depth=1;this.bodies=new bs();this.wrap_bodies=b0.get(this.bodies);this.wrap_bodies.zpp_inner.adder=dX(this,this.bodies_adder);this.wrap_bodies.zpp_inner.subber=dX(this,this.bodies_subber);this.constraints=new m();this.wrap_constraints=aZ.get(this.constraints);this.wrap_constraints.zpp_inner.adder=dX(this,this.constraints_adder);this.wrap_constraints.zpp_inner.subber=dX(this,this.constraints_subber);this.compounds=new n();this.wrap_compounds=bj.get(this.compounds);this.wrap_compounds.zpp_inner.adder=dX(this,this.compounds_adder);this.wrap_compounds.zpp_inner.subber=dX(this,this.compounds_subber)};cQ.__name__=["zpp_nape","phys","ZPP_Compound"];cQ.__super__=dM;cQ.prototype=Object.create(dM.prototype);cQ.prototype.outer=null;cQ.prototype.bodies=null;cQ.prototype.constraints=null;cQ.prototype.compounds=null;cQ.prototype.wrap_bodies=null;cQ.prototype.wrap_constraints=null;cQ.prototype.wrap_compounds=null;cQ.prototype.depth=null;cQ.prototype.compound=null;cQ.prototype.space=null;cQ.prototype.__imutable_midstep=function(ea){};cQ.prototype.addedToSpace=function(){this.__iaddedToSpace()};cQ.prototype.removedFromSpace=function(){this.__iremovedFromSpace()};cQ.prototype.breakApart=function(){if(this.space!=null){this.__iremovedFromSpace();this.space.nullInteractorType(this)}if(this.compound!=null){this.compound.compounds.remove(this)}else{if(this.space!=null){this.space.compounds.remove(this)}}while(this.bodies.head!=null){var ea=this.bodies.pop_unsafe();if((ea.compound=this.compound)!=null){this.compound.bodies.add(ea)}else{if(this.space!=null){this.space.bodies.add(ea)}}if(this.space!=null){this.space.freshInteractorType(ea)}}while(this.constraints.head!=null){var ec=this.constraints.pop_unsafe();if((ec.compound=this.compound)!=null){this.compound.constraints.add(ec)}else{if(this.space!=null){this.space.constraints.add(ec)}}}while(this.compounds.head!=null){var eb=this.compounds.pop_unsafe();if((eb.compound=this.compound)!=null){this.compound.compounds.add(eb)}else{if(this.space!=null){this.space.compounds.add(eb)}}if(this.space!=null){this.space.freshInteractorType(eb)}}this.compound=null;this.space=null};cQ.prototype.bodies_adder=function(ea){if(ea.zpp_inner.compound!=this){if(ea.zpp_inner.compound!=null){ea.zpp_inner.compound.wrap_bodies.remove(ea)}else{if(ea.zpp_inner.space!=null){ea.zpp_inner.space.wrap_bodies.remove(ea)}}ea.zpp_inner.compound=this;if(this.space!=null){this.space.addBody(ea.zpp_inner)}return true}else{return false}};cQ.prototype.bodies_subber=function(ea){ea.zpp_inner.compound=null;if(this.space!=null){this.space.remBody(ea.zpp_inner)}};cQ.prototype.constraints_adder=function(ea){if(ea.zpp_inner.compound!=this){if(ea.zpp_inner.compound!=null){ea.zpp_inner.compound.wrap_constraints.remove(ea)}else{if(ea.zpp_inner.space!=null){ea.zpp_inner.space.wrap_constraints.remove(ea)}}ea.zpp_inner.compound=this;if(this.space!=null){this.space.addConstraint(ea.zpp_inner)}return true}else{return false}};cQ.prototype.constraints_subber=function(ea){ea.zpp_inner.compound=null;if(this.space!=null){this.space.remConstraint(ea.zpp_inner)}};cQ.prototype.compounds_adder=function(ea){if(ea.zpp_inner.compound!=this){if(ea.zpp_inner.compound!=null){ea.zpp_inner.compound.wrap_compounds.remove(ea)}else{if(ea.zpp_inner.space!=null){ea.zpp_inner.space.wrap_compounds.remove(ea)}}ea.zpp_inner.compound=this;ea.zpp_inner.depth=this.depth+1;if(this.space!=null){this.space.addCompound(ea.zpp_inner)}return true}else{return false}};cQ.prototype.compounds_subber=function(ea){ea.zpp_inner.compound=null;ea.zpp_inner.depth=1;if(this.space!=null){this.space.remCompound(ea.zpp_inner)}};cQ.prototype.copy=function(ea,ed){var en=ea==null;if(ea==null){ea=[]}if(ed==null){ed=[]}var ej=new dq();var ec=this.compounds.head;while(ec!=null){var eb=ec.elt.copy(ea,ed);eb.zpp_inner.immutable_midstep("Compound::compound");if((eb.zpp_inner.compound==null?null:eb.zpp_inner.compound.outer)!=ej){if((eb.zpp_inner.compound==null?null:eb.zpp_inner.compound.outer)!=null){(eb.zpp_inner.compound==null?null:eb.zpp_inner.compound.outer).zpp_inner.wrap_compounds.remove(eb)}if(ej!=null){var eg=ej.zpp_inner.wrap_compounds;if(eg.zpp_inner.reverse_flag){eg.push(eb)}else{eg.unshift(eb)}}}ec=ec.next}var ep=this.bodies.head;while(ep!=null){var em=ep.elt;var ei=em.outer.copy();ea.push(cu.dict(em.id,ei));if((ei.zpp_inner.compound==null?null:ei.zpp_inner.compound.outer)!=ej){if((ei.zpp_inner.compound==null?null:ei.zpp_inner.compound.outer)!=null){(ei.zpp_inner.compound==null?null:ei.zpp_inner.compound.outer).zpp_inner.wrap_bodies.remove(ei)}if(ej!=null){var ek=ej.zpp_inner.wrap_bodies;if(ek.zpp_inner.reverse_flag){ek.push(ei)}else{ek.unshift(ei)}}}ep=ep.next}var eo=this.constraints.head;while(eo!=null){var eq=eo.elt.copy(ea,ed);if((eq.zpp_inner.compound==null?null:eq.zpp_inner.compound.outer)!=ej){if((eq.zpp_inner.compound==null?null:eq.zpp_inner.compound.outer)!=null){(eq.zpp_inner.compound==null?null:eq.zpp_inner.compound.outer).zpp_inner.wrap_constraints.remove(eq)}if(ej!=null){var eh=ej.zpp_inner.wrap_constraints;if(eh.zpp_inner.reverse_flag){eh.push(eq)}else{eh.unshift(eq)}}}eo=eo.next}if(en){while(ed.length>0){var ee=ed.pop();var ef=0;while(efeu.aabb.maxx){eu.aabb.maxx=en.x}if(en.yeu.aabb.maxy){eu.aabb.maxy=en.y}eo=eo.next}}}}};bZ.prototype.force_validate_aabb=function(){if(this.type==0){var eh=this.circle;eh.worldCOMx=eh.body.posx+(eh.body.axisy*eh.localCOMx-eh.body.axisx*eh.localCOMy);eh.worldCOMy=eh.body.posy+(eh.localCOMx*eh.body.axisx+eh.localCOMy*eh.body.axisy);eh.aabb.minx=eh.worldCOMx-eh.radius;eh.aabb.miny=eh.worldCOMy-eh.radius;eh.aabb.maxx=eh.worldCOMx+eh.radius;eh.aabb.maxy=eh.worldCOMy+eh.radius}else{var ee=this.polygon;var ea=ee.lverts.next;var eg=ee.gverts.next;var ec=ea;ea=ea.next;eg.x=ee.body.posx+(ee.body.axisy*ec.x-ee.body.axisx*ec.y);eg.y=ee.body.posy+(ec.x*ee.body.axisx+ec.y*ee.body.axisy);ee.aabb.minx=eg.x;ee.aabb.miny=eg.y;ee.aabb.maxx=eg.x;ee.aabb.maxy=eg.y;var ed=ee.gverts.next.next;while(ed!=null){var ef=ed;var eb=ea;ea=ea.next;ef.x=ee.body.posx+(ee.body.axisy*eb.x-ee.body.axisx*eb.y);ef.y=ee.body.posy+(eb.x*ee.body.axisx+eb.y*ee.body.axisy);if(ef.xee.aabb.maxx){ee.aabb.maxx=ef.x}if(ef.yee.aabb.maxy){ee.aabb.maxy=ef.y}ed=ed.next}}};bZ.prototype.invalidate_aabb=function(){this.zip_aabb=true;if(this.body!=null){this.body.zip_aabb=true}};bZ.prototype.validate_area_inertia=function(){if(this.zip_area_inertia){this.zip_area_inertia=false;if(this.type==0){this.circle.__validate_area_inertia()}else{this.polygon.__validate_area_inertia()}}};bZ.prototype.validate_angDrag=function(){if(this.zip_angDrag||this.refmaterial.dynamicFriction!=this.material.dynamicFriction){this.zip_angDrag=false;this.refmaterial.dynamicFriction=this.material.dynamicFriction;if(this.type==0){this.circle.__validate_angDrag()}else{this.polygon.__validate_angDrag()}}};bZ.prototype.validate_localCOM=function(){if(this.zip_localCOM){this.zip_localCOM=false;if(this.type==1){var ef=this.polygon;if(ef.lverts.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y}else{if(ef.lverts.next.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y;ef.localCOMx+=ef.lverts.next.next.x;ef.localCOMy+=ef.lverts.next.next.y;ef.localCOMx*=0.5;ef.localCOMy*=0.5}else{ef.localCOMx=0;ef.localCOMy=0;var eb=0;var ec=ef.lverts.next;var ek=ec;ec=ec.next;var ei=ec;ec=ec.next;while(ec!=null){var eg=ec;eb+=ei.x*(eg.y-ek.y);var ea=eg.y*ei.x-eg.x*ei.y;ef.localCOMx+=(ei.x+eg.x)*ea;ef.localCOMy+=(ei.y+eg.y)*ea;ek=ei;ei=eg;ec=ec.next}ec=ef.lverts.next;var ee=ec;eb+=ei.x*(ee.y-ek.y);var ej=ee.y*ei.x-ee.x*ei.y;ef.localCOMx+=(ei.x+ee.x)*ej;ef.localCOMy+=(ei.y+ee.y)*ej;ek=ei;ec=ec.next;var ed=ec;eb+=ee.x*(ed.y-ek.y);var eh=ed.y*ee.x-ed.x*ee.y;ef.localCOMx+=(ee.x+ed.x)*eh;ef.localCOMy+=(ee.y+ed.y)*eh;eb=1/(3*eb);var el=eb;ef.localCOMx*=el;ef.localCOMy*=el}}}if(this.wrap_localCOM!=null){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy}}};bZ.prototype.validate_worldCOM=function(){if(this.zip_worldCOM){if(this.body!=null){this.zip_worldCOM=false;if(this.zip_localCOM){this.zip_localCOM=false;if(this.type==1){var ef=this.polygon;if(ef.lverts.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y}else{if(ef.lverts.next.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y;ef.localCOMx+=ef.lverts.next.next.x;ef.localCOMy+=ef.lverts.next.next.y;ef.localCOMx*=0.5;ef.localCOMy*=0.5}else{ef.localCOMx=0;ef.localCOMy=0;var eb=0;var ec=ef.lverts.next;var el=ec;ec=ec.next;var ej=ec;ec=ec.next;while(ec!=null){var eh=ec;eb+=ej.x*(eh.y-el.y);var ea=eh.y*ej.x-eh.x*ej.y;ef.localCOMx+=(ej.x+eh.x)*ea;ef.localCOMy+=(ej.y+eh.y)*ea;el=ej;ej=eh;ec=ec.next}ec=ef.lverts.next;var ee=ec;eb+=ej.x*(ee.y-el.y);var ek=ee.y*ej.x-ee.x*ej.y;ef.localCOMx+=(ej.x+ee.x)*ek;ef.localCOMy+=(ej.y+ee.y)*ek;el=ej;ec=ec.next;var ed=ec;eb+=ee.x*(ed.y-el.y);var ei=ed.y*ee.x-ed.x*ee.y;ef.localCOMx+=(ee.x+ed.x)*ei;ef.localCOMy+=(ee.y+ed.y)*ei;eb=1/(3*eb);var em=eb;ef.localCOMx*=em;ef.localCOMy*=em}}}if(this.wrap_localCOM!=null){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy}}var eg=this.body;if(eg.zip_axis){eg.zip_axis=false;eg.axisx=Math.sin(eg.rot);eg.axisy=Math.cos(eg.rot)}this.worldCOMx=this.body.posx+(this.body.axisy*this.localCOMx-this.body.axisx*this.localCOMy);this.worldCOMy=this.body.posy+(this.localCOMx*this.body.axisx+this.localCOMy*this.body.axisy)}}};bZ.prototype.getworldCOM=function(){if(this.zip_worldCOM){if(this.body!=null){this.zip_worldCOM=false;if(this.zip_localCOM){this.zip_localCOM=false;if(this.type==1){var ef=this.polygon;if(ef.lverts.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y}else{if(ef.lverts.next.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y;ef.localCOMx+=ef.lverts.next.next.x;ef.localCOMy+=ef.lverts.next.next.y;ef.localCOMx*=0.5;ef.localCOMy*=0.5}else{ef.localCOMx=0;ef.localCOMy=0;var eb=0;var ec=ef.lverts.next;var el=ec;ec=ec.next;var ej=ec;ec=ec.next;while(ec!=null){var eh=ec;eb+=ej.x*(eh.y-el.y);var ea=eh.y*ej.x-eh.x*ej.y;ef.localCOMx+=(ej.x+eh.x)*ea;ef.localCOMy+=(ej.y+eh.y)*ea;el=ej;ej=eh;ec=ec.next}ec=ef.lverts.next;var ee=ec;eb+=ej.x*(ee.y-el.y);var ek=ee.y*ej.x-ee.x*ej.y;ef.localCOMx+=(ej.x+ee.x)*ek;ef.localCOMy+=(ej.y+ee.y)*ek;el=ej;ec=ec.next;var ed=ec;eb+=ee.x*(ed.y-el.y);var ei=ed.y*ee.x-ed.x*ee.y;ef.localCOMx+=(ee.x+ed.x)*ei;ef.localCOMy+=(ee.y+ed.y)*ei;eb=1/(3*eb);var em=eb;ef.localCOMx*=em;ef.localCOMy*=em}}}if(this.wrap_localCOM!=null){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy}}var eg=this.body;if(eg.zip_axis){eg.zip_axis=false;eg.axisx=Math.sin(eg.rot);eg.axisy=Math.cos(eg.rot)}this.worldCOMx=this.body.posx+(this.body.axisy*this.localCOMx-this.body.axisx*this.localCOMy);this.worldCOMy=this.body.posy+(this.localCOMx*this.body.axisx+this.localCOMy*this.body.axisy)}}this.wrap_worldCOM.zpp_inner.x=this.worldCOMx;this.wrap_worldCOM.zpp_inner.y=this.worldCOMy};bZ.prototype.invalidate_area_inertia=function(){this.zip_area_inertia=true;if(this.body!=null){var ea=this.body;ea.zip_localCOM=true;ea.zip_worldCOM=true;this.body.invalidate_mass();this.body.invalidate_inertia()}};bZ.prototype.invalidate_angDrag=function(){this.zip_angDrag=true};bZ.prototype.invalidate_localCOM=function(){this.zip_localCOM=true;this.invalidate_area_inertia();if(this.type==0){this.zip_sweepRadius=true}this.invalidate_angDrag();this.invalidate_worldCOM();if(this.body!=null){var ea=this.body;ea.zip_localCOM=true;ea.zip_worldCOM=true}};bZ.prototype.invalidate_worldCOM=function(){this.zip_worldCOM=true;this.zip_aabb=true;if(this.body!=null){this.body.zip_aabb=true}};bZ.prototype.invalidate_material=function(ea){if((ea&cJ.WAKE)!=0){this.wake()}if((ea&cJ.ARBITERS)!=0){if(this.body!=null){this.body.refreshArbiters()}}if((ea&cJ.PROPS)!=0){if(this.body!=null){var eb=this.body;eb.zip_localCOM=true;eb.zip_worldCOM=true;this.body.invalidate_mass();this.body.invalidate_inertia()}}if((ea&cJ.ANGDRAG)!=0){this.invalidate_angDrag()}this.refmaterial.set(this.material)};bZ.prototype.invalidate_filter=function(){this.wake()};bZ.prototype.invalidate_fluidprops=function(){if(this.fluidEnabled){this.wake()}};bZ.prototype.aabb_validate=function(){if(this.zip_aabb){if(this.body!=null){this.zip_aabb=false;if(this.type==0){var es=this.circle;if(es.zip_worldCOM){if(es.body!=null){es.zip_worldCOM=false;if(es.zip_localCOM){es.zip_localCOM=false;if(es.type==1){var ex=es.polygon;if(ex.lverts.next.next==null){ex.localCOMx=ex.lverts.next.x;ex.localCOMy=ex.lverts.next.y}else{if(ex.lverts.next.next.next==null){ex.localCOMx=ex.lverts.next.x;ex.localCOMy=ex.lverts.next.y;ex.localCOMx+=ex.lverts.next.next.x;ex.localCOMy+=ex.lverts.next.next.y;ex.localCOMx*=0.5;ex.localCOMy*=0.5}else{ex.localCOMx=0;ex.localCOMy=0;var ey=0;var er=ex.lverts.next;var ej=er;er=er.next;var ei=er;er=er.next;while(er!=null){var eg=er;ey+=ei.x*(eg.y-ej.y);var em=eg.y*ei.x-eg.x*ei.y;ex.localCOMx+=(ei.x+eg.x)*em;ex.localCOMy+=(ei.y+eg.y)*em;ej=ei;ei=eg;er=er.next}er=ex.lverts.next;var eh=er;ey+=ei.x*(eh.y-ej.y);var ee=eh.y*ei.x-eh.x*ei.y;ex.localCOMx+=(ei.x+eh.x)*ee;ex.localCOMy+=(ei.y+eh.y)*ee;ej=ei;er=er.next;var ef=er;ey+=eh.x*(ef.y-ej.y);var ed=ef.y*eh.x-ef.x*eh.y;ex.localCOMx+=(eh.x+ef.x)*ed;ex.localCOMy+=(eh.y+ef.y)*ed;ey=1/(3*ey);var el=ey;ex.localCOMx*=el;ex.localCOMy*=el}}}if(es.wrap_localCOM!=null){es.wrap_localCOM.zpp_inner.x=es.localCOMx;es.wrap_localCOM.zpp_inner.y=es.localCOMy}}var ew=es.body;if(ew.zip_axis){ew.zip_axis=false;ew.axisx=Math.sin(ew.rot);ew.axisy=Math.cos(ew.rot)}es.worldCOMx=es.body.posx+(es.body.axisy*es.localCOMx-es.body.axisx*es.localCOMy);es.worldCOMy=es.body.posy+(es.localCOMx*es.body.axisx+es.localCOMy*es.body.axisy)}}var ec=es.radius;var eb=es.radius;es.aabb.minx=es.worldCOMx-ec;es.aabb.miny=es.worldCOMy-eb;es.aabb.maxx=es.worldCOMx+ec;es.aabb.maxy=es.worldCOMy+eb}else{var eu=this.polygon;if(eu.zip_gverts){if(eu.body!=null){eu.zip_gverts=false;eu.validate_lverts();var et=eu.body;if(et.zip_axis){et.zip_axis=false;et.axisx=Math.sin(et.rot);et.axisy=Math.cos(et.rot)}var ek=eu.lverts.next;var ep=eu.gverts.next;while(ep!=null){var ev=ep;var eq=ek;ek=ek.next;ev.x=eu.body.posx+(eu.body.axisy*eq.x-eu.body.axisx*eq.y);ev.y=eu.body.posy+(eq.x*eu.body.axisx+eq.y*eu.body.axisy);ep=ep.next}}}var ea=eu.gverts.next;eu.aabb.minx=ea.x;eu.aabb.miny=ea.y;eu.aabb.maxx=ea.x;eu.aabb.maxy=ea.y;var eo=eu.gverts.next.next;while(eo!=null){var en=eo;if(en.xeu.aabb.maxx){eu.aabb.maxx=en.x}if(en.yeu.aabb.maxy){eu.aabb.maxy=en.y}eo=eo.next}}}}};bZ.prototype.setMaterial=function(ea){if(this.material!=ea){if(this.body!=null&&this.body.space!=null){if(this.material!=null){this.material.shapes.remove(this)}}this.material=ea;if(this.body!=null&&this.body.space!=null){ea.shapes.add(this)}this.wake();if(this.body!=null){this.body.refreshArbiters()}}};bZ.prototype.setFilter=function(ea){if(this.filter!=ea){if(this.body!=null&&this.body.space!=null){if(this.filter!=null){this.filter.shapes.remove(this)}}this.filter=ea;if(this.body!=null&&this.body.space!=null){ea.shapes.add(this)}this.wake()}};bZ.prototype.setFluid=function(ea){if(this.fluidProperties!=ea){if(this.body!=null&&this.body.space!=null){if(this.fluidProperties!=null){this.fluidProperties.shapes.remove(this)}}this.fluidProperties=ea;if(this.body!=null&&this.body.space!=null){ea.shapes.add(this)}if(this.fluidEnabled){this.wake()}}};bZ.prototype.__immutable_midstep=function(ea){};bZ.prototype.addedToBody=function(){this.invalidate_worldCOM();this.zip_aabb=true;if(this.body!=null){this.body.zip_aabb=true}};bZ.prototype.removedFromBody=function(){};bZ.prototype.addedToSpace=function(){this.__iaddedToSpace();this.material.shapes.add(this);this.filter.shapes.add(this);if(this.fluidProperties!=null){this.fluidProperties.shapes.add(this)}};bZ.prototype.removedFromSpace=function(){this.__iremovedFromSpace();this.material.shapes.remove(this);this.filter.shapes.remove(this);if(this.fluidProperties!=null){this.fluidProperties.shapes.remove(this)}};bZ.prototype.copy=function(){var ea=null;if(this.type==0){ea=this.circle.__copy()}else{ea=this.polygon.__copy()}if(!this.zip_area_inertia){ea.area=this.area;ea.inertia=this.inertia}else{ea.invalidate_area_inertia()}if(!this.zip_sweepRadius){ea.sweepRadius=this.sweepRadius;ea.sweepCoef=this.sweepCoef}else{ea.zip_sweepRadius=true}if(!this.zip_angDrag){ea.angDrag=this.angDrag}else{ea.invalidate_angDrag()}if(!this.zip_aabb){ea.aabb.minx=this.aabb.minx;ea.aabb.miny=this.aabb.miny;ea.aabb.maxx=this.aabb.maxx;ea.aabb.maxy=this.aabb.maxy}else{ea.zip_aabb=true;if(ea.body!=null){ea.body.zip_aabb=true}}var ec=ea.material;ec.outer=null;ec.next=cJ.zpp_pool;cJ.zpp_pool=ec;var eb=ea.filter;eb.outer=null;eb.next=cA.zpp_pool;cA.zpp_pool=eb;ea.material=this.material;ea.filter=this.filter;if(this.fluidProperties!=null){ea.fluidProperties=this.fluidProperties}ea.fluidEnabled=this.fluidEnabled;ea.sensorEnabled=this.sensorEnabled;if(this.userData!=null){ea.userData=bm.copy(this.userData)}this.copyto(ea.outer);return ea.outer};bZ.prototype.__class__=bZ;var di=zpp_nape.shape.ZPP_Circle=function(){this.radius=0;this.outer_zn=null;bZ.call(this,0);this.circle=this;this.zip_localCOM=false};di.__name__=["zpp_nape","shape","ZPP_Circle"];di.__super__=bZ;di.prototype=Object.create(bZ.prototype);di.prototype.outer_zn=null;di.prototype.radius=null;di.prototype.__clear=function(){};di.prototype.invalidate_radius=function(){this.invalidate_area_inertia();this.invalidate_angDrag();this.zip_aabb=true;if(this.body!=null){this.body.zip_aabb=true}if(this.body!=null){this.body.wake()}};di.prototype.localCOM_validate=function(){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy};di.prototype.localCOM_invalidate=function(ea){this.localCOMx=ea.x;this.localCOMy=ea.y;this.invalidate_localCOM();if(this.body!=null){this.body.wake()}};di.prototype.setupLocalCOM=function(){var ea=this.localCOMx;var eh=this.localCOMy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_localCOM=eb;this.wrap_localCOM.zpp_inner._inuse=true;this.wrap_localCOM.zpp_inner._validate=dX(this,this.localCOM_validate);this.wrap_localCOM.zpp_inner._invalidate=dX(this,this.localCOM_invalidate)};di.prototype.__validate_aabb=function(){if(this.zip_worldCOM){if(this.body!=null){this.zip_worldCOM=false;if(this.zip_localCOM){this.zip_localCOM=false;if(this.type==1){var eh=this.polygon;if(eh.lverts.next.next==null){eh.localCOMx=eh.lverts.next.x;eh.localCOMy=eh.lverts.next.y}else{if(eh.lverts.next.next.next==null){eh.localCOMx=eh.lverts.next.x;eh.localCOMy=eh.lverts.next.y;eh.localCOMx+=eh.lverts.next.next.x;eh.localCOMy+=eh.lverts.next.next.y;eh.localCOMx*=0.5;eh.localCOMy*=0.5}else{eh.localCOMx=0;eh.localCOMy=0;var ed=0;var ee=eh.lverts.next;var en=ee;ee=ee.next;var el=ee;ee=ee.next;while(ee!=null){var ej=ee;ed+=el.x*(ej.y-en.y);var ec=ej.y*el.x-ej.x*el.y;eh.localCOMx+=(el.x+ej.x)*ec;eh.localCOMy+=(el.y+ej.y)*ec;en=el;el=ej;ee=ee.next}ee=eh.lverts.next;var eg=ee;ed+=el.x*(eg.y-en.y);var em=eg.y*el.x-eg.x*el.y;eh.localCOMx+=(el.x+eg.x)*em;eh.localCOMy+=(el.y+eg.y)*em;en=el;ee=ee.next;var ef=ee;ed+=eg.x*(ef.y-en.y);var ek=ef.y*eg.x-ef.x*eg.y;eh.localCOMx+=(eg.x+ef.x)*ek;eh.localCOMy+=(eg.y+ef.y)*ek;ed=1/(3*ed);var eo=ed;eh.localCOMx*=eo;eh.localCOMy*=eo}}}if(this.wrap_localCOM!=null){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy}}var ei=this.body;if(ei.zip_axis){ei.zip_axis=false;ei.axisx=Math.sin(ei.rot);ei.axisy=Math.cos(ei.rot)}this.worldCOMx=this.body.posx+(this.body.axisy*this.localCOMx-this.body.axisx*this.localCOMy);this.worldCOMy=this.body.posy+(this.localCOMx*this.body.axisx+this.localCOMy*this.body.axisy)}}var eb=this.radius;var ea=this.radius;this.aabb.minx=this.worldCOMx-eb;this.aabb.miny=this.worldCOMy-ea;this.aabb.maxx=this.worldCOMx+eb;this.aabb.maxy=this.worldCOMy+ea};di.prototype._force_validate_aabb=function(){this.worldCOMx=this.body.posx+(this.body.axisy*this.localCOMx-this.body.axisx*this.localCOMy);this.worldCOMy=this.body.posy+(this.localCOMx*this.body.axisx+this.localCOMy*this.body.axisy);this.aabb.minx=this.worldCOMx-this.radius;this.aabb.miny=this.worldCOMy-this.radius;this.aabb.maxx=this.worldCOMx+this.radius;this.aabb.maxy=this.worldCOMy+this.radius};di.prototype.__validate_sweepRadius=function(){this.sweepCoef=Math.sqrt(this.localCOMx*this.localCOMx+this.localCOMy*this.localCOMy);this.sweepRadius=this.sweepCoef+this.radius};di.prototype.__validate_area_inertia=function(){var ea=this.radius*this.radius;this.area=ea*Math.PI;this.inertia=ea*0.5+(this.localCOMx*this.localCOMx+this.localCOMy*this.localCOMy)};di.prototype.__validate_angDrag=function(){var eb=this.localCOMx*this.localCOMx+this.localCOMy*this.localCOMy;var ea=this.radius*this.radius;this.angDrag=(eb+2*ea)*(this.material.dynamicFriction*P.fluidAngularDragFriction)+0.5*P.fluidAngularDrag*(1+P.fluidVacuumDrag)*eb;this.angDrag/=2*(eb+0.5*ea)};di.prototype.__scale=function(ec,eb){var ea=((ec<0?-ec:ec)+(eb<0?-eb:eb))/2;this.radius*=ea<0?-ea:ea;this.invalidate_radius();if(this.localCOMx*this.localCOMx+this.localCOMy*this.localCOMy>0){this.localCOMx*=ec;this.localCOMy*=eb;this.invalidate_localCOM()}};di.prototype.__translate=function(ea,eb){this.localCOMx+=ea;this.localCOMy+=eb;this.invalidate_localCOM()};di.prototype.__rotate=function(eb,ed){if(this.localCOMx*this.localCOMx+this.localCOMy*this.localCOMy>0){var ec=0;var ea=0;ec=ed*this.localCOMx-eb*this.localCOMy;ea=this.localCOMx*eb+this.localCOMy*ed;this.localCOMx=ec;this.localCOMy=ea;this.invalidate_localCOM()}};di.prototype.__transform=function(ea){var ec=ea.zpp_inner.a*ea.zpp_inner.d-ea.zpp_inner.b*ea.zpp_inner.c;if(ec<0){ec=-ec}this.radius*=Math.sqrt(ec);var eb=ea.zpp_inner.a*this.localCOMx+ea.zpp_inner.b*this.localCOMy+ea.zpp_inner.tx;this.localCOMy=ea.zpp_inner.c*this.localCOMx+ea.zpp_inner.d*this.localCOMy+ea.zpp_inner.ty;this.localCOMx=eb;this.invalidate_radius();this.invalidate_localCOM()};di.prototype.__copy=function(){var ea=new ds(this.radius).zpp_inner_zn;ea.localCOMx=this.localCOMx;ea.localCOMy=this.localCOMy;ea.zip_localCOM=false;return ea};di.prototype.__class__=di;var c8=zpp_nape.shape.ZPP_Edge=function(){this.tp1=0;this.tp0=0;this.gp1=null;this.lp1=null;this.gp0=null;this.lp0=null;this.gprojection=0;this.lprojection=0;this.length=0;this.wrap_gnorm=null;this.gnormy=0;this.gnormx=0;this.wrap_lnorm=null;this.lnormy=0;this.lnormx=0;this.outer=null;this.polygon=null;this.next=null;this.lnormx=0;this.lnormy=0;this.gnormx=0;this.gnormy=0;this.length=0;this.lprojection=0;this.gprojection=0};c8.__name__=["zpp_nape","shape","ZPP_Edge"];c8.prototype.next=null;c8.prototype.free=function(){this.polygon=null};c8.prototype.alloc=function(){};c8.prototype.polygon=null;c8.prototype.outer=null;c8.prototype.wrapper=function(){if(this.outer==null){c8.internal=true;this.outer=new ba();c8.internal=false;this.outer.zpp_inner=this}return this.outer};c8.prototype.lnormx=null;c8.prototype.lnormy=null;c8.prototype.wrap_lnorm=null;c8.prototype.gnormx=null;c8.prototype.gnormy=null;c8.prototype.wrap_gnorm=null;c8.prototype.length=null;c8.prototype.lprojection=null;c8.prototype.gprojection=null;c8.prototype.lp0=null;c8.prototype.gp0=null;c8.prototype.lp1=null;c8.prototype.gp1=null;c8.prototype.tp0=null;c8.prototype.tp1=null;c8.prototype.lnorm_validate=function(){this.polygon.validate_laxi();this.wrap_lnorm.zpp_inner.x=this.lnormx;this.wrap_lnorm.zpp_inner.y=this.lnormy};c8.prototype.gnorm_validate=function(){var ee=this.polygon;if(ee.zip_gaxi){if(ee.body!=null){ee.zip_gaxi=false;ee.validate_laxi();var eh=ee.body;if(eh.zip_axis){eh.zip_axis=false;eh.axisx=Math.sin(eh.rot);eh.axisy=Math.cos(eh.rot)}if(ee.zip_gverts){if(ee.body!=null){ee.zip_gverts=false;ee.validate_lverts();var eg=ee.body;if(eg.zip_axis){eg.zip_axis=false;eg.axisx=Math.sin(eg.rot);eg.axisy=Math.cos(eg.rot)}var el=ee.lverts.next;var eb=ee.gverts.next;while(eb!=null){var ed=eb;var ec=el;el=el.next;ed.x=ee.body.posx+(ee.body.axisy*ec.x-ee.body.axisx*ec.y);ed.y=ee.body.posy+(ec.x*ee.body.axisx+ec.y*ee.body.axisy);eb=eb.next}}}var ea=ee.edges.head;var ej=ee.gverts.next;var em=ej;ej=ej.next;while(ej!=null){var ek=ej;var ef=ea.elt;ea=ea.next;ef.gp0=em;ef.gp1=ek;ef.gnormx=ee.body.axisy*ef.lnormx-ee.body.axisx*ef.lnormy;ef.gnormy=ef.lnormx*ee.body.axisx+ef.lnormy*ee.body.axisy;ef.gprojection=ee.body.posx*ef.gnormx+ee.body.posy*ef.gnormy+ef.lprojection;if(ef.wrap_gnorm!=null){ef.wrap_gnorm.zpp_inner.x=ef.gnormx;ef.wrap_gnorm.zpp_inner.y=ef.gnormy}ef.tp0=ef.gp0.y*ef.gnormx-ef.gp0.x*ef.gnormy;ef.tp1=ef.gp1.y*ef.gnormx-ef.gp1.x*ef.gnormy;em=ek;ej=ej.next}var ei=ea.elt;ei.gp0=em;ei.gp1=ee.gverts.next;ei.gnormx=ee.body.axisy*ei.lnormx-ee.body.axisx*ei.lnormy;ei.gnormy=ei.lnormx*ee.body.axisx+ei.lnormy*ee.body.axisy;ei.gprojection=ee.body.posx*ei.gnormx+ee.body.posy*ei.gnormy+ei.lprojection;if(ei.wrap_gnorm!=null){ei.wrap_gnorm.zpp_inner.x=ei.gnormx;ei.wrap_gnorm.zpp_inner.y=ei.gnormy}ei.tp0=ei.gp0.y*ei.gnormx-ei.gp0.x*ei.gnormy;ei.tp1=ei.gp1.y*ei.gnormx-ei.gp1.x*ei.gnormy}}this.wrap_gnorm.zpp_inner.x=this.gnormx;this.wrap_gnorm.zpp_inner.y=this.gnormy};c8.prototype.getlnorm=function(){var ea=this.lnormx;var eh=this.lnormy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_lnorm=eb;this.wrap_lnorm.zpp_inner._immutable=true;this.wrap_lnorm.zpp_inner._validate=dX(this,this.lnorm_validate)};c8.prototype.getgnorm=function(){var ea=this.gnormx;var eh=this.gnormy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_gnorm=eb;this.wrap_gnorm.zpp_inner._immutable=true;this.wrap_gnorm.zpp_inner._validate=dX(this,this.gnorm_validate)};c8.prototype.__class__=c8;var dQ=zpp_nape.shape.ZPP_Polygon=function(){this.zip_sanitation=false;this.zip_valid=false;this.zip_gaxi=false;this.zip_gverts=false;this.zip_laxi=false;this.zip_lverts=false;this.reverse_flag=false;this.edgeCnt=0;this.wrap_edges=null;this.edges=null;this.wrap_gverts=null;this.gverts=null;this.wrap_lverts=null;this.lverts=null;this.outer_zn=null;bZ.call(this,1);this.polygon=this;this.lverts=new bB();this.gverts=new bB();this.edges=new ce();this.edgeCnt=0};dQ.__name__=["zpp_nape","shape","ZPP_Polygon"];dQ.__super__=bZ;dQ.prototype=Object.create(bZ.prototype);dQ.prototype.outer_zn=null;dQ.prototype.lverts=null;dQ.prototype.wrap_lverts=null;dQ.prototype.gverts=null;dQ.prototype.wrap_gverts=null;dQ.prototype.edges=null;dQ.prototype.wrap_edges=null;dQ.prototype.edgeCnt=null;dQ.prototype.reverse_flag=null;dQ.prototype.__clear=function(){};dQ.prototype.lverts_pa_invalidate=function(ea){this.invalidate_lverts()};dQ.prototype.gverts_pa_validate=function(){if(this.zip_gverts){if(this.body!=null){this.zip_gverts=false;this.validate_lverts();var ee=this.body;if(ee.zip_axis){ee.zip_axis=false;ee.axisx=Math.sin(ee.rot);ee.axisy=Math.cos(ee.rot)}var ea=this.lverts.next;var ec=this.gverts.next;while(ec!=null){var ed=ec;var eb=ea;ea=ea.next;ed.x=this.body.posx+(this.body.axisy*eb.x-this.body.axisx*eb.y);ed.y=this.body.posy+(eb.x*this.body.axisx+eb.y*this.body.axisy);ec=ec.next}}}};dQ.prototype.lverts_post_adder=function(ei){ei.zpp_inner._invalidate=dX(this,this.lverts_pa_invalidate);var eb=null;var ef=null;var ee=this.lverts.next;while(ee!=null){if(ee==ei.zpp_inner){break}else{if(eb==null){eb=this.gverts.next}else{eb=eb.next}if(ef==null){ef=this.edges.head}else{ef=ef.next}}ee=ee.next}var eh;if(bB.zpp_pool==null){eh=new bB()}else{eh=bB.zpp_pool;bB.zpp_pool=eh.next;eh.next=null}eh.weak=false;eh._immutable=true;eh.x=0;eh.y=0;var ec=eh;this.gverts.insert(eb,ec);if(this.lverts.next.next!=null){if(this.lverts.next.next.next==null){var eg;if(c8.zpp_pool==null){eg=new c8()}else{eg=c8.zpp_pool;c8.zpp_pool=eg.next;eg.next=null}eg.polygon=this;this.edges.add(eg);var ea;if(c8.zpp_pool==null){ea=new c8()}else{ea=c8.zpp_pool;c8.zpp_pool=ea.next;ea.next=null}ea.polygon=this;this.edges.add(ea);this.edgeCnt+=2}else{var ej;if(c8.zpp_pool==null){ej=new c8()}else{ej=c8.zpp_pool;c8.zpp_pool=ej.next;ej.next=null}ej.polygon=this;this.edges.insert(ef,ej);this.edgeCnt++}}ec._validate=dX(this,this.gverts_pa_validate)};dQ.prototype.lverts_subber=function(ea){this.cleanup_lvert(ea.zpp_inner)};dQ.prototype.lverts_invalidate=function(ea){this.invalidate_lverts()};dQ.prototype.lverts_validate=function(){this.validate_lverts()};dQ.prototype.gverts_validate=function(){if(this.zip_gverts){if(this.body!=null){this.zip_gverts=false;this.validate_lverts();var ee=this.body;if(ee.zip_axis){ee.zip_axis=false;ee.axisx=Math.sin(ee.rot);ee.axisy=Math.cos(ee.rot)}var ea=this.lverts.next;var ec=this.gverts.next;while(ec!=null){var ed=ec;var eb=ea;ea=ea.next;ed.x=this.body.posx+(this.body.axisy*eb.x-this.body.axisx*eb.y);ed.y=this.body.posy+(eb.x*this.body.axisx+eb.y*this.body.axisy);ec=ec.next}}}};dQ.prototype.edges_validate=function(){this.validate_lverts()};dQ.prototype.getlverts=function(){this.wrap_lverts=ao.get(this.lverts);this.wrap_lverts.zpp_inner.post_adder=dX(this,this.lverts_post_adder);this.wrap_lverts.zpp_inner.subber=dX(this,this.lverts_subber);this.wrap_lverts.zpp_inner._invalidate=dX(this,this.lverts_invalidate);this.wrap_lverts.zpp_inner._validate=dX(this,this.lverts_validate);this.wrap_lverts.zpp_inner.reverse_flag=this.reverse_flag};dQ.prototype.getgverts=function(){this.wrap_gverts=ao.get(this.gverts,true);this.wrap_gverts.zpp_inner.reverse_flag=this.reverse_flag;this.wrap_gverts.zpp_inner._validate=dX(this,this.gverts_validate)};dQ.prototype.getedges=function(){this.wrap_edges=aw.get(this.edges,true);this.wrap_edges.zpp_inner.reverse_flag=this.reverse_flag;this.wrap_edges.zpp_inner._validate=dX(this,this.edges_validate)};dQ.prototype.zip_lverts=null;dQ.prototype.invalidate_lverts=function(){this.invalidate_laxi();this.invalidate_area_inertia();this.invalidate_angDrag();this.invalidate_localCOM();this.invalidate_gverts();this.zip_lverts=true;this.zip_valid=true;this.zip_sanitation=true;if(this.body!=null){this.body.wake()}};dQ.prototype.zip_laxi=null;dQ.prototype.invalidate_laxi=function(){this.invalidate_gaxi();this.zip_sweepRadius=true;this.zip_laxi=true};dQ.prototype.zip_gverts=null;dQ.prototype.invalidate_gverts=function(){this.zip_aabb=true;if(this.body!=null){this.body.zip_aabb=true}this.zip_gverts=true};dQ.prototype.zip_gaxi=null;dQ.prototype.invalidate_gaxi=function(){this.zip_gaxi=true};dQ.prototype.zip_valid=null;dQ.prototype.validation=null;dQ.prototype.valid=function(){if(this.zip_valid){this.zip_valid=false;if(this.zip_sanitation){this.zip_sanitation=false;this.splice_collinear_real()}if(this.lverts.length<3){if(br.ValidationResult_DEGENERATE==null){br.internal=true;br.ValidationResult_DEGENERATE=new al();br.internal=false}return this.validation=br.ValidationResult_DEGENERATE}else{this.validate_lverts();this.validate_area_inertia();if(this.areaP.epsilon){fi=true}else{if(er<-P.epsilon){e0=true}}if(fi&&e0){fe=false;break}eA=ez;ez=ey;e6=e6.next}if(fe){e6=this.lverts.next;var eH=e6;while(true){var eq=0;var eh=0;eq=eH.x-ez.x;eh=eH.y-ez.y;var em=0;var ec=0;em=ez.x-eA.x;ec=ez.y-eA.y;var ef=ec*eq-em*eh;if(ef>P.epsilon){fi=true}else{if(ef<-P.epsilon){e0=true}}if(fi&&e0){fe=false;break}break}if(fe){eA=ez;ez=eH;e6=e6.next;var eG=e6;while(true){var eo=0;var eg=0;eo=eG.x-eH.x;eg=eG.y-eH.y;var el=0;var ea=0;el=eH.x-eA.x;ea=eH.y-eA.y;var ee=ea*eo-el*eg;if(ee>P.epsilon){fi=true}else{if(ee<-P.epsilon){e0=true}}if(fi&&e0){break}break}}}if(fi&&e0){if(br.ValidationResult_CONCAVE==null){br.internal=true;br.ValidationResult_CONCAVE=new al();br.internal=false}return this.validation=br.ValidationResult_CONCAVE}else{var e4=true;var eu=true;var eZ=this.lverts.next;var fd=eZ;eZ=eZ.next;while(eZ!=null){var eW=eZ;if(!e4){eu=false;break}var et=true;var eY=this.lverts.next;var eN=eY;eY=eY.next;while(eY!=null){var eL=eY;if(fd==eN||fd==eL||eW==eN||eW==eL){eN=eL;eY=eY.next;continue}var fa=0;var e8=0;fa=fd.x-eN.x;e8=fd.y-eN.y;var ep=0;var en=0;ep=eW.x-fd.x;en=eW.y-fd.y;var ed=0;var eb=0;ed=eL.x-eN.x;eb=eL.y-eN.y;var fj=en*ed-ep*eb;if(fj*fj>P.epsilon){fj=1/fj;var eC=(eb*fa-ed*e8)*fj;if(eC>P.epsilon&&eC<1-P.epsilon){var eE=(en*fa-ep*e8)*fj;if(eE>P.epsilon&&eE<1-P.epsilon){e4=false;et=false;break}}}eN=eL;eY=eY.next}if(et){while(true){var fh=this.lverts.next;if(fd==eN||fd==fh||eW==eN||eW==fh){break}var e7=0;var eO=0;e7=fd.x-eN.x;eO=fd.y-eN.y;var eU=0;var eF=0;eU=eW.x-fd.x;eF=eW.y-fd.y;var fc=0;var eS=0;fc=fh.x-eN.x;eS=fh.y-eN.y;var ex=eF*fc-eU*eS;if(ex*ex>P.epsilon){ex=1/ex;var fm=(eS*e7-fc*eO)*ex;if(fm>P.epsilon&&fm<1-P.epsilon){var ek=(eF*e7-eU*eO)*ex;if(ek>P.epsilon&&ek<1-P.epsilon){e4=false;break}}}break}}fd=eW;eZ=eZ.next}if(eu){while(true){var eV=this.lverts.next;if(!e4){break}var es=true;var eX=this.lverts.next;var fn=eX;eX=eX.next;while(eX!=null){var fg=eX;if(fd==fn||fd==fg||eV==fn||eV==fg){fn=fg;eX=eX.next;continue}var e5=0;var eM=0;e5=fd.x-fn.x;eM=fd.y-fn.y;var eT=0;var eD=0;eT=eV.x-fd.x;eD=eV.y-fd.y;var fb=0;var eQ=0;fb=fg.x-fn.x;eQ=fg.y-fn.y;var ew=eD*fb-eT*eQ;if(ew*ew>P.epsilon){ew=1/ew;var fl=(eQ*e5-fb*eM)*ew;if(fl>P.epsilon&&fl<1-P.epsilon){var ej=(eD*e5-eT*eM)*ew;if(ej>P.epsilon&&ej<1-P.epsilon){e4=false;es=false;break}}}fn=fg;eX=eX.next}if(es){while(true){var ff=this.lverts.next;if(fd==fn||fd==ff||eV==fn||eV==ff){break}var e3=0;var eK=0;e3=fd.x-fn.x;eK=fd.y-fn.y;var eR=0;var eB=0;eR=eV.x-fd.x;eB=eV.y-fd.y;var e9=0;var eP=0;e9=ff.x-fn.x;eP=ff.y-fn.y;var ev=eB*e9-eR*eP;if(ev*ev>P.epsilon){ev=1/ev;var fk=(eP*e3-e9*eK)*ev;if(fk>P.epsilon&&fk<1-P.epsilon){var ei=(eB*e3-eR*eK)*ev;if(ei>P.epsilon&&ei<1-P.epsilon){e4=false;break}}}break}}break}}if(!e4){if(br.ValidationResult_SELF_INTERSECTING==null){br.internal=true;br.ValidationResult_SELF_INTERSECTING=new al();br.internal=false}return this.validation=br.ValidationResult_SELF_INTERSECTING}else{if(br.ValidationResult_VALID==null){br.internal=true;br.ValidationResult_VALID=new al();br.internal=false}return this.validation=br.ValidationResult_VALID}}}}}else{return this.validation}};dQ.prototype.validate_lverts=function(){if(this.zip_lverts){this.zip_lverts=false;if(this.lverts.length>2){this.validate_area_inertia();if(this.area<0){this.reverse_vertices();this.area=-this.area}}}};dQ.prototype.cleanup_lvert=function(ej){var ea=null;var ei=null;var eh=this.lverts.next;while(eh!=null){if(eh==ej){break}else{if(ea==null){ea=this.gverts.next}else{ea=ea.next}if(ei==null){ei=this.edges.head}else{ei=ei.next}}eh=eh.next}var ek=ea==null?this.gverts.next:ea.next;this.gverts.erase(ea);var ed=ek;if(ed.outer!=null){ed.outer.zpp_inner=null;ed.outer=null}ed._isimmutable=null;ed._validate=null;ed._invalidate=null;ed.next=bB.zpp_pool;bB.zpp_pool=ed;if(this.edgeCnt==2){var ee=this.edges.pop_unsafe();var eg=ee;eg.polygon=null;eg.next=c8.zpp_pool;c8.zpp_pool=eg;ee=this.edges.pop_unsafe();var ef=ee;ef.polygon=null;ef.next=c8.zpp_pool;c8.zpp_pool=ef;this.edgeCnt=0}else{if(this.edgeCnt!=0){var eb=ei==null?this.edges.head.elt:ei.next.elt;this.edges.erase(ei);var ec=eb;ec.polygon=null;ec.next=c8.zpp_pool;c8.zpp_pool=ec;this.edgeCnt--}}};dQ.prototype.zip_sanitation=null;dQ.prototype.splice_collinear=function(){if(this.zip_sanitation){this.zip_sanitation=false;this.splice_collinear_real()}};dQ.prototype.splice_collinear_real=function(){if(this.lverts.next==null){return}if(this.lverts.next.next==null){return}if(this.lverts.next.next.next==null){return}var er=null;var ee=this.lverts.next;while(ee!=null){var eh=ee.next==null?this.lverts.next:ee.next;var eq=ee;var ep=eh;var en=eq.x;var ej=eq.y;var ev=ep.x;var es=ep.y;var eo=0;var em=0;eo=en-ev;em=ej-es;if(eo*eo+em*em=P.epsilon*P.epsilon){eb=eb.next}else{this.cleanup_lvert(eg);this.lverts.erase(eb.next==null?null:eb);ew=true;eb=eb.next}}if(!ew){break}}};dQ.prototype.reverse_vertices=function(){this.lverts.reverse();this.gverts.reverse();this.edges.reverse();this.edges.insert(this.edges.iterator_at(this.edgeCnt-1),this.edges.pop_unsafe());this.reverse_flag=!this.reverse_flag;if(this.wrap_lverts!=null){this.wrap_lverts.zpp_inner.reverse_flag=this.reverse_flag}if(this.wrap_gverts!=null){this.wrap_gverts.zpp_inner.reverse_flag=this.reverse_flag}if(this.wrap_edges!=null){this.wrap_edges.zpp_inner.reverse_flag=this.reverse_flag}};dQ.prototype.validate_laxi=function(){if(this.zip_laxi){this.zip_laxi=false;this.validate_lverts();var ea=this.edges.head;var ed=this.lverts.next;var en=ed;ed=ed.next;while(ed!=null){var em=ed;var eb=ea.elt;ea=ea.next;eb.lp0=en;eb.lp1=em;var eq=0;var ep=0;eq=en.x-em.x;ep=en.y-em.y;var ef=Math.sqrt(eq*eq+ep*ep);eb.length=ef;var eo=1/ef;eq*=eo;ep*=eo;var ej=eq;eq=-ep;ep=ej;eb.lprojection=eq*en.x+ep*en.y;eb.lnormx=eq;eb.lnormy=ep;if(eb.wrap_lnorm!=null){eb.wrap_lnorm.zpp_inner.x=eq;eb.wrap_lnorm.zpp_inner.y=ep}en=em;ed=ed.next}var ek=this.lverts.next;var ec=ea.elt;ec.lp0=en;ec.lp1=ek;var el=0;var ei=0;el=en.x-ek.x;ei=en.y-ek.y;var ee=Math.sqrt(el*el+ei*ei);ec.length=ee;var eh=1/ee;el*=eh;ei*=eh;var eg=el;el=-ei;ei=eg;ec.lprojection=el*en.x+ei*en.y;ec.lnormx=el;ec.lnormy=ei;if(ec.wrap_lnorm!=null){ec.wrap_lnorm.zpp_inner.x=el;ec.wrap_lnorm.zpp_inner.y=ei}}};dQ.prototype.validate_gverts=function(){if(this.zip_gverts){if(this.body!=null){this.zip_gverts=false;this.validate_lverts();var ee=this.body;if(ee.zip_axis){ee.zip_axis=false;ee.axisx=Math.sin(ee.rot);ee.axisy=Math.cos(ee.rot)}var ea=this.lverts.next;var ec=this.gverts.next;while(ec!=null){var ed=ec;var eb=ea;ea=ea.next;ed.x=this.body.posx+(this.body.axisy*eb.x-this.body.axisx*eb.y);ed.y=this.body.posy+(eb.x*this.body.axisx+eb.y*this.body.axisy);ec=ec.next}}}};dQ.prototype.validate_gaxi=function(){if(this.zip_gaxi){if(this.body!=null){this.zip_gaxi=false;this.validate_laxi();var ee=this.body;if(ee.zip_axis){ee.zip_axis=false;ee.axisx=Math.sin(ee.rot);ee.axisy=Math.cos(ee.rot)}if(this.zip_gverts){if(this.body!=null){this.zip_gverts=false;this.validate_lverts();var eg=this.body;if(eg.zip_axis){eg.zip_axis=false;eg.axisx=Math.sin(eg.rot);eg.axisy=Math.cos(eg.rot)}var ek=this.lverts.next;var eb=this.gverts.next;while(eb!=null){var ed=eb;var ec=ek;ek=ek.next;ed.x=this.body.posx+(this.body.axisy*ec.x-this.body.axisx*ec.y);ed.y=this.body.posy+(ec.x*this.body.axisx+ec.y*this.body.axisy);eb=eb.next}}}var ea=this.edges.head;var ei=this.gverts.next;var el=ei;ei=ei.next;while(ei!=null){var ej=ei;var ef=ea.elt;ea=ea.next;ef.gp0=el;ef.gp1=ej;ef.gnormx=this.body.axisy*ef.lnormx-this.body.axisx*ef.lnormy;ef.gnormy=ef.lnormx*this.body.axisx+ef.lnormy*this.body.axisy;ef.gprojection=this.body.posx*ef.gnormx+this.body.posy*ef.gnormy+ef.lprojection;if(ef.wrap_gnorm!=null){ef.wrap_gnorm.zpp_inner.x=ef.gnormx;ef.wrap_gnorm.zpp_inner.y=ef.gnormy}ef.tp0=ef.gp0.y*ef.gnormx-ef.gp0.x*ef.gnormy;ef.tp1=ef.gp1.y*ef.gnormx-ef.gp1.x*ef.gnormy;el=ej;ei=ei.next}var eh=ea.elt;eh.gp0=el;eh.gp1=this.gverts.next;eh.gnormx=this.body.axisy*eh.lnormx-this.body.axisx*eh.lnormy;eh.gnormy=eh.lnormx*this.body.axisx+eh.lnormy*this.body.axisy;eh.gprojection=this.body.posx*eh.gnormx+this.body.posy*eh.gnormy+eh.lprojection;if(eh.wrap_gnorm!=null){eh.wrap_gnorm.zpp_inner.x=eh.gnormx;eh.wrap_gnorm.zpp_inner.y=eh.gnormy}eh.tp0=eh.gp0.y*eh.gnormx-eh.gp0.x*eh.gnormy;eh.tp1=eh.gp1.y*eh.gnormx-eh.gp1.x*eh.gnormy}}};dQ.prototype.__validate_aabb=function(){if(this.zip_gverts){if(this.body!=null){this.zip_gverts=false;this.validate_lverts();var eh=this.body;if(eh.zip_axis){eh.zip_axis=false;eh.axisx=Math.sin(eh.rot);eh.axisy=Math.cos(eh.rot)}var ea=this.lverts.next;var ec=this.gverts.next;while(ec!=null){var ee=ec;var eb=ea;ea=ea.next;ee.x=this.body.posx+(this.body.axisy*eb.x-this.body.axisx*eb.y);ee.y=this.body.posy+(eb.x*this.body.axisx+eb.y*this.body.axisy);ec=ec.next}}}var eg=this.gverts.next;this.aabb.minx=eg.x;this.aabb.miny=eg.y;this.aabb.maxx=eg.x;this.aabb.maxy=eg.y;var ed=this.gverts.next.next;while(ed!=null){var ef=ed;if(ef.xthis.aabb.maxx){this.aabb.maxx=ef.x}if(ef.ythis.aabb.maxy){this.aabb.maxy=ef.y}ed=ed.next}};dQ.prototype._force_validate_aabb=function(){var ea=this.lverts.next;var ef=this.gverts.next;var ec=ea;ea=ea.next;ef.x=this.body.posx+(this.body.axisy*ec.x-this.body.axisx*ec.y);ef.y=this.body.posy+(ec.x*this.body.axisx+ec.y*this.body.axisy);this.aabb.minx=ef.x;this.aabb.miny=ef.y;this.aabb.maxx=ef.x;this.aabb.maxy=ef.y;var ed=this.gverts.next.next;while(ed!=null){var ee=ed;var eb=ea;ea=ea.next;ee.x=this.body.posx+(this.body.axisy*eb.x-this.body.axisx*eb.y);ee.y=this.body.posy+(eb.x*this.body.axisx+eb.y*this.body.axisy);if(ee.xthis.aabb.maxx){this.aabb.maxx=ee.x}if(ee.ythis.aabb.maxy){this.aabb.maxy=ee.y}ed=ed.next}};dQ.prototype.__validate_sweepRadius=function(){var ee=0;var eg=0;this.validate_laxi();var eb=this.lverts.next;while(eb!=null){var ea=eb;var ed=ea.x*ea.x+ea.y*ea.y;if(ed>ee){ee=ed}eb=eb.next}var ec=this.edges.head;while(ec!=null){var ef=ec.elt;if(ef.lprojection0){var ef=eH>1?1:eH;var es=0;var er=0;es=eG.x;er=eG.y;var eD=ef;es+=ed*eD;er+=ec*eD;var eo=eh.lnormy*eG.x-eh.lnormx*eG.y;var en=eh.lnormy*es-eh.lnormx*er;em+=(en*en*en-eo*eo*eo)/(3*(en-eo))*ef*eh.length*P.fluidAngularDrag}if(eH<1){var ee=eH<0?0:eH;var eM=0;var ev=0;eM=eG.x;ev=eG.y;var eC=ee;eM+=ed*eC;ev+=ec*eC;var ez=eh.lnormy*eM-eh.lnormx*ev;var el=eh.lnormy*eF.x-eh.lnormx*eF.y;em+=(el*el*el-ez*ez*ez)/(3*(el-ez))*P.fluidVacuumDrag*(1-ee)*eh.length*P.fluidAngularDrag}eJ=eI;eG=eF;eI=eI.next}while(true){eI=this.lverts.next;var eO=eI;var ea=eN.elt;eN=eN.next;eg+=ea.length;var eE=0;var eq=0;eE=eO.x-eG.x;eq=eO.y-eG.y;em+=ea.length*P.fluidAngularDragFriction*this.material.dynamicFriction*ea.lprojection*ea.lprojection;var eB=-(eG.y*ea.lnormx-eG.x*ea.lnormy)/(eq*ea.lnormx-eE*ea.lnormy);if(eB>0){var ep=eB>1?1:eB;var eL=0;var eu=0;eL=eG.x;eu=eG.y;var eA=ep;eL+=eE*eA;eu+=eq*eA;var ey=ea.lnormy*eG.x-ea.lnormx*eG.y;var ek=ea.lnormy*eL-ea.lnormx*eu;em+=(ek*ek*ek-ey*ey*ey)/(3*(ek-ey))*ep*ea.length*P.fluidAngularDrag}if(eB<1){var eb=eB<0?0:eB;var eK=0;var et=0;eK=eG.x;et=eG.y;var ex=eb;eK+=eE*ex;et+=eq*ex;var ew=ea.lnormy*eK-ea.lnormx*et;var ej=ea.lnormy*eO.x-ea.lnormx*eO.y;em+=(ej*ej*ej-ew*ew*ew)/(3*(ej-ew))*P.fluidVacuumDrag*(1-eb)*ea.length*P.fluidAngularDrag}break}this.angDrag=em/(this.inertia*eg)};dQ.prototype.__validate_localCOM=function(){if(this.lverts.next.next==null){this.localCOMx=this.lverts.next.x;this.localCOMy=this.lverts.next.y}else{if(this.lverts.next.next.next==null){this.localCOMx=this.lverts.next.x;this.localCOMy=this.lverts.next.y;this.localCOMx+=this.lverts.next.next.x;this.localCOMy+=this.lverts.next.next.y;this.localCOMx*=0.5;this.localCOMy*=0.5}else{this.localCOMx=0;this.localCOMy=0;var eb=0;var ec=this.lverts.next;var ei=ec;ec=ec.next;var eh=ec;ec=ec.next;while(ec!=null){var ef=ec;eb+=eh.x*(ef.y-ei.y);var ea=ef.y*eh.x-ef.x*eh.y;this.localCOMx+=(eh.x+ef.x)*ea;this.localCOMy+=(eh.y+ef.y)*ea;ei=eh;eh=ef;ec=ec.next}ec=this.lverts.next;var ee=ec;eb+=eh.x*(ee.y-ei.y);var ej=ee.y*eh.x-ee.x*eh.y;this.localCOMx+=(eh.x+ee.x)*ej;this.localCOMy+=(eh.y+ee.y)*ej;ei=eh;ec=ec.next;var ed=ec;eb+=ee.x*(ed.y-ei.y);var eg=ed.y*ee.x-ed.x*ee.y;this.localCOMx+=(ee.x+ed.x)*eg;this.localCOMy+=(ee.y+ed.y)*eg;eb=1/(3*eb);var ek=eb;this.localCOMx*=ek;this.localCOMy*=ek}}};dQ.prototype.localCOM_validate=function(){if(this.zip_localCOM){this.zip_localCOM=false;if(this.type==1){var ef=this.polygon;if(ef.lverts.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y}else{if(ef.lverts.next.next.next==null){ef.localCOMx=ef.lverts.next.x;ef.localCOMy=ef.lverts.next.y;ef.localCOMx+=ef.lverts.next.next.x;ef.localCOMy+=ef.lverts.next.next.y;ef.localCOMx*=0.5;ef.localCOMy*=0.5}else{ef.localCOMx=0;ef.localCOMy=0;var eb=0;var ec=ef.lverts.next;var ek=ec;ec=ec.next;var ei=ec;ec=ec.next;while(ec!=null){var eg=ec;eb+=ei.x*(eg.y-ek.y);var ea=eg.y*ei.x-eg.x*ei.y;ef.localCOMx+=(ei.x+eg.x)*ea;ef.localCOMy+=(ei.y+eg.y)*ea;ek=ei;ei=eg;ec=ec.next}ec=ef.lverts.next;var ee=ec;eb+=ei.x*(ee.y-ek.y);var ej=ee.y*ei.x-ee.x*ei.y;ef.localCOMx+=(ei.x+ee.x)*ej;ef.localCOMy+=(ei.y+ee.y)*ej;ek=ei;ec=ec.next;var ed=ec;eb+=ee.x*(ed.y-ek.y);var eh=ed.y*ee.x-ed.x*ee.y;ef.localCOMx+=(ee.x+ed.x)*eh;ef.localCOMy+=(ee.y+ed.y)*eh;eb=1/(3*eb);var el=eb;ef.localCOMx*=el;ef.localCOMy*=el}}}if(this.wrap_localCOM!=null){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy}}};dQ.prototype.localCOM_invalidate=function(ej){if(this.zip_localCOM){this.zip_localCOM=false;if(this.type==1){var ei=this.polygon;if(ei.lverts.next.next==null){ei.localCOMx=ei.lverts.next.x;ei.localCOMy=ei.lverts.next.y}else{if(ei.lverts.next.next.next==null){ei.localCOMx=ei.lverts.next.x;ei.localCOMy=ei.lverts.next.y;ei.localCOMx+=ei.lverts.next.next.x;ei.localCOMy+=ei.lverts.next.next.y;ei.localCOMx*=0.5;ei.localCOMy*=0.5}else{ei.localCOMx=0;ei.localCOMy=0;var ee=0;var ef=ei.lverts.next;var ep=ef;ef=ef.next;var en=ef;ef=ef.next;while(ef!=null){var el=ef;ee+=en.x*(el.y-ep.y);var ed=el.y*en.x-el.x*en.y;ei.localCOMx+=(en.x+el.x)*ed;ei.localCOMy+=(en.y+el.y)*ed;ep=en;en=el;ef=ef.next}ef=ei.lverts.next;var eh=ef;ee+=en.x*(eh.y-ep.y);var eo=eh.y*en.x-eh.x*en.y;ei.localCOMx+=(en.x+eh.x)*eo;ei.localCOMy+=(en.y+eh.y)*eo;ep=en;ef=ef.next;var eg=ef;ee+=eh.x*(eg.y-ep.y);var em=eg.y*eh.x-eg.x*eh.y;ei.localCOMx+=(eh.x+eg.x)*em;ei.localCOMy+=(eh.y+eg.y)*em;ee=1/(3*ee);var eq=ee;ei.localCOMx*=eq;ei.localCOMy*=eq}}}if(this.wrap_localCOM!=null){this.wrap_localCOM.zpp_inner.x=this.localCOMx;this.wrap_localCOM.zpp_inner.y=this.localCOMy}}var eb=0;var ea=0;eb=ej.x-this.localCOMx;ea=ej.y-this.localCOMy;var ek=this.lverts.next;while(ek!=null){var ec=ek;ec.x+=eb;ec.y+=ea;ek=ek.next}this.invalidate_lverts()};dQ.prototype.setupLocalCOM=function(){var ea=this.localCOMx;var eh=this.localCOMy;var eb;if(au.poolVec2==null){eb=new r()}else{eb=au.poolVec2;au.poolVec2=eb.zpp_pool;eb.zpp_pool=null}if(eb.zpp_inner==null){var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ea;ef.y=eh;eb.zpp_inner=ef;eb.zpp_inner.outer=eb}else{var ec;var eg=eb.zpp_inner;if(eg._validate!=null){eg._validate()}if(eb.zpp_inner.x==ea){var ee=eb.zpp_inner;if(ee._validate!=null){ee._validate()}ec=eb.zpp_inner.y==eh}else{ec=false}if(!ec){eb.zpp_inner.x=ea;eb.zpp_inner.y=eh;var ed=eb.zpp_inner;if(ed._invalidate!=null){ed._invalidate(ed)}}}eb.zpp_inner.weak=false;this.wrap_localCOM=eb;this.wrap_localCOM.zpp_inner._inuse=true;this.wrap_localCOM.zpp_inner._validate=dX(this,this.localCOM_validate);this.wrap_localCOM.zpp_inner._invalidate=dX(this,this.localCOM_invalidate)};dQ.prototype.__translate=function(eb,ea){var ec=this.lverts.next;while(ec!=null){var ed=ec;ed.x+=eb;ed.y+=ea;ec=ec.next}this.invalidate_lverts()};dQ.prototype.__scale=function(ed,ec){var ea=this.lverts.next;while(ea!=null){var eb=ea;eb.x*=ed;eb.y*=ec;ea=ea.next}this.invalidate_lverts()};dQ.prototype.__rotate=function(ee,ed){var eb=this.lverts.next;while(eb!=null){var ef=eb;var ec=0;var ea=0;ec=ed*ef.x-ee*ef.y;ea=ef.x*ee+ef.y*ed;ef.x=ec;ef.y=ea;eb=eb.next}this.invalidate_lverts()};dQ.prototype.__transform=function(ec){var eb=this.lverts.next;while(eb!=null){var ed=eb;var ea=ec.zpp_inner.a*ed.x+ec.zpp_inner.b*ed.y+ec.zpp_inner.tx;ed.y=ec.zpp_inner.c*ed.x+ec.zpp_inner.d*ed.y+ec.zpp_inner.ty;ed.x=ea;eb=eb.next}this.invalidate_lverts()};dQ.prototype.__copy=function(){var ea=this.outer_zn;if(ea.zpp_inner_zn.wrap_lverts==null){ea.zpp_inner_zn.getlverts()}return new Z(ea.zpp_inner_zn.wrap_lverts).zpp_inner_zn};dQ.prototype.__class__=dQ;var dB=zpp_nape.space.ZPP_Broadphase=function(){this.circShape=null;this.matrix=null;this.aabbShape=null;this.dynab=null;this.sweep=null;this.is_sweep=false;this.space=null};dB.__name__=["zpp_nape","space","ZPP_Broadphase"];dB.prototype.space=null;dB.prototype.is_sweep=null;dB.prototype.sweep=null;dB.prototype.dynab=null;dB.prototype.insert=function(ea){if(this.is_sweep){this.sweep.__insert(ea)}else{this.dynab.__insert(ea)}};dB.prototype.remove=function(ea){if(this.is_sweep){this.sweep.__remove(ea)}else{this.dynab.__remove(ea)}};dB.prototype.sync=function(el){if(this.is_sweep){if(!this.sweep.space.continuous){if(el.zip_aabb){if(el.body!=null){el.zip_aabb=false;if(el.type==0){var ea=el.circle;if(ea.zip_worldCOM){if(ea.body!=null){ea.zip_worldCOM=false;if(ea.zip_localCOM){ea.zip_localCOM=false;if(ea.type==1){var eR=ea.polygon;if(eR.lverts.next.next==null){eR.localCOMx=eR.lverts.next.x;eR.localCOMy=eR.lverts.next.y}else{if(eR.lverts.next.next.next==null){eR.localCOMx=eR.lverts.next.x;eR.localCOMy=eR.lverts.next.y;eR.localCOMx+=eR.lverts.next.next.x;eR.localCOMy+=eR.lverts.next.next.y;eR.localCOMx*=0.5;eR.localCOMy*=0.5}else{eR.localCOMx=0;eR.localCOMy=0;var ev=0;var ec=eR.lverts.next;var eQ=ec;ec=ec.next;var eO=ec;ec=ec.next;while(ec!=null){var eM=ec;ev+=eO.x*(eM.y-eQ.y);var es=eM.y*eO.x-eM.x*eO.y;eR.localCOMx+=(eO.x+eM.x)*es;eR.localCOMy+=(eO.y+eM.y)*es;eQ=eO;eO=eM;ec=ec.next}ec=eR.lverts.next;var ey=ec;ev+=eO.x*(ey.y-eQ.y);var eK=ey.y*eO.x-ey.x*eO.y;eR.localCOMx+=(eO.x+ey.x)*eK;eR.localCOMy+=(eO.y+ey.y)*eK;eQ=eO;ec=ec.next;var ew=ec;ev+=ey.x*(ew.y-eQ.y);var eH=ew.y*ey.x-ew.x*ey.y;eR.localCOMx+=(ey.x+ew.x)*eH;eR.localCOMy+=(ey.y+ew.y)*eH;ev=1/(3*ev);var eS=ev;eR.localCOMx*=eS;eR.localCOMy*=eS}}}if(ea.wrap_localCOM!=null){ea.wrap_localCOM.zpp_inner.x=ea.localCOMx;ea.wrap_localCOM.zpp_inner.y=ea.localCOMy}}var eP=ea.body;if(eP.zip_axis){eP.zip_axis=false;eP.axisx=Math.sin(eP.rot);eP.axisy=Math.cos(eP.rot)}ea.worldCOMx=ea.body.posx+(ea.body.axisy*ea.localCOMx-ea.body.axisx*ea.localCOMy);ea.worldCOMy=ea.body.posy+(ea.localCOMx*ea.body.axisx+ea.localCOMy*ea.body.axisy)}}var eo=ea.radius;var en=ea.radius;ea.aabb.minx=ea.worldCOMx-eo;ea.aabb.miny=ea.worldCOMy-en;ea.aabb.maxx=ea.worldCOMx+eo;ea.aabb.maxy=ea.worldCOMy+en}else{var eN=el.polygon;if(eN.zip_gverts){if(eN.body!=null){eN.zip_gverts=false;eN.validate_lverts();var eL=eN.body;if(eL.zip_axis){eL.zip_axis=false;eL.axisx=Math.sin(eL.rot);eL.axisy=Math.cos(eL.rot)}var ex=eN.lverts.next;var ek=eN.gverts.next;while(ek!=null){var eZ=ek;var eW=ex;ex=ex.next;eZ.x=eN.body.posx+(eN.body.axisy*eW.x-eN.body.axisx*eW.y);eZ.y=eN.body.posy+(eW.x*eN.body.axisx+eW.y*eN.body.axisy);ek=ek.next}}}var e2=eN.gverts.next;eN.aabb.minx=e2.x;eN.aabb.miny=e2.y;eN.aabb.maxx=e2.x;eN.aabb.maxy=e2.y;var ej=eN.gverts.next.next;while(ej!=null){var eU=ej;if(eU.xeN.aabb.maxx){eN.aabb.maxx=eU.x}if(eU.yeN.aabb.maxy){eN.aabb.maxy=eU.y}ej=ej.next}}}}}}else{var eJ=this.dynab;var eq=el.node;if(!eq.synced){if(!eJ.space.continuous){if(el.zip_aabb){if(el.body!=null){el.zip_aabb=false;if(el.type==0){var eG=el.circle;if(eG.zip_worldCOM){if(eG.body!=null){eG.zip_worldCOM=false;if(eG.zip_localCOM){eG.zip_localCOM=false;if(eG.type==1){var eF=eG.polygon;if(eF.lverts.next.next==null){eF.localCOMx=eF.lverts.next.x;eF.localCOMy=eF.lverts.next.y}else{if(eF.lverts.next.next.next==null){eF.localCOMx=eF.lverts.next.x;eF.localCOMy=eF.lverts.next.y;eF.localCOMx+=eF.lverts.next.next.x;eF.localCOMy+=eF.lverts.next.next.y;eF.localCOMx*=0.5;eF.localCOMy*=0.5}else{eF.localCOMx=0;eF.localCOMy=0;var em=0;var ei=eF.lverts.next;var ef=ei;ei=ei.next;var e3=ei;ei=ei.next;while(ei!=null){var eu=ei;em+=e3.x*(eu.y-ef.y);var eE=eu.y*e3.x-eu.x*e3.y;eF.localCOMx+=(e3.x+eu.x)*eE;eF.localCOMy+=(e3.y+eu.y)*eE;ef=e3;e3=eu;ei=ei.next}ei=eF.lverts.next;var er=ei;em+=e3.x*(er.y-ef.y);var eC=er.y*e3.x-er.x*e3.y;eF.localCOMx+=(e3.x+er.x)*eC;eF.localCOMy+=(e3.y+er.y)*eC;ef=e3;ei=ei.next;var ep=ei;em+=er.x*(ep.y-ef.y);var eA=ep.y*er.x-ep.x*er.y;eF.localCOMx+=(er.x+ep.x)*eA;eF.localCOMy+=(er.y+ep.y)*eA;em=1/(3*em);var et=em;eF.localCOMx*=et;eF.localCOMy*=et}}}if(eG.wrap_localCOM!=null){eG.wrap_localCOM.zpp_inner.x=eG.localCOMx;eG.wrap_localCOM.zpp_inner.y=eG.localCOMy}}var eB=eG.body;if(eB.zip_axis){eB.zip_axis=false;eB.axisx=Math.sin(eB.rot);eB.axisy=Math.cos(eB.rot)}eG.worldCOMx=eG.body.posx+(eG.body.axisy*eG.localCOMx-eG.body.axisx*eG.localCOMy);eG.worldCOMy=eG.body.posy+(eG.localCOMx*eG.body.axisx+eG.localCOMy*eG.body.axisy)}}var eb=eG.radius;var eT=eG.radius;eG.aabb.minx=eG.worldCOMx-eb;eG.aabb.miny=eG.worldCOMy-eT;eG.aabb.maxx=eG.worldCOMx+eb;eG.aabb.maxy=eG.worldCOMy+eT}else{var ez=el.polygon;if(ez.zip_gverts){if(ez.body!=null){ez.zip_gverts=false;ez.validate_lverts();var e0=ez.body;if(e0.zip_axis){e0.zip_axis=false;e0.axisx=Math.sin(e0.rot);e0.axisy=Math.cos(e0.rot)}var eD=ez.lverts.next;var eh=ez.gverts.next;while(eh!=null){var eX=eh;var ed=eD;eD=eD.next;eX.x=ez.body.posx+(ez.body.axisy*ed.x-ez.body.axisx*ed.y);eX.y=ez.body.posy+(ed.x*ez.body.axisx+ed.y*ez.body.axisy);eh=eh.next}}}var eV=ez.gverts.next;ez.aabb.minx=eV.x;ez.aabb.miny=eV.y;ez.aabb.maxx=eV.x;ez.aabb.maxy=eV.y;var eg=ez.gverts.next.next;while(eg!=null){var e1=eg;if(e1.xez.aabb.maxx){ez.aabb.maxx=e1.x}if(e1.yez.aabb.maxy){ez.aabb.maxy=e1.y}eg=eg.next}}}}}var ee;if(eq.dyn==(el.body.type==1?false:!el.body.component.sleeping)){var eY=eq.aabb;var eI=el.aabb;ee=!(eI.minx>=eY.minx&&eI.miny>=eY.miny&&eI.maxx<=eY.maxx&&eI.maxy<=eY.maxy)}else{ee=true}if(ee){eq.synced=true;eq.snext=eJ.syncs;eJ.syncs=eq}}}};dB.prototype.broadphase=function(eb,ea){};dB.prototype.clear=function(){};dB.prototype.shapesUnderPoint=function(ea,ed,ec,eb){return null};dB.prototype.bodiesUnderPoint=function(ea,ed,ec,eb){return null};dB.prototype.aabbShape=null;dB.prototype.matrix=null;dB.prototype.updateAABBShape=function(ep){if(this.aabbShape==null){if(br.BodyType_STATIC==null){br.internal=true;br.BodyType_STATIC=new cU();br.internal=false}var eb=new at(br.BodyType_STATIC).zpp_inner.wrap_shapes;var ea=this.aabbShape=new Z(Z.rect(ep.minx,ep.miny,ep.maxx-ep.minx,ep.maxy-ep.miny));if(eb.zpp_inner.reverse_flag){eb.push(ea)}else{eb.unshift(ea)}}else{var eh=this.aabbShape.zpp_inner.aabb;var ee=(ep.maxx-ep.minx)/(eh.maxx-eh.minx);var ed=(ep.maxy-ep.miny)/(eh.maxy-eh.miny);if(this.matrix==null){this.matrix=new cI()}var eL=this.matrix;eL.zpp_inner.a=ee;var eJ=eL.zpp_inner;if(eJ._invalidate!=null){eJ._invalidate()}var eH=this.matrix;var eF=this.matrix;eF.zpp_inner.c=0;var eD=eF.zpp_inner;if(eD._invalidate!=null){eD._invalidate()}eH.zpp_inner.b=eF.zpp_inner.c;var eB=eH.zpp_inner;if(eB._invalidate!=null){eB._invalidate()}var eA=this.matrix;eA.zpp_inner.d=ed;var ey=eA.zpp_inner;if(ey._invalidate!=null){ey._invalidate()}var ex=this.matrix;ex.zpp_inner.tx=ep.minx-ee*eh.minx;var e2=ex.zpp_inner;if(e2._invalidate!=null){e2._invalidate()}var eZ=this.matrix;eZ.zpp_inner.ty=ep.miny-ed*eh.miny;var eX=eZ.zpp_inner;if(eX._invalidate!=null){eX._invalidate()}this.aabbShape.transform(this.matrix)}var eW=this.aabbShape.zpp_inner;if(eW.zip_aabb){if(eW.body!=null){eW.zip_aabb=false;if(eW.type==0){var eV=eW.circle;if(eV.zip_worldCOM){if(eV.body!=null){eV.zip_worldCOM=false;if(eV.zip_localCOM){eV.zip_localCOM=false;if(eV.type==1){var eU=eV.polygon;if(eU.lverts.next.next==null){eU.localCOMx=eU.lverts.next.x;eU.localCOMy=eU.lverts.next.y}else{if(eU.lverts.next.next.next==null){eU.localCOMx=eU.lverts.next.x;eU.localCOMy=eU.lverts.next.y;eU.localCOMx+=eU.lverts.next.next.x;eU.localCOMy+=eU.lverts.next.next.y;eU.localCOMx*=0.5;eU.localCOMy*=0.5}else{eU.localCOMx=0;eU.localCOMy=0;var et=0;var ec=eU.lverts.next;var eK=ec;ec=ec.next;var eI=ec;ec=ec.next;while(ec!=null){var eG=ec;et+=eI.x*(eG.y-eK.y);var es=eG.y*eI.x-eG.x*eI.y;eU.localCOMx+=(eI.x+eG.x)*es;eU.localCOMy+=(eI.y+eG.y)*es;eK=eI;eI=eG;ec=ec.next}ec=eU.lverts.next;var ew=ec;et+=eI.x*(ew.y-eK.y);var eE=ew.y*eI.x-ew.x*eI.y;eU.localCOMx+=(eI.x+ew.x)*eE;eU.localCOMy+=(eI.y+ew.y)*eE;eK=eI;ec=ec.next;var eu=ec;et+=ew.x*(eu.y-eK.y);var eC=eu.y*ew.x-eu.x*ew.y;eU.localCOMx+=(ew.x+eu.x)*eC;eU.localCOMy+=(ew.y+eu.y)*eC;et=1/(3*et);var eM=et;eU.localCOMx*=eM;eU.localCOMy*=eM}}}if(eV.wrap_localCOM!=null){eV.wrap_localCOM.zpp_inner.x=eV.localCOMx;eV.wrap_localCOM.zpp_inner.y=eV.localCOMy}}var eS=eV.body;if(eS.zip_axis){eS.zip_axis=false;eS.axisx=Math.sin(eS.rot);eS.axisy=Math.cos(eS.rot)}eV.worldCOMx=eV.body.posx+(eV.body.axisy*eV.localCOMx-eV.body.axisx*eV.localCOMy);eV.worldCOMy=eV.body.posy+(eV.localCOMx*eV.body.axisx+eV.localCOMy*eV.body.axisy)}}var eo=eV.radius;var en=eV.radius;eV.aabb.minx=eV.worldCOMx-eo;eV.aabb.miny=eV.worldCOMy-en;eV.aabb.maxx=eV.worldCOMx+eo;eV.aabb.maxy=eV.worldCOMy+en}else{var eQ=eW.polygon;if(eQ.zip_gverts){if(eQ.body!=null){eQ.zip_gverts=false;eQ.validate_lverts();var eP=eQ.body;if(eP.zip_axis){eP.zip_axis=false;eP.axisx=Math.sin(eP.rot);eP.axisy=Math.cos(eP.rot)}var ev=eQ.lverts.next;var el=eQ.gverts.next;while(el!=null){var eY=el;var eR=ev;ev=ev.next;eY.x=eQ.body.posx+(eQ.body.axisy*eR.x-eQ.body.axisx*eR.y);eY.y=eQ.body.posy+(eR.x*eQ.body.axisx+eR.y*eQ.body.axisy);el=el.next}}}var e4=eQ.gverts.next;eQ.aabb.minx=e4.x;eQ.aabb.miny=e4.y;eQ.aabb.maxx=e4.x;eQ.aabb.maxy=e4.y;var ek=eQ.gverts.next.next;while(ek!=null){var eN=ek;if(eN.xeQ.aabb.maxx){eQ.aabb.maxx=eN.x}if(eN.yeQ.aabb.maxy){eQ.aabb.maxy=eN.y}ek=ek.next}}}}var eO=this.aabbShape.zpp_inner.polygon;if(eO.zip_gaxi){if(eO.body!=null){eO.zip_gaxi=false;eO.validate_laxi();var er=eO.body;if(er.zip_axis){er.zip_axis=false;er.axisx=Math.sin(er.rot);er.axisy=Math.cos(er.rot)}if(eO.zip_gverts){if(eO.body!=null){eO.zip_gverts=false;eO.validate_lverts();var eq=eO.body;if(eq.zip_axis){eq.zip_axis=false;eq.axisx=Math.sin(eq.rot);eq.axisy=Math.cos(eq.rot)}var ez=eO.lverts.next;var ej=eO.gverts.next;while(ej!=null){var eT=ej;var ef=ez;ez=ez.next;eT.x=eO.body.posx+(eO.body.axisy*ef.x-eO.body.axisx*ef.y);eT.y=eO.body.posy+(ef.x*eO.body.axisx+ef.y*eO.body.axisy);ej=ej.next}}}var e0=eO.edges.head;var ei=eO.gverts.next;var eg=ei;ei=ei.next;while(ei!=null){var e5=ei;var e3=e0.elt;e0=e0.next;e3.gp0=eg;e3.gp1=e5;e3.gnormx=eO.body.axisy*e3.lnormx-eO.body.axisx*e3.lnormy;e3.gnormy=e3.lnormx*eO.body.axisx+e3.lnormy*eO.body.axisy;e3.gprojection=eO.body.posx*e3.gnormx+eO.body.posy*e3.gnormy+e3.lprojection;if(e3.wrap_gnorm!=null){e3.wrap_gnorm.zpp_inner.x=e3.gnormx;e3.wrap_gnorm.zpp_inner.y=e3.gnormy}e3.tp0=e3.gp0.y*e3.gnormx-e3.gp0.x*e3.gnormy;e3.tp1=e3.gp1.y*e3.gnormx-e3.gp1.x*e3.gnormy;eg=e5;ei=ei.next}var em=e0.elt;em.gp0=eg;em.gp1=eO.gverts.next;em.gnormx=eO.body.axisy*em.lnormx-eO.body.axisx*em.lnormy;em.gnormy=em.lnormx*eO.body.axisx+em.lnormy*eO.body.axisy;em.gprojection=eO.body.posx*em.gnormx+eO.body.posy*em.gnormy+em.lprojection;if(em.wrap_gnorm!=null){em.wrap_gnorm.zpp_inner.x=em.gnormx;em.wrap_gnorm.zpp_inner.y=em.gnormy}em.tp0=em.gp0.y*em.gnormx-em.gp0.x*em.gnormy;em.tp1=em.gp1.y*em.gnormx-em.gp1.x*em.gnormy}}};dB.prototype.shapesInAABB=function(eb,ea,ee,ed,ec){return null};dB.prototype.bodiesInAABB=function(eb,ea,ee,ed,ec){return null};dB.prototype.circShape=null;dB.prototype.updateCircShape=function(ez,ew,eJ){if(this.circShape==null){if(br.BodyType_STATIC==null){br.internal=true;br.BodyType_STATIC=new cU();br.internal=false}var eb=new at(br.BodyType_STATIC).zpp_inner.wrap_shapes;var el;if(au.poolVec2==null){el=new r()}else{el=au.poolVec2;au.poolVec2=el.zpp_pool;el.zpp_pool=null}if(el.zpp_inner==null){var eA;if(bB.zpp_pool==null){eA=new bB()}else{eA=bB.zpp_pool;bB.zpp_pool=eA.next;eA.next=null}eA.weak=false;eA._immutable=false;eA.x=ez;eA.y=ew;el.zpp_inner=eA;el.zpp_inner.outer=el}else{var eL;var eI=el.zpp_inner;if(eI._validate!=null){eI._validate()}if(el.zpp_inner.x==ez){var eF=el.zpp_inner;if(eF._validate!=null){eF._validate()}eL=el.zpp_inner.y==ew}else{eL=false}if(!eL){el.zpp_inner.x=ez;el.zpp_inner.y=ew;var eD=el.zpp_inner;if(eD._invalidate!=null){eD._invalidate(eD)}}}el.zpp_inner.weak=false;var ea=this.circShape=new ds(eJ,el);if(eb.zpp_inner.reverse_flag){eb.push(ea)}else{eb.unshift(ea)}}else{var ej=this.circShape.zpp_inner.circle;var ed=eJ/ej.radius;if(this.matrix==null){this.matrix=new cI()}var eB=this.matrix;var ey=this.matrix;ey.zpp_inner.d=ed;var ev=ey.zpp_inner;if(ev._invalidate!=null){ev._invalidate()}eB.zpp_inner.a=ey.zpp_inner.d;var et=eB.zpp_inner;if(et._invalidate!=null){et._invalidate()}var es=this.matrix;var er=this.matrix;er.zpp_inner.c=0;var eX=er.zpp_inner;if(eX._invalidate!=null){eX._invalidate()}es.zpp_inner.b=er.zpp_inner.c;var eW=es.zpp_inner;if(eW._invalidate!=null){eW._invalidate()}var eU=this.matrix;eU.zpp_inner.tx=ez-ed*ej.localCOMx;var eT=eU.zpp_inner;if(eT._invalidate!=null){eT._invalidate()}var eS=this.matrix;eS.zpp_inner.ty=ew-ed*ej.localCOMy;var eR=eS.zpp_inner;if(eR._invalidate!=null){eR._invalidate()}this.circShape.transform(this.matrix)}var eQ=this.circShape.zpp_inner;if(eQ.zip_aabb){if(eQ.body!=null){eQ.zip_aabb=false;if(eQ.type==0){var eO=eQ.circle;if(eO.zip_worldCOM){if(eO.body!=null){eO.zip_worldCOM=false;if(eO.zip_localCOM){eO.zip_localCOM=false;if(eO.type==1){var eN=eO.polygon;if(eN.lverts.next.next==null){eN.localCOMx=eN.lverts.next.x;eN.localCOMy=eN.lverts.next.y}else{if(eN.lverts.next.next.next==null){eN.localCOMx=eN.lverts.next.x;eN.localCOMy=eN.lverts.next.y;eN.localCOMx+=eN.lverts.next.next.x;eN.localCOMy+=eN.lverts.next.next.y;eN.localCOMx*=0.5;eN.localCOMy*=0.5}else{eN.localCOMx=0;eN.localCOMy=0;var eo=0;var ec=eN.lverts.next;var eG=ec;ec=ec.next;var eE=ec;ec=ec.next;while(ec!=null){var eC=ec;eo+=eE.x*(eC.y-eG.y);var em=eC.y*eE.x-eC.x*eE.y;eN.localCOMx+=(eE.x+eC.x)*em;eN.localCOMy+=(eE.y+eC.y)*em;eG=eE;eE=eC;ec=ec.next}ec=eN.lverts.next;var eq=ec;eo+=eE.x*(eq.y-eG.y);var ex=eq.y*eE.x-eq.x*eE.y;eN.localCOMx+=(eE.x+eq.x)*ex;eN.localCOMy+=(eE.y+eq.y)*ex;eG=eE;ec=ec.next;var en=ec;eo+=eq.x*(en.y-eG.y);var eu=en.y*eq.x-en.x*eq.y;eN.localCOMx+=(eq.x+en.x)*eu;eN.localCOMy+=(eq.y+en.y)*eu;eo=1/(3*eo);var eH=eo;eN.localCOMx*=eH;eN.localCOMy*=eH}}}if(eO.wrap_localCOM!=null){eO.wrap_localCOM.zpp_inner.x=eO.localCOMx;eO.wrap_localCOM.zpp_inner.y=eO.localCOMy}}var eM=eO.body;if(eM.zip_axis){eM.zip_axis=false;eM.axisx=Math.sin(eM.rot);eM.axisy=Math.cos(eM.rot)}eO.worldCOMx=eO.body.posx+(eO.body.axisy*eO.localCOMx-eO.body.axisx*eO.localCOMy);eO.worldCOMy=eO.body.posy+(eO.localCOMx*eO.body.axisx+eO.localCOMy*eO.body.axisy)}}var eh=eO.radius;var eg=eO.radius;eO.aabb.minx=eO.worldCOMx-eh;eO.aabb.miny=eO.worldCOMy-eg;eO.aabb.maxx=eO.worldCOMx+eh;eO.aabb.maxy=eO.worldCOMy+eg}else{var ek=eQ.polygon;if(ek.zip_gverts){if(ek.body!=null){ek.zip_gverts=false;ek.validate_lverts();var ei=ek.body;if(ei.zip_axis){ei.zip_axis=false;ei.axisx=Math.sin(ei.rot);ei.axisy=Math.cos(ei.rot)}var ep=ek.lverts.next;var ef=ek.gverts.next;while(ef!=null){var eV=ef;var eP=ep;ep=ep.next;eV.x=ek.body.posx+(ek.body.axisy*eP.x-ek.body.axisx*eP.y);eV.y=ek.body.posy+(eP.x*ek.body.axisx+eP.y*ek.body.axisy);ef=ef.next}}}var eY=ek.gverts.next;ek.aabb.minx=eY.x;ek.aabb.miny=eY.y;ek.aabb.maxx=eY.x;ek.aabb.maxy=eY.y;var ee=ek.gverts.next.next;while(ee!=null){var eK=ee;if(eK.xek.aabb.maxx){ek.aabb.maxx=eK.x}if(eK.yek.aabb.maxy){ek.aabb.maxy=eK.y}ee=ee.next}}}}};dB.prototype.shapesInCircle=function(ea,ef,ed,ee,ec,eb){return null};dB.prototype.bodiesInCircle=function(ea,ef,ed,ee,ec,eb){return null};dB.prototype.validateShape=function(eQ){if(eQ.type==1){var ea=eQ.polygon;if(ea.zip_gaxi){if(ea.body!=null){ea.zip_gaxi=false;ea.validate_laxi();var eO=ea.body;if(eO.zip_axis){eO.zip_axis=false;eO.axisx=Math.sin(eO.rot);eO.axisy=Math.cos(eO.rot)}if(ea.zip_gverts){if(ea.body!=null){ea.zip_gverts=false;ea.validate_lverts();var eM=ea.body;if(eM.zip_axis){eM.zip_axis=false;eM.axisx=Math.sin(eM.rot);eM.axisy=Math.cos(eM.rot)}var ev=ea.lverts.next;var eb=ea.gverts.next;while(eb!=null){var eU=eb;var eS=ev;ev=ev.next;eU.x=ea.body.posx+(ea.body.axisy*eS.x-ea.body.axisx*eS.y);eU.y=ea.body.posy+(eS.x*ea.body.axisx+eS.y*ea.body.axisy);eb=eb.next}}}var eV=ea.edges.head;var ej=ea.gverts.next;var eN=ej;ej=ej.next;while(ej!=null){var eL=ej;var eW=eV.elt;eV=eV.next;eW.gp0=eN;eW.gp1=eL;eW.gnormx=ea.body.axisy*eW.lnormx-ea.body.axisx*eW.lnormy;eW.gnormy=eW.lnormx*ea.body.axisx+eW.lnormy*ea.body.axisy;eW.gprojection=ea.body.posx*eW.gnormx+ea.body.posy*eW.gnormy+eW.lprojection;if(eW.wrap_gnorm!=null){eW.wrap_gnorm.zpp_inner.x=eW.gnormx;eW.wrap_gnorm.zpp_inner.y=eW.gnormy}eW.tp0=eW.gp0.y*eW.gnormx-eW.gp0.x*eW.gnormy;eW.tp1=eW.gp1.y*eW.gnormx-eW.gp1.x*eW.gnormy;eN=eL;ej=ej.next}var el=eV.elt;el.gp0=eN;el.gp1=ea.gverts.next;el.gnormx=ea.body.axisy*el.lnormx-ea.body.axisx*el.lnormy;el.gnormy=el.lnormx*ea.body.axisx+el.lnormy*ea.body.axisy;el.gprojection=ea.body.posx*el.gnormx+ea.body.posy*el.gnormy+el.lprojection;if(el.wrap_gnorm!=null){el.wrap_gnorm.zpp_inner.x=el.gnormx;el.wrap_gnorm.zpp_inner.y=el.gnormy}el.tp0=el.gp0.y*el.gnormx-el.gp0.x*el.gnormy;el.tp1=el.gp1.y*el.gnormx-el.gp1.x*el.gnormy}}}if(eQ.zip_aabb){if(eQ.body!=null){eQ.zip_aabb=false;if(eQ.type==0){var eK=eQ.circle;if(eK.zip_worldCOM){if(eK.body!=null){eK.zip_worldCOM=false;if(eK.zip_localCOM){eK.zip_localCOM=false;if(eK.type==1){var eI=eK.polygon;if(eI.lverts.next.next==null){eI.localCOMx=eI.lverts.next.x;eI.localCOMy=eI.lverts.next.y}else{if(eI.lverts.next.next.next==null){eI.localCOMx=eI.lverts.next.x;eI.localCOMy=eI.lverts.next.y;eI.localCOMx+=eI.lverts.next.next.x;eI.localCOMy+=eI.lverts.next.next.y;eI.localCOMx*=0.5;eI.localCOMy*=0.5}else{eI.localCOMx=0;eI.localCOMy=0;var et=0;var ei=eI.lverts.next;var ee=ei;ei=ei.next;var eZ=ei;ei=ei.next;while(ei!=null){var eJ=ei;et+=eZ.x*(eJ.y-ee.y);var eq=eJ.y*eZ.x-eJ.x*eZ.y;eI.localCOMx+=(eZ.x+eJ.x)*eq;eI.localCOMy+=(eZ.y+eJ.y)*eq;ee=eZ;eZ=eJ;ei=ei.next}ei=eI.lverts.next;var ew=ei;et+=eZ.x*(ew.y-ee.y);var eH=ew.y*eZ.x-ew.x*eZ.y;eI.localCOMx+=(eZ.x+ew.x)*eH;eI.localCOMy+=(eZ.y+ew.y)*eH;ee=eZ;ei=ei.next;var eu=ei;et+=ew.x*(eu.y-ee.y);var eF=eu.y*ew.x-eu.x*ew.y;eI.localCOMx+=(ew.x+eu.x)*eF;eI.localCOMy+=(ew.y+eu.y)*eF;et=1/(3*et);var eP=et;eI.localCOMx*=eP;eI.localCOMy*=eP}}}if(eK.wrap_localCOM!=null){eK.wrap_localCOM.zpp_inner.x=eK.localCOMx;eK.wrap_localCOM.zpp_inner.y=eK.localCOMy}}var eG=eK.body;if(eG.zip_axis){eG.zip_axis=false;eG.axisx=Math.sin(eG.rot);eG.axisy=Math.cos(eG.rot)}eK.worldCOMx=eK.body.posx+(eK.body.axisy*eK.localCOMx-eK.body.axisx*eK.localCOMy);eK.worldCOMy=eK.body.posy+(eK.localCOMx*eK.body.axisx+eK.localCOMy*eK.body.axisy)}}var en=eK.radius;var em=eK.radius;eK.aabb.minx=eK.worldCOMx-en;eK.aabb.miny=eK.worldCOMy-em;eK.aabb.maxx=eK.worldCOMx+en;eK.aabb.maxy=eK.worldCOMy+em}else{var eE=eQ.polygon;if(eE.zip_gverts){if(eE.body!=null){eE.zip_gverts=false;eE.validate_lverts();var eC=eE.body;if(eC.zip_axis){eC.zip_axis=false;eC.axisx=Math.sin(eC.rot);eC.axisy=Math.cos(eC.rot)}var eD=eE.lverts.next;var eh=eE.gverts.next;while(eh!=null){var eT=eh;var ec=eD;eD=eD.next;eT.x=eE.body.posx+(eE.body.axisy*ec.x-eE.body.axisx*ec.y);eT.y=eE.body.posy+(ec.x*eE.body.axisx+ec.y*eE.body.axisy);eh=eh.next}}}var eX=eE.gverts.next;eE.aabb.minx=eX.x;eE.aabb.miny=eX.y;eE.aabb.maxx=eX.x;eE.aabb.maxy=eX.y;var eg=eE.gverts.next.next;while(eg!=null){var eR=eg;if(eR.xeE.aabb.maxx){eE.aabb.maxx=eR.x}if(eR.yeE.aabb.maxy){eE.aabb.maxy=eR.y}eg=eg.next}}}}if(eQ.zip_worldCOM){if(eQ.body!=null){eQ.zip_worldCOM=false;if(eQ.zip_localCOM){eQ.zip_localCOM=false;if(eQ.type==1){var eA=eQ.polygon;if(eA.lverts.next.next==null){eA.localCOMx=eA.lverts.next.x;eA.localCOMy=eA.lverts.next.y}else{if(eA.lverts.next.next.next==null){eA.localCOMx=eA.lverts.next.x;eA.localCOMy=eA.lverts.next.y;eA.localCOMx+=eA.lverts.next.next.x;eA.localCOMy+=eA.lverts.next.next.y;eA.localCOMx*=0.5;eA.localCOMy*=0.5}else{eA.localCOMx=0;eA.localCOMy=0;var ek=0;var ef=eA.lverts.next;var ed=ef;ef=ef.next;var eY=ef;ef=ef.next;while(ef!=null){var es=ef;ek+=eY.x*(es.y-ed.y);var eB=es.y*eY.x-es.x*eY.y;eA.localCOMx+=(eY.x+es.x)*eB;eA.localCOMy+=(eY.y+es.y)*eB;ed=eY;eY=es;ef=ef.next}ef=eA.lverts.next;var ep=ef;ek+=eY.x*(ep.y-ed.y);var ez=ep.y*eY.x-ep.x*eY.y;eA.localCOMx+=(eY.x+ep.x)*ez;eA.localCOMy+=(eY.y+ep.y)*ez;ed=eY;ef=ef.next;var eo=ef;ek+=ep.x*(eo.y-ed.y);var ey=eo.y*ep.x-eo.x*ep.y;eA.localCOMx+=(ep.x+eo.x)*ey;eA.localCOMy+=(ep.y+eo.y)*ey;ek=1/(3*ek);var er=ek;eA.localCOMx*=er;eA.localCOMy*=er}}}if(eQ.wrap_localCOM!=null){eQ.wrap_localCOM.zpp_inner.x=eQ.localCOMx;eQ.wrap_localCOM.zpp_inner.y=eQ.localCOMy}}var ex=eQ.body;if(ex.zip_axis){ex.zip_axis=false;ex.axisx=Math.sin(ex.rot);ex.axisy=Math.cos(ex.rot)}eQ.worldCOMx=eQ.body.posx+(eQ.body.axisy*eQ.localCOMx-eQ.body.axisx*eQ.localCOMy);eQ.worldCOMy=eQ.body.posy+(eQ.localCOMx*eQ.body.axisx+eQ.localCOMy*eQ.body.axisy)}}};dB.prototype.shapesInShape=function(eb,ed,ec,ea){return null};dB.prototype.bodiesInShape=function(eb,ed,ec,ea){return null};dB.prototype.rayCast=function(ea,eb,ec){return null};dB.prototype.rayMultiCast=function(ea,ec,ed,eb){return null};dB.prototype.__class__=dB;var dz=zpp_nape.space.ZPP_AABBNode=function(){this.first_sync=false;this.synced=false;this.snext=null;this.moved=false;this.mnext=null;this.next=null;this.rayt=0;this.height=0;this.child2=null;this.child1=null;this.parent=null;this.dyn=false;this.shape=null;this.aabb=null;this.height=-1};dz.__name__=["zpp_nape","space","ZPP_AABBNode"];dz.prototype.aabb=null;dz.prototype.shape=null;dz.prototype.dyn=null;dz.prototype.parent=null;dz.prototype.child1=null;dz.prototype.child2=null;dz.prototype.height=null;dz.prototype.rayt=null;dz.prototype.next=null;dz.prototype.alloc=function(){if(bT.zpp_pool==null){this.aabb=new bT()}else{this.aabb=bT.zpp_pool;bT.zpp_pool=this.aabb.next;this.aabb.next=null}this.moved=false;this.synced=false;this.first_sync=false};dz.prototype.free=function(){this.height=-1;var ea=this.aabb;if(ea.outer!=null){ea.outer.zpp_inner=null;ea.outer=null}ea.wrap_min=ea.wrap_max=null;ea._invalidate=null;ea._validate=null;ea.next=bT.zpp_pool;bT.zpp_pool=ea;this.child1=this.child2=this.parent=null;this.next=null;this.snext=null;this.mnext=null};dz.prototype.mnext=null;dz.prototype.moved=null;dz.prototype.snext=null;dz.prototype.synced=null;dz.prototype.first_sync=null;dz.prototype.isLeaf=function(){return this.child1==null};dz.prototype.__class__=dz;var bG=zpp_nape.space.ZPP_AABBPair=function(){this.next=null;this.arb=null;this.di=0;this.id=0;this.sleeping=false;this.first=false;this.n2=null;this.n1=null};bG.__name__=["zpp_nape","space","ZPP_AABBPair"];bG.prototype.n1=null;bG.prototype.n2=null;bG.prototype.first=null;bG.prototype.sleeping=null;bG.prototype.id=null;bG.prototype.di=null;bG.prototype.arb=null;bG.prototype.next=null;bG.prototype.alloc=function(){};bG.prototype.free=function(){this.n1=this.n2=null;this.sleeping=false};bG.prototype.__class__=bG;var d=zpp_nape.space.ZPP_AABBTree=function(){this.root=null};d.__name__=["zpp_nape","space","ZPP_AABBTree"];d.prototype.root=null;d.prototype.clear=function(){if(this.root==null){return}var ea=null;this.root.next=ea;ea=this.root;while(ea!=null){var eb=ea;ea=eb.next;eb.next=null;if(eb.child1==null){eb.shape.node=null;eb.shape.removedFromSpace();eb.shape=null}else{if(eb.child1!=null){eb.child1.next=ea;ea=eb.child1}if(eb.child2!=null){eb.child2.next=ea;ea=eb.child2}}eb.height=-1;var ec=eb.aabb;if(ec.outer!=null){ec.outer.zpp_inner=null;ec.outer=null}ec.wrap_min=ec.wrap_max=null;ec._invalidate=null;ec._validate=null;ec.next=bT.zpp_pool;bT.zpp_pool=ec;eb.child1=eb.child2=eb.parent=null;eb.next=null;eb.snext=null;eb.mnext=null;eb.next=dz.zpp_pool;dz.zpp_pool=eb}this.root=null};d.prototype.insertLeaf=function(eB){if(this.root==null){this.root=eB;this.root.parent=null}else{var eC=eB.aabb;var e5=this.root;while(e5.child1!=null){var e7=e5.child1;var e6=e5.child2;var eo=e5.aabb;var ec=(eo.maxx-eo.minx+(eo.maxy-eo.miny))*2;var eM=d.tmpaabb;var eX=e5.aabb;eM.minx=eX.minxeC.maxx?eX.maxx:eC.maxx;eM.maxy=eX.maxy>eC.maxy?eX.maxy:eC.maxy;var eL=d.tmpaabb;var eD=(eL.maxx-eL.minx+(eL.maxy-eL.miny))*2;var fl=2*eD;var eb=2*(eD-ec);var eK=d.tmpaabb;var eV=e7.aabb;eK.minx=eC.minxeV.maxx?eC.maxx:eV.maxx;eK.maxy=eC.maxy>eV.maxy?eC.maxy:eV.maxy;var e3;if(e7.child1==null){var eJ=d.tmpaabb;e3=(eJ.maxx-eJ.minx+(eJ.maxy-eJ.miny))*2+eb}else{var eI=e7.aabb;var em=(eI.maxx-eI.minx+(eI.maxy-eI.miny))*2;var eH=d.tmpaabb;e3=(eH.maxx-eH.minx+(eH.maxy-eH.miny))*2-em+eb}var eG=d.tmpaabb;var fm=e6.aabb;eG.minx=eC.minxfm.maxx?eC.maxx:fm.maxx;eG.maxy=eC.maxy>fm.maxy?eC.maxy:fm.maxy;var e2;if(e6.child1==null){var eF=d.tmpaabb;e2=(eF.maxx-eF.minx+(eF.maxy-eF.miny))*2+eb}else{var eE=e6.aabb;var fn=(eE.maxx-eE.minx+(eE.maxy-eE.miny))*2;var e1=d.tmpaabb;e2=(e1.maxx-e1.minx+(e1.maxy-e1.miny))*2-fn+eb}if(flfk.maxx?eC.maxx:fk.maxx;e0.maxy=eC.maxy>fk.maxy?eC.maxy:fk.maxy;fq.height=e4.height+1;if(fb!=null){if(fb.child1==e4){fb.child1=fq}else{fb.child2=fq}fq.child1=e4;fq.child2=eB;e4.parent=fq;eB.parent=fq}else{fq.child1=e4;fq.child2=eB;e4.parent=fq;eB.parent=fq;this.root=fq}e5=eB.parent;while(e5!=null){if(e5.child1==null||e5.height<2){e5=e5}else{var fj=e5.child1;var eT=e5.child2;var fh=eT.height-fj.height;if(fh>1){var eP=eT.child1;var eO=eT.child2;eT.child1=e5;eT.parent=e5.parent;e5.parent=eT;if(eT.parent!=null){if(eT.parent.child1==e5){eT.parent.child1=eT}else{eT.parent.child2=eT}}else{this.root=eT}if(eP.height>eO.height){eT.child2=eP;e5.child2=eO;eO.parent=e5;var eZ=e5.aabb;var fx=fj.aabb;var fi=eO.aabb;eZ.minx=fx.minxfi.maxx?fx.maxx:fi.maxx;eZ.maxy=fx.maxy>fi.maxy?fx.maxy:fi.maxy;var eY=eT.aabb;var fw=e5.aabb;var fg=eP.aabb;eY.minx=fw.minxfg.maxx?fw.maxx:fg.maxx;eY.maxy=fw.maxy>fg.maxy?fw.maxy:fg.maxy;var eA=fj.height;var ez=eO.height;e5.height=1+(eA>ez?eA:ez);var ex=e5.height;var el=eP.height;eT.height=1+(ex>el?ex:el)}else{eT.child2=eO;e5.child2=eP;eP.parent=e5;var eW=e5.aabb;var fv=fj.aabb;var ff=eP.aabb;eW.minx=fv.minxff.maxx?fv.maxx:ff.maxx;eW.maxy=fv.maxy>ff.maxy?fv.maxy:ff.maxy;var eU=eT.aabb;var fu=e5.aabb;var fe=eO.aabb;eU.minx=fu.minxfe.maxx?fu.maxx:fe.maxx;eU.maxy=fu.maxy>fe.maxy?fu.maxy:fe.maxy;var ew=fj.height;var ek=eP.height;e5.height=1+(ew>ek?ew:ek);var ev=e5.height;var ej=eO.height;eT.height=1+(ev>ej?ev:ej)}e5=eT}else{if(fh<-1){var en=fj.child1;var ea=fj.child2;fj.child1=e5;fj.parent=e5.parent;e5.parent=fj;if(fj.parent!=null){if(fj.parent.child1==e5){fj.parent.child1=fj}else{fj.parent.child2=fj}}else{this.root=fj}if(en.height>ea.height){fj.child2=en;e5.child1=ea;ea.parent=e5;var eS=e5.aabb;var ft=eT.aabb;var fd=ea.aabb;eS.minx=ft.minxfd.maxx?ft.maxx:fd.maxx;eS.maxy=ft.maxy>fd.maxy?ft.maxy:fd.maxy;var eR=fj.aabb;var fs=e5.aabb;var fc=en.aabb;eR.minx=fs.minxfc.maxx?fs.maxx:fc.maxx;eR.maxy=fs.maxy>fc.maxy?fs.maxy:fc.maxy;var eu=eT.height;var ei=ea.height;e5.height=1+(eu>ei?eu:ei);var et=e5.height;var eh=en.height;fj.height=1+(et>eh?et:eh)}else{fj.child2=ea;e5.child1=en;en.parent=e5;var eQ=e5.aabb;var fr=eT.aabb;var fa=en.aabb;eQ.minx=fr.minxfa.maxx?fr.maxx:fa.maxx;eQ.maxy=fr.maxy>fa.maxy?fr.maxy:fa.maxy;var eN=fj.aabb;var fp=e5.aabb;var e9=ea.aabb;eN.minx=fp.minxe9.maxx?fp.maxx:e9.maxx;eN.maxy=fp.maxy>e9.maxy?fp.maxy:e9.maxy;var es=eT.height;var eg=en.height;e5.height=1+(es>eg?es:eg);var er=e5.height;var ef=ea.height;fj.height=1+(er>ef?er:ef)}e5=fj}else{e5=e5}}}var ep=e5.child1;var ed=e5.child2;var eq=ep.height;var ee=ed.height;e5.height=1+(eq>ee?eq:ee);var ey=e5.aabb;var fo=ep.aabb;var e8=ed.aabb;ey.minx=fo.minxe8.maxx?fo.maxx:e8.maxx;ey.maxy=fo.maxy>e8.maxy?fo.maxy:e8.maxy;e5=e5.parent}}};d.prototype.inlined_insertLeaf=function(eB){if(this.root==null){this.root=eB;this.root.parent=null}else{var eC=eB.aabb;var e5=this.root;while(e5.child1!=null){var e7=e5.child1;var e6=e5.child2;var eo=e5.aabb;var ec=(eo.maxx-eo.minx+(eo.maxy-eo.miny))*2;var eM=d.tmpaabb;var eX=e5.aabb;eM.minx=eX.minxeC.maxx?eX.maxx:eC.maxx;eM.maxy=eX.maxy>eC.maxy?eX.maxy:eC.maxy;var eL=d.tmpaabb;var eD=(eL.maxx-eL.minx+(eL.maxy-eL.miny))*2;var fl=2*eD;var eb=2*(eD-ec);var eK=d.tmpaabb;var eV=e7.aabb;eK.minx=eC.minxeV.maxx?eC.maxx:eV.maxx;eK.maxy=eC.maxy>eV.maxy?eC.maxy:eV.maxy;var e3;if(e7.child1==null){var eJ=d.tmpaabb;e3=(eJ.maxx-eJ.minx+(eJ.maxy-eJ.miny))*2+eb}else{var eI=e7.aabb;var em=(eI.maxx-eI.minx+(eI.maxy-eI.miny))*2;var eH=d.tmpaabb;e3=(eH.maxx-eH.minx+(eH.maxy-eH.miny))*2-em+eb}var eG=d.tmpaabb;var fm=e6.aabb;eG.minx=eC.minxfm.maxx?eC.maxx:fm.maxx;eG.maxy=eC.maxy>fm.maxy?eC.maxy:fm.maxy;var e2;if(e6.child1==null){var eF=d.tmpaabb;e2=(eF.maxx-eF.minx+(eF.maxy-eF.miny))*2+eb}else{var eE=e6.aabb;var fn=(eE.maxx-eE.minx+(eE.maxy-eE.miny))*2;var e1=d.tmpaabb;e2=(e1.maxx-e1.minx+(e1.maxy-e1.miny))*2-fn+eb}if(flfk.maxx?eC.maxx:fk.maxx;e0.maxy=eC.maxy>fk.maxy?eC.maxy:fk.maxy;fq.height=e4.height+1;if(fb!=null){if(fb.child1==e4){fb.child1=fq}else{fb.child2=fq}fq.child1=e4;fq.child2=eB;e4.parent=fq;eB.parent=fq}else{fq.child1=e4;fq.child2=eB;e4.parent=fq;eB.parent=fq;this.root=fq}e5=eB.parent;while(e5!=null){if(e5.child1==null||e5.height<2){e5=e5}else{var fj=e5.child1;var eT=e5.child2;var fh=eT.height-fj.height;if(fh>1){var eP=eT.child1;var eO=eT.child2;eT.child1=e5;eT.parent=e5.parent;e5.parent=eT;if(eT.parent!=null){if(eT.parent.child1==e5){eT.parent.child1=eT}else{eT.parent.child2=eT}}else{this.root=eT}if(eP.height>eO.height){eT.child2=eP;e5.child2=eO;eO.parent=e5;var eZ=e5.aabb;var fx=fj.aabb;var fi=eO.aabb;eZ.minx=fx.minxfi.maxx?fx.maxx:fi.maxx;eZ.maxy=fx.maxy>fi.maxy?fx.maxy:fi.maxy;var eY=eT.aabb;var fw=e5.aabb;var fg=eP.aabb;eY.minx=fw.minxfg.maxx?fw.maxx:fg.maxx;eY.maxy=fw.maxy>fg.maxy?fw.maxy:fg.maxy;var eA=fj.height;var ez=eO.height;e5.height=1+(eA>ez?eA:ez);var ex=e5.height;var el=eP.height;eT.height=1+(ex>el?ex:el)}else{eT.child2=eO;e5.child2=eP;eP.parent=e5;var eW=e5.aabb;var fv=fj.aabb;var ff=eP.aabb;eW.minx=fv.minxff.maxx?fv.maxx:ff.maxx;eW.maxy=fv.maxy>ff.maxy?fv.maxy:ff.maxy;var eU=eT.aabb;var fu=e5.aabb;var fe=eO.aabb;eU.minx=fu.minxfe.maxx?fu.maxx:fe.maxx;eU.maxy=fu.maxy>fe.maxy?fu.maxy:fe.maxy;var ew=fj.height;var ek=eP.height;e5.height=1+(ew>ek?ew:ek);var ev=e5.height;var ej=eO.height;eT.height=1+(ev>ej?ev:ej)}e5=eT}else{if(fh<-1){var en=fj.child1;var ea=fj.child2;fj.child1=e5;fj.parent=e5.parent;e5.parent=fj;if(fj.parent!=null){if(fj.parent.child1==e5){fj.parent.child1=fj}else{fj.parent.child2=fj}}else{this.root=fj}if(en.height>ea.height){fj.child2=en;e5.child1=ea;ea.parent=e5;var eS=e5.aabb;var ft=eT.aabb;var fd=ea.aabb;eS.minx=ft.minxfd.maxx?ft.maxx:fd.maxx;eS.maxy=ft.maxy>fd.maxy?ft.maxy:fd.maxy;var eR=fj.aabb;var fs=e5.aabb;var fc=en.aabb;eR.minx=fs.minxfc.maxx?fs.maxx:fc.maxx;eR.maxy=fs.maxy>fc.maxy?fs.maxy:fc.maxy;var eu=eT.height;var ei=ea.height;e5.height=1+(eu>ei?eu:ei);var et=e5.height;var eh=en.height;fj.height=1+(et>eh?et:eh)}else{fj.child2=ea;e5.child1=en;en.parent=e5;var eQ=e5.aabb;var fr=eT.aabb;var fa=en.aabb;eQ.minx=fr.minxfa.maxx?fr.maxx:fa.maxx;eQ.maxy=fr.maxy>fa.maxy?fr.maxy:fa.maxy;var eN=fj.aabb;var fp=e5.aabb;var e9=ea.aabb;eN.minx=fp.minxe9.maxx?fp.maxx:e9.maxx;eN.maxy=fp.maxy>e9.maxy?fp.maxy:e9.maxy;var es=eT.height;var eg=en.height;e5.height=1+(es>eg?es:eg);var er=e5.height;var ef=ea.height;fj.height=1+(er>ef?er:ef)}e5=fj}else{e5=e5}}}var ep=e5.child1;var ed=e5.child2;var eq=ep.height;var ee=ed.height;e5.height=1+(eq>ee?eq:ee);var ey=e5.aabb;var fo=ep.aabb;var e8=ed.aabb;ey.minx=fo.minxe8.maxx?fo.maxx:e8.maxx;ey.maxy=fo.maxy>e8.maxy?fo.maxy:e8.maxy;e5=e5.parent}}};d.prototype.removeLeaf=function(eW){if(eW==this.root){this.root=null}else{var ee=eW.parent;var ey=ee.parent;var eT=ee.child1==eW?ee.child2:ee.child1;if(ey!=null){if(ey.child1==ee){ey.child1=eT}else{ey.child2=eT}eT.parent=ey;ee.height=-1;var eS=ee.aabb;if(eS.outer!=null){eS.outer.zpp_inner=null;eS.outer=null}eS.wrap_min=eS.wrap_max=null;eS._invalidate=null;eS._validate=null;eS.next=bT.zpp_pool;bT.zpp_pool=eS;ee.child1=ee.child2=ee.parent=null;ee.next=null;ee.snext=null;ee.mnext=null;ee.next=dz.zpp_pool;dz.zpp_pool=ee;var ez=ey;while(ez!=null){if(ez.child1==null||ez.height<2){ez=ez}else{var e4=ez.child1;var e2=ez.child2;var es=e2.height-e4.height;if(es>1){var eY=e2.child1;var eV=e2.child2;e2.child1=ez;e2.parent=ez.parent;ez.parent=e2;if(e2.parent!=null){if(e2.parent.child1==ez){e2.parent.child1=e2}else{e2.parent.child2=e2}}else{this.root=e2}if(eY.height>eV.height){e2.child2=eY;ez.child2=eV;eV.parent=ez;var ec=ez.aabb;var e5=e4.aabb;var ex=eV.aabb;ec.minx=e5.minxex.maxx?e5.maxx:ex.maxx;ec.maxy=e5.maxy>ex.maxy?e5.maxy:ex.maxy;var eM=e2.aabb;var eR=ez.aabb;var ew=eY.aabb;eM.minx=eR.minxew.maxx?eR.maxx:ew.maxx;eM.maxy=eR.maxy>ew.maxy?eR.maxy:ew.maxy;var eF=e4.height;var eD=eV.height;ez.height=1+(eF>eD?eF:eD);var en=ez.height;var e8=eY.height;e2.height=1+(en>e8?en:e8)}else{e2.child2=eV;ez.child2=eY;eY.parent=ez;var eK=ez.aabb;var eQ=e4.aabb;var ev=eY.aabb;eK.minx=eQ.minxev.maxx?eQ.maxx:ev.maxx;eK.maxy=eQ.maxy>ev.maxy?eQ.maxy:ev.maxy;var eI=e2.aabb;var eP=ez.aabb;var eu=eV.aabb;eI.minx=eP.minxeu.maxx?eP.maxx:eu.maxx;eI.maxy=eP.maxy>eu.maxy?eP.maxy:eu.maxy;var em=e4.height;var e7=eY.height;ez.height=1+(em>e7?em:e7);var el=ez.height;var e6=eV.height;e2.height=1+(el>e6?el:e6)}ez=e2}else{if(es<-1){var ed=e4.child1;var eU=e4.child2;e4.child1=ez;e4.parent=ez.parent;ez.parent=e4;if(e4.parent!=null){if(e4.parent.child1==ez){e4.parent.child1=e4}else{e4.parent.child2=e4}}else{this.root=e4}if(ed.height>eU.height){e4.child2=ed;ez.child1=eU;eU.parent=ez;var eG=ez.aabb;var eO=e2.aabb;var et=eU.aabb;eG.minx=eO.minxet.maxx?eO.maxx:et.maxx;eG.maxy=eO.maxy>et.maxy?eO.maxy:et.maxy;var eE=e4.aabb;var eN=ez.aabb;var er=ed.aabb;eE.minx=eN.minxer.maxx?eN.maxx:er.maxx;eE.maxy=eN.maxy>er.maxy?eN.maxy:er.maxy;var ek=e2.height;var e3=eU.height;ez.height=1+(ek>e3?ek:e3);var ej=ez.height;var e1=ed.height;e4.height=1+(ej>e1?ej:e1)}else{e4.child2=eU;ez.child1=ed;ed.parent=ez;var eC=ez.aabb;var eL=e2.aabb;var eq=ed.aabb;eC.minx=eL.minxeq.maxx?eL.maxx:eq.maxx;eC.maxy=eL.maxy>eq.maxy?eL.maxy:eq.maxy;var eB=e4.aabb;var eJ=ez.aabb;var ep=eU.aabb;eB.minx=eJ.minxep.maxx?eJ.maxx:ep.maxx;eB.maxy=eJ.maxy>ep.maxy?eJ.maxy:ep.maxy;var ei=e2.height;var e0=ed.height;ez.height=1+(ei>e0?ei:e0);var eh=ez.height;var eZ=eU.height;e4.height=1+(eh>eZ?eh:eZ)}ez=e4}else{ez=ez}}}var eb=ez.child1;var ea=ez.child2;var eA=ez.aabb;var eH=eb.aabb;var eo=ea.aabb;eA.minx=eH.minxeo.maxx?eH.maxx:eo.maxx;eA.maxy=eH.maxy>eo.maxy?eH.maxy:eo.maxy;var ef=eb.height;var eX=ea.height;ez.height=1+(ef>eX?ef:eX);ez=ez.parent}}else{this.root=eT;eT.parent=null;ee.height=-1;var eg=ee.aabb;if(eg.outer!=null){eg.outer.zpp_inner=null;eg.outer=null}eg.wrap_min=eg.wrap_max=null;eg._invalidate=null;eg._validate=null;eg.next=bT.zpp_pool;bT.zpp_pool=eg;ee.child1=ee.child2=ee.parent=null;ee.next=null;ee.snext=null;ee.mnext=null;ee.next=dz.zpp_pool;dz.zpp_pool=ee}}};d.prototype.inlined_removeLeaf=function(eW){if(eW==this.root){this.root=null;return}else{var ee=eW.parent;var ey=ee.parent;var eT=ee.child1==eW?ee.child2:ee.child1;if(ey!=null){if(ey.child1==ee){ey.child1=eT}else{ey.child2=eT}eT.parent=ey;ee.height=-1;var eS=ee.aabb;if(eS.outer!=null){eS.outer.zpp_inner=null;eS.outer=null}eS.wrap_min=eS.wrap_max=null;eS._invalidate=null;eS._validate=null;eS.next=bT.zpp_pool;bT.zpp_pool=eS;ee.child1=ee.child2=ee.parent=null;ee.next=null;ee.snext=null;ee.mnext=null;ee.next=dz.zpp_pool;dz.zpp_pool=ee;var ez=ey;while(ez!=null){if(ez.child1==null||ez.height<2){ez=ez}else{var e4=ez.child1;var e2=ez.child2;var es=e2.height-e4.height;if(es>1){var eY=e2.child1;var eV=e2.child2;e2.child1=ez;e2.parent=ez.parent;ez.parent=e2;if(e2.parent!=null){if(e2.parent.child1==ez){e2.parent.child1=e2}else{e2.parent.child2=e2}}else{this.root=e2}if(eY.height>eV.height){e2.child2=eY;ez.child2=eV;eV.parent=ez;var ec=ez.aabb;var e5=e4.aabb;var ex=eV.aabb;ec.minx=e5.minxex.maxx?e5.maxx:ex.maxx;ec.maxy=e5.maxy>ex.maxy?e5.maxy:ex.maxy;var eM=e2.aabb;var eR=ez.aabb;var ew=eY.aabb;eM.minx=eR.minxew.maxx?eR.maxx:ew.maxx;eM.maxy=eR.maxy>ew.maxy?eR.maxy:ew.maxy;var eF=e4.height;var eD=eV.height;ez.height=1+(eF>eD?eF:eD);var en=ez.height;var e8=eY.height;e2.height=1+(en>e8?en:e8)}else{e2.child2=eV;ez.child2=eY;eY.parent=ez;var eK=ez.aabb;var eQ=e4.aabb;var ev=eY.aabb;eK.minx=eQ.minxev.maxx?eQ.maxx:ev.maxx;eK.maxy=eQ.maxy>ev.maxy?eQ.maxy:ev.maxy;var eI=e2.aabb;var eP=ez.aabb;var eu=eV.aabb;eI.minx=eP.minxeu.maxx?eP.maxx:eu.maxx;eI.maxy=eP.maxy>eu.maxy?eP.maxy:eu.maxy;var em=e4.height;var e7=eY.height;ez.height=1+(em>e7?em:e7);var el=ez.height;var e6=eV.height;e2.height=1+(el>e6?el:e6)}ez=e2}else{if(es<-1){var ed=e4.child1;var eU=e4.child2;e4.child1=ez;e4.parent=ez.parent;ez.parent=e4;if(e4.parent!=null){if(e4.parent.child1==ez){e4.parent.child1=e4}else{e4.parent.child2=e4}}else{this.root=e4}if(ed.height>eU.height){e4.child2=ed;ez.child1=eU;eU.parent=ez;var eG=ez.aabb;var eO=e2.aabb;var et=eU.aabb;eG.minx=eO.minxet.maxx?eO.maxx:et.maxx;eG.maxy=eO.maxy>et.maxy?eO.maxy:et.maxy;var eE=e4.aabb;var eN=ez.aabb;var er=ed.aabb;eE.minx=eN.minxer.maxx?eN.maxx:er.maxx;eE.maxy=eN.maxy>er.maxy?eN.maxy:er.maxy;var ek=e2.height;var e3=eU.height;ez.height=1+(ek>e3?ek:e3);var ej=ez.height;var e1=ed.height;e4.height=1+(ej>e1?ej:e1)}else{e4.child2=eU;ez.child1=ed;ed.parent=ez;var eC=ez.aabb;var eL=e2.aabb;var eq=ed.aabb;eC.minx=eL.minxeq.maxx?eL.maxx:eq.maxx;eC.maxy=eL.maxy>eq.maxy?eL.maxy:eq.maxy;var eB=e4.aabb;var eJ=ez.aabb;var ep=eU.aabb;eB.minx=eJ.minxep.maxx?eJ.maxx:ep.maxx;eB.maxy=eJ.maxy>ep.maxy?eJ.maxy:ep.maxy;var ei=e2.height;var e0=ed.height;ez.height=1+(ei>e0?ei:e0);var eh=ez.height;var eZ=eU.height;e4.height=1+(eh>eZ?eh:eZ)}ez=e4}else{ez=ez}}}var eb=ez.child1;var ea=ez.child2;var eA=ez.aabb;var eH=eb.aabb;var eo=ea.aabb;eA.minx=eH.minxeo.maxx?eH.maxx:eo.maxx;eA.maxy=eH.maxy>eo.maxy?eH.maxy:eo.maxy;var ef=eb.height;var eX=ea.height;ez.height=1+(ef>eX?ef:eX);ez=ez.parent}}else{this.root=eT;eT.parent=null;ee.height=-1;var eg=ee.aabb;if(eg.outer!=null){eg.outer.zpp_inner=null;eg.outer=null}eg.wrap_min=eg.wrap_max=null;eg._invalidate=null;eg._validate=null;eg.next=bT.zpp_pool;bT.zpp_pool=eg;ee.child1=ee.child2=ee.parent=null;ee.next=null;ee.snext=null;ee.mnext=null;ee.next=dz.zpp_pool;dz.zpp_pool=ee}}};d.prototype.balance=function(eS){if(eS.child1==null||eS.height<2){return eS}else{var eR=eS.child1;var eP=eS.child2;var em=eP.height-eR.height;if(em>1){var eL=eP.child1;var eK=eP.child2;eP.child1=eS;eP.parent=eS.parent;eS.parent=eP;if(eP.parent!=null){if(eP.parent.child1==eS){eP.parent.child1=eP}else{eP.parent.child2=eP}}else{this.root=eP}if(eL.height>eK.height){eP.child2=eL;eS.child2=eK;eK.parent=eS;var ea=eS.aabb;var eI=eR.aabb;var er=eK.aabb;ea.minx=eI.minxer.maxx?eI.maxx:er.maxx;ea.maxy=eI.maxy>er.maxy?eI.maxy:er.maxy;var eD=eP.aabb;var eH=eS.aabb;var eq=eL.aabb;eD.minx=eH.minxeq.maxx?eH.maxx:eq.maxx;eD.maxy=eH.maxy>eq.maxy?eH.maxy:eq.maxy;var ew=eR.height;var eu=eK.height;eS.height=1+(ew>eu?ew:eu);var ei=eS.height;var eV=eL.height;eP.height=1+(ei>eV?ei:eV)}else{eP.child2=eK;eS.child2=eL;eL.parent=eS;var eB=eS.aabb;var eG=eR.aabb;var ep=eL.aabb;eB.minx=eG.minxep.maxx?eG.maxx:ep.maxx;eB.maxy=eG.maxy>ep.maxy?eG.maxy:ep.maxy;var ez=eP.aabb;var eF=eS.aabb;var eo=eK.aabb;ez.minx=eF.minxeo.maxx?eF.maxx:eo.maxx;ez.maxy=eF.maxy>eo.maxy?eF.maxy:eo.maxy;var eh=eR.height;var eU=eL.height;eS.height=1+(eh>eU?eh:eU);var eg=eS.height;var eT=eK.height;eP.height=1+(eg>eT?eg:eT)}return eP}else{if(em<-1){var eb=eR.child1;var eJ=eR.child2;eR.child1=eS;eR.parent=eS.parent;eS.parent=eR;if(eR.parent!=null){if(eR.parent.child1==eS){eR.parent.child1=eR}else{eR.parent.child2=eR}}else{this.root=eR}if(eb.height>eJ.height){eR.child2=eb;eS.child1=eJ;eJ.parent=eS;var ex=eS.aabb;var eE=eP.aabb;var en=eJ.aabb;ex.minx=eE.minxen.maxx?eE.maxx:en.maxx;ex.maxy=eE.maxy>en.maxy?eE.maxy:en.maxy;var ev=eR.aabb;var eC=eS.aabb;var el=eb.aabb;ev.minx=eC.minxel.maxx?eC.maxx:el.maxx;ev.maxy=eC.maxy>el.maxy?eC.maxy:el.maxy;var ef=eP.height;var eQ=eJ.height;eS.height=1+(ef>eQ?ef:eQ);var ee=eS.height;var eO=eb.height;eR.height=1+(ee>eO?ee:eO)}else{eR.child2=eJ;eS.child1=eb;eb.parent=eS;var et=eS.aabb;var eA=eP.aabb;var ek=eb.aabb;et.minx=eA.minxek.maxx?eA.maxx:ek.maxx;et.maxy=eA.maxy>ek.maxy?eA.maxy:ek.maxy;var es=eR.aabb;var ey=eS.aabb;var ej=eJ.aabb;es.minx=ey.minxej.maxx?ey.maxx:ej.maxx;es.maxy=ey.maxy>ej.maxy?ey.maxy:ej.maxy;var ed=eP.height;var eN=eb.height;eS.height=1+(ed>eN?ed:eN);var ec=eS.height;var eM=eJ.height;eR.height=1+(ec>eM?ec:eM)}return eR}else{return eS}}}};d.prototype.__class__=d;var cT=zpp_nape.space.ZPP_DynAABBPhase=function(ea){this.openlist=null;this.failed=null;this.treeStack2=null;this.treeStack=null;this.moves=null;this.syncs=null;this.pairs=null;this.dtree=null;this.stree=null;dB.call(this);this.space=ea;this.is_sweep=false;this.dynab=this;this.stree=new d();this.dtree=new d()};cT.__name__=["zpp_nape","space","ZPP_DynAABBPhase"];cT.__super__=dB;cT.prototype=Object.create(dB.prototype);cT.prototype.stree=null;cT.prototype.dtree=null;cT.prototype.pairs=null;cT.prototype.syncs=null;cT.prototype.moves=null;cT.prototype.dyn=function(ea){if(ea.body.type==1){return false}else{return !ea.body.component.sleeping}};cT.prototype.__insert=function(ea){var eb;if(dz.zpp_pool==null){eb=new dz()}else{eb=dz.zpp_pool;dz.zpp_pool=eb.next;eb.next=null}if(bT.zpp_pool==null){eb.aabb=new bT()}else{eb.aabb=bT.zpp_pool;bT.zpp_pool=eb.aabb.next;eb.aabb.next=null}eb.moved=false;eb.synced=false;eb.first_sync=false;eb.shape=ea;ea.node=eb;eb.synced=true;eb.first_sync=true;eb.snext=this.syncs;this.syncs=eb};cT.prototype.__remove=function(eh){var ee=eh.node;if(!ee.first_sync){if(ee.dyn){this.dtree.removeLeaf(ee)}else{this.stree.removeLeaf(ee)}}eh.node=null;if(ee.synced){var eg=null;var el=this.syncs;while(el!=null){if(el==ee){break}eg=el;el=el.snext}if(eg==null){this.syncs=el.snext}else{eg.snext=el.snext}el.snext=null;ee.synced=false}if(ee.moved){var ef=null;var ek=this.moves;while(ek!=null){if(ek==ee){break}ef=ek;ek=ek.mnext}if(ef==null){this.moves=ek.mnext}else{ef.mnext=ek.mnext}ek.mnext=null;ee.moved=false}var ed=null;var ej=this.pairs;while(ej!=null){var ea=ej.next;if(ej.n1==ee||ej.n2==ee){if(ed==null){this.pairs=ea}else{ed.next=ea}if(ej.arb!=null){ej.arb.pair=null}ej.arb=null;ej.n1.shape.pairs.remove(ej);ej.n2.shape.pairs.remove(ej);var eb=ej;eb.n1=eb.n2=null;eb.sleeping=false;eb.next=bG.zpp_pool;bG.zpp_pool=eb;ej=ea;continue}ed=ej;ej=ea}while(eh.pairs.head!=null){var ei=eh.pairs.pop_unsafe();if(ei.n1==ee){ei.n2.shape.pairs.remove(ei)}else{ei.n1.shape.pairs.remove(ei)}if(ei.arb!=null){ei.arb.pair=null}ei.arb=null;ei.n1=ei.n2=null;ei.sleeping=false;ei.next=bG.zpp_pool;bG.zpp_pool=ei}ee.height=-1;var ec=ee.aabb;if(ec.outer!=null){ec.outer.zpp_inner=null;ec.outer=null}ec.wrap_min=ec.wrap_max=null;ec._invalidate=null;ec._validate=null;ec.next=bT.zpp_pool;bT.zpp_pool=ec;ee.child1=ee.child2=ee.parent=null;ee.next=null;ee.snext=null;ee.mnext=null;ee.next=dz.zpp_pool;dz.zpp_pool=ee};cT.prototype.__sync=function(ea){var et=ea.node;if(!et.synced){if(!this.space.continuous){if(ea.zip_aabb){if(ea.body!=null){ea.zip_aabb=false;if(ea.type==0){var ew=ea.circle;if(ew.zip_worldCOM){if(ew.body!=null){ew.zip_worldCOM=false;if(ew.zip_localCOM){ew.zip_localCOM=false;if(ew.type==1){var eC=ew.polygon;if(eC.lverts.next.next==null){eC.localCOMx=eC.lverts.next.x;eC.localCOMy=eC.lverts.next.y}else{if(eC.lverts.next.next.next==null){eC.localCOMx=eC.lverts.next.x;eC.localCOMy=eC.lverts.next.y;eC.localCOMx+=eC.lverts.next.next.x;eC.localCOMy+=eC.lverts.next.next.y;eC.localCOMx*=0.5;eC.localCOMy*=0.5}else{eC.localCOMx=0;eC.localCOMy=0;var eD=0;var ev=eC.lverts.next;var em=ev;ev=ev.next;var el=ev;ev=ev.next;while(ev!=null){var ej=ev;eD+=el.x*(ej.y-em.y);var ep=ej.y*el.x-ej.x*el.y;eC.localCOMx+=(el.x+ej.x)*ep;eC.localCOMy+=(el.y+ej.y)*ep;em=el;el=ej;ev=ev.next}ev=eC.lverts.next;var ek=ev;eD+=el.x*(ek.y-em.y);var eh=ek.y*el.x-ek.x*el.y;eC.localCOMx+=(el.x+ek.x)*eh;eC.localCOMy+=(el.y+ek.y)*eh;em=el;ev=ev.next;var ei=ev;eD+=ek.x*(ei.y-em.y);var ef=ei.y*ek.x-ei.x*ek.y;eC.localCOMx+=(ek.x+ei.x)*ef;eC.localCOMy+=(ek.y+ei.y)*ef;eD=1/(3*eD);var eo=eD;eC.localCOMx*=eo;eC.localCOMy*=eo}}}if(ew.wrap_localCOM!=null){ew.wrap_localCOM.zpp_inner.x=ew.localCOMx;ew.wrap_localCOM.zpp_inner.y=ew.localCOMy}}var eB=ew.body;if(eB.zip_axis){eB.zip_axis=false;eB.axisx=Math.sin(eB.rot);eB.axisy=Math.cos(eB.rot)}ew.worldCOMx=ew.body.posx+(ew.body.axisy*ew.localCOMx-ew.body.axisx*ew.localCOMy);ew.worldCOMy=ew.body.posy+(ew.localCOMx*ew.body.axisx+ew.localCOMy*ew.body.axisy)}}var ed=ew.radius;var ec=ew.radius;ew.aabb.minx=ew.worldCOMx-ed;ew.aabb.miny=ew.worldCOMy-ec;ew.aabb.maxx=ew.worldCOMx+ed;ew.aabb.maxy=ew.worldCOMy+ec}else{var ez=ea.polygon;if(ez.zip_gverts){if(ez.body!=null){ez.zip_gverts=false;ez.validate_lverts();var ey=ez.body;if(ey.zip_axis){ey.zip_axis=false;ey.axisx=Math.sin(ey.rot);ey.axisy=Math.cos(ey.rot)}var en=ez.lverts.next;var es=ez.gverts.next;while(es!=null){var eA=es;var eu=en;en=en.next;eA.x=ez.body.posx+(ez.body.axisy*eu.x-ez.body.axisx*eu.y);eA.y=ez.body.posy+(eu.x*ez.body.axisx+eu.y*ez.body.axisy);es=es.next}}}var eb=ez.gverts.next;ez.aabb.minx=eb.x;ez.aabb.miny=eb.y;ez.aabb.maxx=eb.x;ez.aabb.maxy=eb.y;var er=ez.gverts.next.next;while(er!=null){var eq=er;if(eq.xez.aabb.maxx){ez.aabb.maxx=eq.x}if(eq.yez.aabb.maxy){ez.aabb.maxy=eq.y}er=er.next}}}}}var ee;if(et.dyn==(ea.body.type==1?false:!ea.body.component.sleeping)){var ex=et.aabb;var eg=ea.aabb;ee=!(eg.minx>=ex.minx&&eg.miny>=ex.miny&&eg.maxx<=ex.maxx&&eg.maxy<=ex.maxy)}else{ee=true}if(ee){et.synced=true;et.snext=this.syncs;this.syncs=et}}};cT.prototype.sync_broadphase=function(){this.space.validation();if(this.syncs!=null){if(this.moves==null){var fF=this.syncs;while(fF!=null){var hG=fF.shape;if(!fF.first_sync){var hF=fF.dyn?this.dtree:this.stree;if(fF==hF.root){hF.root=null}else{var i5=fF.parent;var jT=i5.parent;var fC=i5.child1==fF?i5.child2:i5.child1;if(jT!=null){if(jT.child1==i5){jT.child1=fC}else{jT.child2=fC}fC.parent=jT;i5.height=-1;var jF=i5.aabb;if(jF.outer!=null){jF.outer.zpp_inner=null;jF.outer=null}jF.wrap_min=jF.wrap_max=null;jF._invalidate=null;jF._validate=null;jF.next=bT.zpp_pool;bT.zpp_pool=jF;i5.child1=i5.child2=i5.parent=null;i5.next=null;i5.snext=null;i5.mnext=null;i5.next=dz.zpp_pool;dz.zpp_pool=i5;var i1=jT;while(i1!=null){if(i1.child1==null||i1.height<2){i1=i1}else{var jL=i1.child1;var jK=i1.child2;var jO=jK.height-jL.height;if(jO>1){var jJ=jK.child1;var jH=jK.child2;jK.child1=i1;jK.parent=i1.parent;i1.parent=jK;if(jK.parent!=null){if(jK.parent.child1==i1){jK.parent.child1=jK}else{jK.parent.child2=jK}}else{hF.root=jK}if(jJ.height>jH.height){jK.child2=jJ;i1.child2=jH;jH.parent=i1;var fx=i1.aabb;var jN=jL.aabb;var j9=jH.aabb;fx.minx=jN.minxj9.maxx?jN.maxx:j9.maxx;fx.maxy=jN.maxy>j9.maxy?jN.maxy:j9.maxy;var eG=jK.aabb;var ei=i1.aabb;var j7=jJ.aabb;eG.minx=ei.minxj7.maxx?ei.maxx:j7.maxx;eG.maxy=ei.maxy>j7.maxy?ei.maxy:j7.maxy;var jz=jL.height;var jy=jH.height;i1.height=1+(jz>jy?jz:jy);var eX=i1.height;var ev=jJ.height;jK.height=1+(eX>ev?eX:ev)}else{jK.child2=jH;i1.child2=jJ;jJ.parent=i1;var eF=i1.aabb;var eh=jL.aabb;var j4=jJ.aabb;eF.minx=eh.minxj4.maxx?eh.maxx:j4.maxx;eF.maxy=eh.maxy>j4.maxy?eh.maxy:j4.maxy;var eE=jK.aabb;var eg=i1.aabb;var j3=jH.aabb;eE.minx=eg.minxj3.maxx?eg.maxx:j3.maxx;eE.maxy=eg.maxy>j3.maxy?eg.maxy:j3.maxy;var eV=jL.height;var et=jJ.height;i1.height=1+(eV>et?eV:et);var eT=i1.height;var er=jH.height;jK.height=1+(eT>er?eT:er)}i1=jK}else{if(jO<-1){var jw=jL.child1;var jm=jL.child2;jL.child1=i1;jL.parent=i1.parent;i1.parent=jL;if(jL.parent!=null){if(jL.parent.child1==i1){jL.parent.child1=jL}else{jL.parent.child2=jL}}else{hF.root=jL}if(jw.height>jm.height){jL.child2=jw;i1.child1=jm;jm.parent=i1;var eD=i1.aabb;var ef=jK.aabb;var j2=jm.aabb;eD.minx=ef.minxj2.maxx?ef.maxx:j2.maxx;eD.maxy=ef.maxy>j2.maxy?ef.maxy:j2.maxy;var eC=jL.aabb;var ee=i1.aabb;var j1=jw.aabb;eC.minx=ee.minxj1.maxx?ee.maxx:j1.maxx;eC.maxy=ee.maxy>j1.maxy?ee.maxy:j1.maxy;var eR=jK.height;var ep=jm.height;i1.height=1+(eR>ep?eR:ep);var eP=i1.height;var en=jw.height;jL.height=1+(eP>en?eP:en)}else{jL.child2=jm;i1.child1=jw;jw.parent=i1;var eB=i1.aabb;var ed=jK.aabb;var j0=jw.aabb;eB.minx=ed.minxj0.maxx?ed.maxx:j0.maxx;eB.maxy=ed.maxy>j0.maxy?ed.maxy:j0.maxy;var eA=jL.aabb;var ec=i1.aabb;var jZ=jm.aabb;eA.minx=ec.minxjZ.maxx?ec.maxx:jZ.maxx;eA.maxy=ec.maxy>jZ.maxy?ec.maxy:jZ.maxy;var eN=jK.height;var em=jw.height;i1.height=1+(eN>em?eN:em);var eL=i1.height;var el=jm.height;jL.height=1+(eL>el?eL:el)}i1=jL}else{i1=i1}}}var gv=i1.child1;var gs=i1.child2;var ez=i1.aabb;var eb=gv.aabb;var jY=gs.aabb;ez.minx=eb.minxjY.maxx?eb.maxx:jY.maxx;ez.maxy=eb.maxy>jY.maxy?eb.maxy:jY.maxy;var eJ=gv.height;var ek=gs.height;i1.height=1+(eJ>ek?eJ:ek);i1=i1.parent}}else{hF.root=fC;fC.parent=null;i5.height=-1;var ie=i5.aabb;if(ie.outer!=null){ie.outer.zpp_inner=null;ie.outer=null}ie.wrap_min=ie.wrap_max=null;ie._invalidate=null;ie._validate=null;ie.next=bT.zpp_pool;bT.zpp_pool=ie;i5.child1=i5.child2=i5.parent=null;i5.next=null;i5.snext=null;i5.mnext=null;i5.next=dz.zpp_pool;dz.zpp_pool=i5}}}else{fF.first_sync=false}var jp=fF.aabb;if(!this.space.continuous){if(hG.zip_aabb){if(hG.body!=null){hG.zip_aabb=false;if(hG.type==0){var ey=hG.circle;if(ey.zip_worldCOM){if(ey.body!=null){ey.zip_worldCOM=false;if(ey.zip_localCOM){ey.zip_localCOM=false;if(ey.type==1){var ir=ey.polygon;if(ir.lverts.next.next==null){ir.localCOMx=ir.lverts.next.x;ir.localCOMy=ir.lverts.next.y}else{if(ir.lverts.next.next.next==null){ir.localCOMx=ir.lverts.next.x;ir.localCOMy=ir.lverts.next.y;ir.localCOMx+=ir.lverts.next.next.x;ir.localCOMy+=ir.lverts.next.next.y;ir.localCOMx*=0.5;ir.localCOMy*=0.5}else{ir.localCOMx=0;ir.localCOMy=0;var ht=0;var i6=ir.lverts.next;var jC=i6;i6=i6.next;var jB=i6;i6=i6.next;while(i6!=null){var jA=i6;ht+=jB.x*(jA.y-jC.y);var jI=jA.y*jB.x-jA.x*jB.y;ir.localCOMx+=(jB.x+jA.x)*jI;ir.localCOMy+=(jB.y+jA.y)*jI;jC=jB;jB=jA;i6=i6.next}i6=ir.lverts.next;var fc=i6;ht+=jB.x*(fc.y-jC.y);var jn=fc.y*jB.x-fc.x*jB.y;ir.localCOMx+=(jB.x+fc.x)*jn;ir.localCOMy+=(jB.y+fc.y)*jn;jC=jB;i6=i6.next;var fa=i6;ht+=fc.x*(fa.y-jC.y);var jl=fa.y*fc.x-fa.x*fc.y;ir.localCOMx+=(fc.x+fa.x)*jl;ir.localCOMy+=(fc.y+fa.y)*jl;ht=1/(3*ht);var jD=ht;ir.localCOMx*=jD;ir.localCOMy*=jD}}}if(ey.wrap_localCOM!=null){ey.wrap_localCOM.zpp_inner.x=ey.localCOMx;ey.wrap_localCOM.zpp_inner.y=ey.localCOMy}}var iq=ey.body;if(iq.zip_axis){iq.zip_axis=false;iq.axisx=Math.sin(iq.rot);iq.axisy=Math.cos(iq.rot)}ey.worldCOMx=ey.body.posx+(ey.body.axisy*ey.localCOMx-ey.body.axisx*ey.localCOMy);ey.worldCOMy=ey.body.posy+(ey.localCOMx*ey.body.axisx+ey.localCOMy*ey.body.axisy)}}var fD=ey.radius;var fB=ey.radius;ey.aabb.minx=ey.worldCOMx-fD;ey.aabb.miny=ey.worldCOMy-fB;ey.aabb.maxx=ey.worldCOMx+fD;ey.aabb.maxy=ey.worldCOMy+fB}else{var ip=hG.polygon;if(ip.zip_gverts){if(ip.body!=null){ip.zip_gverts=false;ip.validate_lverts();var io=ip.body;if(io.zip_axis){io.zip_axis=false;io.axisx=Math.sin(io.rot);io.axisy=Math.cos(io.rot)}var it=ip.lverts.next;var fn=ip.gverts.next;while(fn!=null){var jk=fn;var jG=it;it=it.next;jk.x=ip.body.posx+(ip.body.axisy*jG.x-ip.body.axisx*jG.y);jk.y=ip.body.posy+(jG.x*ip.body.axisx+jG.y*ip.body.axisy);fn=fn.next}}}var hK=ip.gverts.next;ip.aabb.minx=hK.x;ip.aabb.miny=hK.y;ip.aabb.maxx=hK.x;ip.aabb.maxy=hK.y;var fl=ip.gverts.next.next;while(fl!=null){var jE=fl;if(jE.xip.aabb.maxx){ip.aabb.maxx=jE.x}if(jE.yip.aabb.maxy){ip.aabb.maxy=jE.y}fl=fl.next}}}}}var ea=hG.aabb;jp.minx=ea.minx-3;jp.miny=ea.miny-3;jp.maxx=ea.maxx+3;jp.maxy=ea.maxy+3;var hY=(fF.dyn=hG.body.type==1?false:!hG.body.component.sleeping)?this.dtree:this.stree;if(hY.root==null){hY.root=fF;hY.root.parent=null}else{var jx=fF.aabb;var i0=hY.root;while(i0.child1!=null){var hh=i0.child1;var gy=i0.child2;var im=i0.aabb;var jR=(im.maxx-im.minx+(im.maxy-im.miny))*2;var il=d.tmpaabb;var hU=i0.aabb;il.minx=hU.minxjx.maxx?hU.maxx:jx.maxx;il.maxy=hU.maxy>jx.maxy?hU.maxy:jx.maxy;var ik=d.tmpaabb;var iB=(ik.maxx-ik.minx+(ik.maxy-ik.miny))*2;var jM=2*iB;var i2=2*(iB-jR);var ii=d.tmpaabb;var fw=hh.aabb;ii.minx=jx.minxfw.maxx?jx.maxx:fw.maxx;ii.maxy=jx.maxy>fw.maxy?jx.maxy:fw.maxy;var ka;if(hh.child1==null){var ih=d.tmpaabb;ka=(ih.maxx-ih.minx+(ih.maxy-ih.miny))*2+i2}else{var ig=hh.aabb;var i8=(ig.maxx-ig.minx+(ig.maxy-ig.miny))*2;var ib=d.tmpaabb;ka=(ib.maxx-ib.minx+(ib.maxy-ib.miny))*2-i8+i2}var ia=d.tmpaabb;var fv=gy.aabb;ia.minx=jx.minxfv.maxx?jx.maxx:fv.maxx;ia.maxy=jx.maxy>fv.maxy?jx.maxy:fv.maxy;var j8;if(gy.child1==null){var h9=d.tmpaabb;j8=(h9.maxx-h9.minx+(h9.maxy-h9.miny))*2+i2}else{var h8=gy.aabb;var h1=(h8.maxx-h8.minx+(h8.maxy-h8.miny))*2;var h7=d.tmpaabb;j8=(h7.maxx-h7.minx+(h7.maxy-h7.miny))*2-h1+i2}if(jMfu.maxx?jx.maxx:fu.maxx;h6.maxy=jx.maxy>fu.maxy?jx.maxy:fu.maxy;i7.height=gw.height+1;if(iN!=null){if(iN.child1==gw){iN.child1=i7}else{iN.child2=i7}i7.child1=gw;i7.child2=fF;gw.parent=i7;fF.parent=i7}else{i7.child1=gw;i7.child2=fF;gw.parent=i7;fF.parent=i7;hY.root=i7}i0=fF.parent;while(i0!=null){if(i0.child1==null||i0.height<2){i0=i0}else{var fs=i0.child1;var jX=i0.child2;var hI=jX.height-fs.height;if(hI>1){var jv=jX.child1;var ji=jX.child2;jX.child1=i0;jX.parent=i0.parent;i0.parent=jX;if(jX.parent!=null){if(jX.parent.child1==i0){jX.parent.child1=jX}else{jX.parent.child2=jX}}else{hY.root=jX}if(jv.height>ji.height){jX.child2=jv;i0.child2=ji;ji.parent=i0;var h5=i0.aabb;var hT=fs.aabb;var fr=ji.aabb;h5.minx=hT.minxfr.maxx?hT.maxx:fr.maxx;h5.maxy=hT.maxy>fr.maxy?hT.maxy:fr.maxy;var h3=jX.aabb;var hS=i0.aabb;var fq=jv.aabb;h3.minx=hS.minxfq.maxx?hS.maxx:fq.maxx;h3.maxy=hS.maxy>fq.maxy?hS.maxy:fq.maxy;var eH=fs.height;var ej=ji.height;i0.height=1+(eH>ej?eH:ej);var iX=i0.height;var gY=jv.height;jX.height=1+(iX>gY?iX:gY)}else{jX.child2=ji;i0.child2=jv;jv.parent=i0;var h2=i0.aabb;var hR=fs.aabb;var fp=jv.aabb;h2.minx=hR.minxfp.maxx?hR.maxx:fp.maxx;h2.maxy=hR.maxy>fp.maxy?hR.maxy:fp.maxy;var h0=jX.aabb;var hQ=i0.aabb;var fo=ji.aabb;h0.minx=hQ.minxfo.maxx?hQ.maxx:fo.maxx;h0.maxy=hQ.maxy>fo.maxy?hQ.maxy:fo.maxy;var iW=fs.height;var gW=jv.height;i0.height=1+(iW>gW?iW:gW);var iV=i0.height;var gU=ji.height;jX.height=1+(iV>gU?iV:gU)}i0=jX}else{if(hI<-1){var ju=fs.child1;var jg=fs.child2;fs.child1=i0;fs.parent=i0.parent;i0.parent=fs;if(fs.parent!=null){if(fs.parent.child1==i0){fs.parent.child1=fs}else{fs.parent.child2=fs}}else{hY.root=fs}if(ju.height>jg.height){fs.child2=ju;i0.child1=jg;jg.parent=i0;var hD=i0.aabb;var hP=jX.aabb;var fm=jg.aabb;hD.minx=hP.minxfm.maxx?hP.maxx:fm.maxx;hD.maxy=hP.maxy>fm.maxy?hP.maxy:fm.maxy;var hC=fs.aabb;var hO=i0.aabb;var fk=ju.aabb;hC.minx=hO.minxfk.maxx?hO.maxx:fk.maxx;hC.maxy=hO.maxy>fk.maxy?hO.maxy:fk.maxy;var iU=jX.height;var gS=jg.height;i0.height=1+(iU>gS?iU:gS);var iT=i0.height;var gQ=ju.height;fs.height=1+(iT>gQ?iT:gQ)}else{fs.child2=jg;i0.child1=ju;ju.parent=i0;var hB=i0.aabb;var hN=jX.aabb;var fe=ju.aabb;hB.minx=hN.minxfe.maxx?hN.maxx:fe.maxx;hB.maxy=hN.maxy>fe.maxy?hN.maxy:fe.maxy;var hA=fs.aabb;var hM=i0.aabb;var fd=jg.aabb;hA.minx=hM.minxfd.maxx?hM.maxx:fd.maxx;hA.maxy=hM.maxy>fd.maxy?hM.maxy:fd.maxy;var iS=jX.height;var gO=ju.height;i0.height=1+(iS>gO?iS:gO);var iR=i0.height;var gM=jg.height;fs.height=1+(iR>gM?iR:gM)}i0=fs}else{i0=i0}}}var hg=i0.child1;var gx=i0.child2;var iQ=hg.height;var gL=gx.height;i0.height=1+(iQ>gL?iQ:gL);var hz=i0.aabb;var hL=hg.aabb;var fb=gx.aabb;hz.minx=hL.minxfb.maxx?hL.maxx:fb.maxx;hz.maxy=hL.maxy>fb.maxy?hL.maxy:fb.maxy;i0=i0.parent}}fF.synced=false;fF.moved=true;fF.mnext=fF.snext;fF.snext=null;fF=fF.mnext}var fG=this.syncs;this.syncs=this.moves;this.moves=fG}else{while(this.syncs!=null){var jV=this.syncs;this.syncs=jV.snext;jV.snext=null;var i9=jV.shape;if(!jV.first_sync){var hW=jV.dyn?this.dtree:this.stree;if(jV==hW.root){hW.root=null}else{var i3=jV.parent;var fA=i3.parent;var gt=i3.child1==jV?i3.child2:i3.child1;if(fA!=null){if(fA.child1==i3){fA.child1=gt}else{fA.child2=gt}gt.parent=fA;i3.height=-1;var id=i3.aabb;if(id.outer!=null){id.outer.zpp_inner=null;id.outer=null}id.wrap_min=id.wrap_max=null;id._invalidate=null;id._validate=null;id.next=bT.zpp_pool;bT.zpp_pool=id;i3.child1=i3.child2=i3.parent=null;i3.next=null;i3.snext=null;i3.mnext=null;i3.next=dz.zpp_pool;dz.zpp_pool=i3;var iZ=fA;while(iZ!=null){if(iZ.child1==null||iZ.height<2){iZ=iZ}else{var e9=iZ.child1;var jW=iZ.child2;var hH=jW.height-e9.height;if(hH>1){var jt=jW.child1;var je=jW.child2;jW.child1=iZ;jW.parent=iZ.parent;iZ.parent=jW;if(jW.parent!=null){if(jW.parent.child1==iZ){jW.parent.child1=jW}else{jW.parent.child2=jW}}else{hW.root=jW}if(jt.height>je.height){jW.child2=jt;iZ.child2=je;je.parent=iZ;var hy=iZ.aabb;var hs=e9.aabb;var e7=je.aabb;hy.minx=hs.minxe7.maxx?hs.maxx:e7.maxx;hy.maxy=hs.maxy>e7.maxy?hs.maxy:e7.maxy;var hx=jW.aabb;var hr=iZ.aabb;var e5=jt.aabb;hx.minx=hr.minxe5.maxx?hr.maxx:e5.maxx;hx.maxy=hr.maxy>e5.maxy?hr.maxy:e5.maxy;var iP=e9.height;var gK=je.height;iZ.height=1+(iP>gK?iP:gK);var iO=iZ.height;var gI=jt.height;jW.height=1+(iO>gI?iO:gI)}else{jW.child2=je;iZ.child2=jt;jt.parent=iZ;var hw=iZ.aabb;var hq=e9.aabb;var e3=jt.aabb;hw.minx=hq.minxe3.maxx?hq.maxx:e3.maxx;hw.maxy=hq.maxy>e3.maxy?hq.maxy:e3.maxy;var hv=jW.aabb;var hp=iZ.aabb;var e2=je.aabb;hv.minx=hp.minxe2.maxx?hp.maxx:e2.maxx;hv.maxy=hp.maxy>e2.maxy?hp.maxy:e2.maxy;var iL=e9.height;var gk=jt.height;iZ.height=1+(iL>gk?iL:gk);var iK=iZ.height;var gi=je.height;jW.height=1+(iK>gi?iK:gi)}iZ=jW}else{if(hH<-1){var jr=e9.child1;var jd=e9.child2;e9.child1=iZ;e9.parent=iZ.parent;iZ.parent=e9;if(e9.parent!=null){if(e9.parent.child1==iZ){e9.parent.child1=e9}else{e9.parent.child2=e9}}else{hW.root=e9}if(jr.height>jd.height){e9.child2=jr;iZ.child1=jd;jd.parent=iZ;var hu=iZ.aabb;var ho=jW.aabb;var e1=jd.aabb;hu.minx=ho.minxe1.maxx?ho.maxx:e1.maxx;hu.maxy=ho.maxy>e1.maxy?ho.maxy:e1.maxy;var hc=e9.aabb;var hm=iZ.aabb;var e0=jr.aabb;hc.minx=hm.minxe0.maxx?hm.maxx:e0.maxx;hc.maxy=hm.maxy>e0.maxy?hm.maxy:e0.maxy;var iJ=jW.height;var gg=jd.height;iZ.height=1+(iJ>gg?iJ:gg);var iI=iZ.height;var ge=jr.height;e9.height=1+(iI>ge?iI:ge)}else{e9.child2=jd;iZ.child1=jr;jr.parent=iZ;var ha=iZ.aabb;var hl=jW.aabb;var eZ=jr.aabb;ha.minx=hl.minxeZ.maxx?hl.maxx:eZ.maxx;ha.maxy=hl.maxy>eZ.maxy?hl.maxy:eZ.maxy;var g0=e9.aabb;var hk=iZ.aabb;var eY=jd.aabb;g0.minx=hk.minxeY.maxx?hk.maxx:eY.maxx;g0.maxy=hk.maxy>eY.maxy?hk.maxy:eY.maxy;var iH=jW.height;var gc=jr.height;iZ.height=1+(iH>gc?iH:gc);var iG=iZ.height;var ga=jd.height;e9.height=1+(iG>ga?iG:ga)}iZ=e9}else{iZ=iZ}}}var hf=iZ.child1;var gu=iZ.child2;var gZ=iZ.aabb;var hj=hf.aabb;var eW=gu.aabb;gZ.minx=hj.minxeW.maxx?hj.maxx:eW.maxx;gZ.maxy=hj.maxy>eW.maxy?hj.maxy:eW.maxy;var iF=hf.height;var f8=gu.height;iZ.height=1+(iF>f8?iF:f8);iZ=iZ.parent}}else{hW.root=gt;gt.parent=null;i3.height=-1;var ic=i3.aabb;if(ic.outer!=null){ic.outer.zpp_inner=null;ic.outer=null}ic.wrap_min=ic.wrap_max=null;ic._invalidate=null;ic._validate=null;ic.next=bT.zpp_pool;bT.zpp_pool=ic;i3.child1=i3.child2=i3.parent=null;i3.next=null;i3.snext=null;i3.mnext=null;i3.next=dz.zpp_pool;dz.zpp_pool=i3}}}else{jV.first_sync=false}var jS=jV.aabb;if(!this.space.continuous){if(i9.zip_aabb){if(i9.body!=null){i9.zip_aabb=false;if(i9.type==0){var gX=i9.circle;if(gX.zip_worldCOM){if(gX.body!=null){gX.zip_worldCOM=false;if(gX.zip_localCOM){gX.zip_localCOM=false;if(gX.type==1){var gV=gX.polygon;if(gV.lverts.next.next==null){gV.localCOMx=gV.lverts.next.x;gV.localCOMy=gV.lverts.next.y}else{if(gV.lverts.next.next.next==null){gV.localCOMx=gV.lverts.next.x;gV.localCOMy=gV.lverts.next.y;gV.localCOMx+=gV.lverts.next.next.x;gV.localCOMy+=gV.lverts.next.next.y;gV.localCOMx*=0.5;gV.localCOMy*=0.5}else{gV.localCOMx=0;gV.localCOMy=0;var jQ=0;var fj=gV.lverts.next;var fy=fj;fj=fj.next;var ft=fj;fj=fj.next;while(fj!=null){var e8=fj;jQ+=ft.x*(e8.y-fy.y);var jj=e8.y*ft.x-e8.x*ft.y;gV.localCOMx+=(ft.x+e8.x)*jj;gV.localCOMy+=(ft.y+e8.y)*jj;fy=ft;ft=e8;fj=fj.next}fj=gV.lverts.next;var e6=fj;jQ+=ft.x*(e6.y-fy.y);var jh=e6.y*ft.x-e6.x*ft.y;gV.localCOMx+=(ft.x+e6.x)*jh;gV.localCOMy+=(ft.y+e6.y)*jh;fy=ft;fj=fj.next;var e4=fj;jQ+=e6.x*(e4.y-fy.y);var jf=e4.y*e6.x-e4.x*e6.y;gV.localCOMx+=(e6.x+e4.x)*jf;gV.localCOMy+=(e6.y+e4.y)*jf;jQ=1/(3*jQ);var fE=jQ;gV.localCOMx*=fE;gV.localCOMy*=fE}}}if(gX.wrap_localCOM!=null){gX.wrap_localCOM.zpp_inner.x=gX.localCOMx;gX.wrap_localCOM.zpp_inner.y=gX.localCOMy}}var gT=gX.body;if(gT.zip_axis){gT.zip_axis=false;gT.axisx=Math.sin(gT.rot);gT.axisy=Math.cos(gT.rot)}gX.worldCOMx=gX.body.posx+(gX.body.axisy*gX.localCOMx-gX.body.axisx*gX.localCOMy);gX.worldCOMy=gX.body.posy+(gX.localCOMx*gX.body.axisx+gX.localCOMy*gX.body.axisy)}}var fH=gX.radius;var fz=gX.radius;gX.aabb.minx=gX.worldCOMx-fH;gX.aabb.miny=gX.worldCOMy-fz;gX.aabb.maxx=gX.worldCOMx+fH;gX.aabb.maxy=gX.worldCOMy+fz}else{var gR=i9.polygon;if(gR.zip_gverts){if(gR.body!=null){gR.zip_gverts=false;gR.validate_lverts();var gP=gR.body;if(gP.zip_axis){gP.zip_axis=false;gP.axisx=Math.sin(gP.rot);gP.axisy=Math.cos(gP.rot)}var hn=gR.lverts.next;var fi=gR.gverts.next;while(fi!=null){var jc=fi;var iM=hn;hn=hn.next;jc.x=gR.body.posx+(gR.body.axisy*iM.x-gR.body.axisx*iM.y);jc.y=gR.body.posy+(iM.x*gR.body.axisx+iM.y*gR.body.axisy);fi=fi.next}}}var i4=gR.gverts.next;gR.aabb.minx=i4.x;gR.aabb.miny=i4.y;gR.aabb.maxx=i4.x;gR.aabb.maxy=i4.y;var fh=gR.gverts.next.next;while(fh!=null){var hJ=fh;if(hJ.xgR.aabb.maxx){gR.aabb.maxx=hJ.x}if(hJ.ygR.aabb.maxy){gR.aabb.maxy=hJ.y}fh=fh.next}}}}}var hi=i9.aabb;jS.minx=hi.minx-3;jS.miny=hi.miny-3;jS.maxx=hi.maxx+3;jS.maxy=hi.maxy+3;var hV=(jV.dyn=i9.body.type==1?false:!i9.body.component.sleeping)?this.dtree:this.stree;if(hV.root==null){hV.root=jV;hV.root.parent=null}else{var j5=jV.aabb;var iY=hV.root;while(iY.child1!=null){var he=iY.child1;var gr=iY.child2;var gN=iY.aabb;var jP=(gN.maxx-gN.minx+(gN.maxy-gN.miny))*2;var go=d.tmpaabb;var gJ=iY.aabb;go.minx=gJ.minxj5.maxx?gJ.maxx:j5.maxx;go.maxy=gJ.maxy>j5.maxy?gJ.maxy:j5.maxy;var gn=d.tmpaabb;var ff=(gn.maxx-gn.minx+(gn.maxy-gn.miny))*2;var j6=2*ff;var hb=2*(ff-jP);var gm=d.tmpaabb;var eU=he.aabb;gm.minx=j5.minxeU.maxx?j5.maxx:eU.maxx;gm.maxy=j5.maxy>eU.maxy?j5.maxy:eU.maxy;var ij;if(he.child1==null){var gl=d.tmpaabb;ij=(gl.maxx-gl.minx+(gl.maxy-gl.miny))*2+hb}else{var gj=he.aabb;var hZ=(gj.maxx-gj.minx+(gj.maxy-gj.miny))*2;var gh=d.tmpaabb;ij=(gh.maxx-gh.minx+(gh.maxy-gh.miny))*2-hZ+hb}var gf=d.tmpaabb;var eS=gr.aabb;gf.minx=j5.minxeS.maxx?j5.maxx:eS.maxx;gf.maxy=j5.maxy>eS.maxy?j5.maxy:eS.maxy;var h4;if(gr.child1==null){var gd=d.tmpaabb;h4=(gd.maxx-gd.minx+(gd.maxy-gd.miny))*2+hb}else{var gb=gr.aabb;var hX=(gb.maxx-gb.minx+(gb.maxy-gb.miny))*2;var f9=d.tmpaabb;h4=(f9.maxx-f9.minx+(f9.maxy-f9.miny))*2-hX+hb}if(j6eQ.maxx?j5.maxx:eQ.maxx;fX.maxy=j5.maxy>eQ.maxy?j5.maxy:eQ.maxy;fg.height=gq.height+1;if(iu!=null){if(iu.child1==gq){iu.child1=fg}else{iu.child2=fg}fg.child1=gq;fg.child2=jV;gq.parent=fg;jV.parent=fg}else{fg.child1=gq;fg.child2=jV;gq.parent=fg;jV.parent=fg;hV.root=fg}iY=jV.parent;while(iY!=null){if(iY.child1==null||iY.height<2){iY=iY}else{var eO=iY.child1;var jU=iY.child2;var hE=jU.height-eO.height;if(hE>1){var jq=jU.child1;var jb=jU.child2;jU.child1=iY;jU.parent=iY.parent;iY.parent=jU;if(jU.parent!=null){if(jU.parent.child1==iY){jU.parent.child1=jU}else{jU.parent.child2=jU}}else{hV.root=jU}if(jq.height>jb.height){jU.child2=jq;iY.child2=jb;jb.parent=iY;var fW=iY.aabb;var gH=eO.aabb;var eM=jb.aabb;fW.minx=gH.minxeM.maxx?gH.maxx:eM.maxx;fW.maxy=gH.maxy>eM.maxy?gH.maxy:eM.maxy;var fV=jU.aabb;var gG=iY.aabb;var eK=jq.aabb;fV.minx=gG.minxeK.maxx?gG.maxx:eK.maxx;fV.maxy=gG.maxy>eK.maxy?gG.maxy:eK.maxy;var iE=eO.height;var f0=jb.height;iY.height=1+(iE>f0?iE:f0);var iD=iY.height;var fZ=jq.height;jU.height=1+(iD>fZ?iD:fZ)}else{jU.child2=jb;iY.child2=jq;jq.parent=iY;var fU=iY.aabb;var gF=eO.aabb;var eI=jq.aabb;fU.minx=gF.minxeI.maxx?gF.maxx:eI.maxx;fU.maxy=gF.maxy>eI.maxy?gF.maxy:eI.maxy;var fT=jU.aabb;var gE=iY.aabb;var ex=jb.aabb;fT.minx=gE.minxex.maxx?gE.maxx:ex.maxx;fT.maxy=gE.maxy>ex.maxy?gE.maxy:ex.maxy;var iC=eO.height;var fY=jq.height;iY.height=1+(iC>fY?iC:fY);var iA=iY.height;var fS=jb.height;jU.height=1+(iA>fS?iA:fS)}iY=jU}else{if(hE<-1){var jo=eO.child1;var ja=eO.child2;eO.child1=iY;eO.parent=iY.parent;iY.parent=eO;if(eO.parent!=null){if(eO.parent.child1==iY){eO.parent.child1=eO}else{eO.parent.child2=eO}}else{hV.root=eO}if(jo.height>ja.height){eO.child2=jo;iY.child1=ja;ja.parent=iY;var fR=iY.aabb;var gD=jU.aabb;var ew=ja.aabb;fR.minx=gD.minxew.maxx?gD.maxx:ew.maxx;fR.maxy=gD.maxy>ew.maxy?gD.maxy:ew.maxy;var fP=eO.aabb;var gC=iY.aabb;var eu=jo.aabb;fP.minx=gC.minxeu.maxx?gC.maxx:eu.maxx;fP.maxy=gC.maxy>eu.maxy?gC.maxy:eu.maxy;var iz=jU.height;var fQ=ja.height;iY.height=1+(iz>fQ?iz:fQ);var iy=iY.height;var fO=jo.height;eO.height=1+(iy>fO?iy:fO)}else{eO.child2=ja;iY.child1=jo;jo.parent=iY;var fN=iY.aabb;var gB=jU.aabb;var es=jo.aabb;fN.minx=gB.minxes.maxx?gB.maxx:es.maxx;fN.maxy=gB.maxy>es.maxy?gB.maxy:es.maxy;var fL=eO.aabb;var gA=iY.aabb;var eq=ja.aabb;fL.minx=gA.minxeq.maxx?gA.maxx:eq.maxx;fL.maxy=gA.maxy>eq.maxy?gA.maxy:eq.maxy;var ix=jU.height;var fM=jo.height;iY.height=1+(ix>fM?ix:fM);var iw=iY.height;var fK=ja.height;eO.height=1+(iw>fK?iw:fK)}iY=eO}else{iY=iY}}}var hd=iY.child1;var gp=iY.child2;var iv=hd.height;var fJ=gp.height;iY.height=1+(iv>fJ?iv:fJ);var fI=iY.aabb;var gz=hd.aabb;var eo=gp.aabb;fI.minx=gz.minxeo.maxx?gz.maxx:eo.maxx;fI.maxy=gz.maxy>eo.maxy?gz.maxy:eo.maxy;iY=iY.parent}}jV.synced=false;if(!jV.moved){jV.moved=true;jV.mnext=this.moves;this.moves=jV}}}}};cT.prototype.broadphase=function(eT,eq){var iD=this.syncs;while(iD!=null){var fO=iD.shape;if(!iD.first_sync){var hf=iD.dyn?this.dtree:this.stree;if(iD==hf.root){hf.root=null}else{var g0=iD.parent;var eZ=g0.parent;var he=g0.child1==iD?g0.child2:g0.child1;if(eZ!=null){if(eZ.child1==g0){eZ.child1=he}else{eZ.child2=he}he.parent=eZ;g0.height=-1;var ho=g0.aabb;if(ho.outer!=null){ho.outer.zpp_inner=null;ho.outer=null}ho.wrap_min=ho.wrap_max=null;ho._invalidate=null;ho._validate=null;ho.next=bT.zpp_pool;bT.zpp_pool=ho;g0.child1=g0.child2=g0.parent=null;g0.next=null;g0.snext=null;g0.mnext=null;g0.next=dz.zpp_pool;dz.zpp_pool=g0;var h7=eZ;while(h7!=null){if(h7.child1==null||h7.height<2){h7=h7}else{var hG=h7.child1;var hE=h7.child2;var eE=hE.height-hG.height;if(eE>1){var hD=hE.child1;var hC=hE.child2;hE.child1=h7;hE.parent=h7.parent;h7.parent=hE;if(hE.parent!=null){if(hE.parent.child1==h7){hE.parent.child1=hE}else{hE.parent.child2=hE}}else{hf.root=hE}if(hD.height>hC.height){hE.child2=hD;h7.child2=hC;hC.parent=h7;var g7=h7.aabb;var hI=hG.aabb;var iB=hC.aabb;g7.minx=hI.minxiB.maxx?hI.maxx:iB.maxx;g7.maxy=hI.maxy>iB.maxy?hI.maxy:iB.maxy;var fU=hE.aabb;var ep=h7.aabb;var iA=hD.aabb;fU.minx=ep.minxiA.maxx?ep.maxx:iA.maxx;fU.maxy=ep.maxy>iA.maxy?ep.maxy:iA.maxy;var hh=hG.height;var hg=hC.height;h7.height=1+(hh>hg?hh:hg);var eS=h7.height;var eD=hD.height;hE.height=1+(eS>eD?eS:eD)}else{hE.child2=hC;h7.child2=hD;hD.parent=h7;var fS=h7.aabb;var eo=hG.aabb;var iz=hD.aabb;fS.minx=eo.minxiz.maxx?eo.maxx:iz.maxx;fS.maxy=eo.maxy>iz.maxy?eo.maxy:iz.maxy;var fQ=hE.aabb;var en=h7.aabb;var iy=hC.aabb;fQ.minx=en.minxiy.maxx?en.maxx:iy.maxx;fQ.maxy=en.maxy>iy.maxy?en.maxy:iy.maxy;var eR=hG.height;var eC=hD.height;h7.height=1+(eR>eC?eR:eC);var eQ=h7.height;var eB=hC.height;hE.height=1+(eQ>eB?eQ:eB)}h7=hE}else{if(eE<-1){var ha=hG.child1;var gD=hG.child2;hG.child1=h7;hG.parent=h7.parent;h7.parent=hG;if(hG.parent!=null){if(hG.parent.child1==h7){hG.parent.child1=hG}else{hG.parent.child2=hG}}else{hf.root=hG}if(ha.height>gD.height){hG.child2=ha;h7.child1=gD;gD.parent=h7;var fN=h7.aabb;var el=hE.aabb;var iw=gD.aabb;fN.minx=el.minxiw.maxx?el.maxx:iw.maxx;fN.maxy=el.maxy>iw.maxy?el.maxy:iw.maxy;var fL=hG.aabb;var ej=h7.aabb;var iu=ha.aabb;fL.minx=ej.minxiu.maxx?ej.maxx:iu.maxx;fL.maxy=ej.maxy>iu.maxy?ej.maxy:iu.maxy;var eP=hE.height;var ez=gD.height;h7.height=1+(eP>ez?eP:ez);var eO=h7.height;var ex=ha.height;hG.height=1+(eO>ex?eO:ex)}else{hG.child2=gD;h7.child1=ha;ha.parent=h7;var fJ=h7.aabb;var eh=hE.aabb;var iq=ha.aabb;fJ.minx=eh.minxiq.maxx?eh.maxx:iq.maxx;fJ.maxy=eh.maxy>iq.maxy?eh.maxy:iq.maxy;var fH=hG.aabb;var ee=h7.aabb;var im=gD.aabb;fH.minx=ee.minxim.maxx?ee.maxx:im.maxx;fH.maxy=ee.maxy>im.maxy?ee.maxy:im.maxy;var eN=hE.height;var ev=ha.height;h7.height=1+(eN>ev?eN:ev);var eL=h7.height;var eu=gD.height;hG.height=1+(eL>eu?eL:eu)}h7=hG}else{h7=h7}}}var hy=h7.child1;var hu=h7.child2;var fF=h7.aabb;var eb=hy.aabb;var il=hu.aabb;fF.minx=eb.minxil.maxx?eb.maxx:il.maxx;fF.maxy=eb.maxy>il.maxy?eb.maxy:il.maxy;var eK=hy.height;var et=hu.height;h7.height=1+(eK>et?eK:et);h7=h7.parent}}else{hf.root=he;he.parent=null;g0.height=-1;var ii=g0.aabb;if(ii.outer!=null){ii.outer.zpp_inner=null;ii.outer=null}ii.wrap_min=ii.wrap_max=null;ii._invalidate=null;ii._validate=null;ii.next=bT.zpp_pool;bT.zpp_pool=ii;g0.child1=g0.child2=g0.parent=null;g0.next=null;g0.snext=null;g0.mnext=null;g0.next=dz.zpp_pool;dz.zpp_pool=g0}}}else{iD.first_sync=false}var fV=iD.aabb;if(!eT.continuous){if(fO.zip_aabb){if(fO.body!=null){fO.zip_aabb=false;if(fO.type==0){var fD=fO.circle;if(fD.zip_worldCOM){if(fD.body!=null){fD.zip_worldCOM=false;if(fD.zip_localCOM){fD.zip_localCOM=false;if(fD.type==1){var gU=fD.polygon;if(gU.lverts.next.next==null){gU.localCOMx=gU.lverts.next.x;gU.localCOMy=gU.lverts.next.y}else{if(gU.lverts.next.next.next==null){gU.localCOMx=gU.lverts.next.x;gU.localCOMy=gU.lverts.next.y;gU.localCOMx+=gU.lverts.next.next.x;gU.localCOMy+=gU.lverts.next.next.y;gU.localCOMx*=0.5;gU.localCOMy*=0.5}else{gU.localCOMx=0;gU.localCOMy=0;var gK=0;var eJ=gU.lverts.next;var hk=eJ;eJ=eJ.next;var hj=eJ;eJ=eJ.next;while(eJ!=null){var hi=eJ;gK+=hj.x*(hi.y-hk.y);var hv=hi.y*hj.x-hi.x*hj.y;gU.localCOMx+=(hj.x+hi.x)*hv;gU.localCOMy+=(hj.y+hi.y)*hv;hk=hj;hj=hi;eJ=eJ.next}eJ=gU.lverts.next;var e2=eJ;gK+=hj.x*(e2.y-hk.y);var eX=e2.y*hj.x-e2.x*hj.y;gU.localCOMx+=(hj.x+e2.x)*eX;gU.localCOMy+=(hj.y+e2.y)*eX;hk=hj;eJ=eJ.next;var e0=eJ;gK+=e2.x*(e0.y-hk.y);var eW=e0.y*e2.x-e0.x*e2.y;gU.localCOMx+=(e2.x+e0.x)*eW;gU.localCOMy+=(e2.y+e0.y)*eW;gK=1/(3*gK);var hl=gK;gU.localCOMx*=hl;gU.localCOMy*=hl}}}if(fD.wrap_localCOM!=null){fD.wrap_localCOM.zpp_inner.x=fD.localCOMx;fD.wrap_localCOM.zpp_inner.y=fD.localCOMy}}var gS=fD.body;if(gS.zip_axis){gS.zip_axis=false;gS.axisx=Math.sin(gS.rot);gS.axisy=Math.cos(gS.rot)}fD.worldCOMx=fD.body.posx+(fD.body.axisy*fD.localCOMx-fD.body.axisx*fD.localCOMy);fD.worldCOMy=fD.body.posy+(fD.localCOMx*fD.body.axisx+fD.localCOMy*fD.body.axisy)}}var f0=fD.radius;var fY=fD.radius;fD.aabb.minx=fD.worldCOMx-f0;fD.aabb.miny=fD.worldCOMy-fY;fD.aabb.maxx=fD.worldCOMx+f0;fD.aabb.maxy=fD.worldCOMy+fY}else{var gQ=fO.polygon;if(gQ.zip_gverts){if(gQ.body!=null){gQ.zip_gverts=false;gQ.validate_lverts();var gO=gQ.body;if(gO.zip_axis){gO.zip_axis=false;gO.axisx=Math.sin(gO.rot);gO.axisy=Math.cos(gO.rot)}var iF=gQ.lverts.next;var fj=gQ.gverts.next;while(fj!=null){var gC=fj;var hs=iF;iF=iF.next;gC.x=gQ.body.posx+(gQ.body.axisy*hs.x-gQ.body.axisx*hs.y);gC.y=gQ.body.posy+(hs.x*gQ.body.axisx+hs.y*gQ.body.axisy);fj=fj.next}}}var h4=gQ.gverts.next;gQ.aabb.minx=h4.x;gQ.aabb.miny=h4.y;gQ.aabb.maxx=h4.x;gQ.aabb.maxy=h4.y;var fh=gQ.gverts.next.next;while(fh!=null){var hn=fh;if(hn.xgQ.aabb.maxx){gQ.aabb.maxx=hn.x}if(hn.ygQ.aabb.maxy){gQ.aabb.maxy=hn.y}fh=fh.next}}}}}var iL=fO.aabb;fV.minx=iL.minx-3;fV.miny=iL.miny-3;fV.maxx=iL.maxx+3;fV.maxy=iL.maxy+3;var e6=(iD.dyn=fO.body.type==1?false:!fO.body.component.sleeping)?this.dtree:this.stree;if(e6.root==null){e6.root=iD;e6.root.parent=null}else{var ik=iD.aabb;var h6=e6.root;while(h6.child1!=null){var fz=h6.child1;var e5=h6.child2;var gM=h6.aabb;var iC=(gM.maxx-gM.minx+(gM.maxy-gM.miny))*2;var gJ=d.tmpaabb;var gx=h6.aabb;gJ.minx=gx.minxik.maxx?gx.maxx:ik.maxx;gJ.maxy=gx.maxy>ik.maxy?gx.maxy:ik.maxy;var gI=d.tmpaabb;var hd=(gI.maxx-gI.minx+(gI.maxy-gI.miny))*2;var fx=2*hd;var hw=2*(hd-iC);var gH=d.tmpaabb;var em=fz.aabb;gH.minx=ik.minxem.maxx?ik.maxx:em.maxx;gH.maxy=ik.maxy>em.maxy?ik.maxy:em.maxy;var ey;if(fz.child1==null){var gG=d.tmpaabb;ey=(gG.maxx-gG.minx+(gG.maxy-gG.miny))*2+hw}else{var gF=fz.aabb;var e3=(gF.maxx-gF.minx+(gF.maxy-gF.miny))*2;var gk=d.tmpaabb;ey=(gk.maxx-gk.minx+(gk.maxy-gk.miny))*2-e3+hw}var gh=d.tmpaabb;var ek=e5.aabb;gh.minx=ik.minxek.maxx?ik.maxx:ek.maxx;gh.maxy=ik.maxy>ek.maxy?ik.maxy:ek.maxy;var ew;if(e5.child1==null){var ge=d.tmpaabb;ew=(ge.maxx-ge.minx+(ge.maxy-ge.miny))*2+hw}else{var gc=e5.aabb;var gN=(gc.maxx-gc.minx+(gc.maxy-gc.miny))*2;var ga=d.tmpaabb;ew=(ga.maxx-ga.minx+(ga.maxy-ga.miny))*2-gN+hw}if(fxei.maxx?ik.maxx:ei.maxx;f8.maxy=ik.maxy>ei.maxy?ik.maxy:ei.maxy;eM.height=e8.height+1;if(eA!=null){if(eA.child1==e8){eA.child1=eM}else{eA.child2=eM}eM.child1=e8;eM.child2=iD;e8.parent=eM;iD.parent=eM}else{eM.child1=e8;eM.child2=iD;e8.parent=eM;iD.parent=eM;e6.root=eM}h6=iD.parent;while(h6!=null){if(h6.child1==null||h6.height<2){h6=h6}else{var ef=h6.child1;var ib=h6.child2;var ic=ib.height-ef.height;if(ic>1){var g9=ib.child1;var gB=ib.child2;ib.child1=h6;ib.parent=h6.parent;h6.parent=ib;if(ib.parent!=null){if(ib.parent.child1==h6){ib.parent.child1=ib}else{ib.parent.child2=ib}}else{e6.root=ib}if(g9.height>gB.height){ib.child2=g9;h6.child2=gB;gB.parent=h6;var f7=h6.aabb;var gw=ef.aabb;var ec=gB.aabb;f7.minx=gw.minxec.maxx?gw.maxx:ec.maxx;f7.maxy=gw.maxy>ec.maxy?gw.maxy:ec.maxy;var f6=ib.aabb;var gv=h6.aabb;var iM=g9.aabb;f6.minx=gv.minxiM.maxx?gv.maxx:iM.maxx;f6.maxy=gv.maxy>iM.maxy?gv.maxy:iM.maxy;var eI=ef.height;var es=gB.height;h6.height=1+(eI>es?eI:es);var h5=h6.height;var fm=g9.height;ib.height=1+(h5>fm?h5:fm)}else{ib.child2=gB;h6.child2=g9;g9.parent=h6;var f5=h6.aabb;var gu=ef.aabb;var iJ=g9.aabb;f5.minx=gu.minxiJ.maxx?gu.maxx:iJ.maxx;f5.maxy=gu.maxy>iJ.maxy?gu.maxy:iJ.maxy;var f4=ib.aabb;var gt=h6.aabb;var iI=gB.aabb;f4.minx=gt.minxiI.maxx?gt.maxx:iI.maxx;f4.maxy=gt.maxy>iI.maxy?gt.maxy:iI.maxy;var h3=ef.height;var fl=g9.height;h6.height=1+(h3>fl?h3:fl);var h2=h6.height;var fk=gB.height;ib.height=1+(h2>fk?h2:fk)}h6=ib}else{if(ic<-1){var g8=ef.child1;var gz=ef.child2;ef.child1=h6;ef.parent=h6.parent;h6.parent=ef;if(ef.parent!=null){if(ef.parent.child1==h6){ef.parent.child1=ef}else{ef.parent.child2=ef}}else{e6.root=ef}if(g8.height>gz.height){ef.child2=g8;h6.child1=gz;gz.parent=h6;var fT=h6.aabb;var gs=ib.aabb;var iH=gz.aabb;fT.minx=gs.minxiH.maxx?gs.maxx:iH.maxx;fT.maxy=gs.maxy>iH.maxy?gs.maxy:iH.maxy;var fR=ef.aabb;var gr=h6.aabb;var iG=g8.aabb;fR.minx=gr.minxiG.maxx?gr.maxx:iG.maxx;fR.maxy=gr.maxy>iG.maxy?gr.maxy:iG.maxy;var h0=ib.height;var fi=gz.height;h6.height=1+(h0>fi?h0:fi);var hY=h6.height;var fg=g8.height;ef.height=1+(hY>fg?hY:fg)}else{ef.child2=gz;h6.child1=g8;g8.parent=h6;var fP=h6.aabb;var gq=ib.aabb;var ix=g8.aabb;fP.minx=gq.minxix.maxx?gq.maxx:ix.maxx;fP.maxy=gq.maxy>ix.maxy?gq.maxy:ix.maxy;var fM=ef.aabb;var gp=h6.aabb;var iv=gz.aabb;fM.minx=gp.minxiv.maxx?gp.maxx:iv.maxx;fM.maxy=gp.maxy>iv.maxy?gp.maxy:iv.maxy;var hW=ib.height;var ff=g8.height;h6.height=1+(hW>ff?hW:ff);var hU=h6.height;var fd=gz.height;ef.height=1+(hU>fd?hU:fd)}h6=ef}else{h6=h6}}}var fy=h6.child1;var e4=h6.child2;var hT=fy.height;var fb=e4.height;h6.height=1+(hT>fb?hT:fb);var fK=h6.aabb;var go=fy.aabb;var it=e4.aabb;fK.minx=go.minxit.maxx?go.maxx:it.maxx;fK.maxy=go.maxy>it.maxy?go.maxy:it.maxy;h6=h6.parent}}iD.synced=false;iD=iD.snext}while(this.syncs!=null){var gg=this.syncs;this.syncs=gg.snext;gg.snext=null;if(gg.moved){continue}gg.moved=false;var eY=gg.shape;if(eY.body.component.sleeping){continue}var ij=gg.aabb;var er=null;if(this.dtree.root!=null){this.dtree.root.next=er;er=this.dtree.root}while(er!=null){var hQ=er;er=hQ.next;hQ.next=null;if(hQ==gg){continue}if(hQ.child1==null){var eg=hQ.shape;if(eg.body!=eY.body&&!(eg.body.type==1&&eY.body.type==1)){var hS=hQ.aabb;if(hS.miny<=ij.maxy&&ij.miny<=hS.maxy&&hS.minx<=ij.maxx&&ij.minx<=hS.maxx){var e1;var hc;if(eY.id=eg.minx&&en.x<=eg.maxx&&en.y>=eg.miny&&en.y<=eg.maxy){if(ec.child1==null){var ee;if(ea!=null){var ej=ec.shape.filter;if((ej.collisionMask&ea.collisionGroup)!=0){ee=(ea.collisionMask&ej.collisionGroup)!=0}else{ee=false}}else{ee=true}if(ee){if(ec.shape.type==0){if(b7.circleContains(ec.shape.circle,en)){el.push(ec.shape.outer)}}else{if(b7.polyContains(ec.shape.polygon,en)){el.push(ec.shape.outer)}}}}else{if(ec.child1!=null){this.treeStack.add(ec.child1)}if(ec.child2!=null){this.treeStack.add(ec.child2)}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var eo=this.treeStack.pop_unsafe();var eh=eo.aabb;if(en.x>=eh.minx&&en.x<=eh.maxx&&en.y>=eh.miny&&en.y<=eh.maxy){if(eo.child1==null){var ed;if(ea!=null){var ef=eo.shape.filter;if((ef.collisionMask&ea.collisionGroup)!=0){ed=(ea.collisionMask&ef.collisionGroup)!=0}else{ed=false}}else{ed=true}if(ed){if(eo.shape.type==0){if(b7.circleContains(eo.shape.circle,en)){el.push(eo.shape.outer)}}else{if(b7.polyContains(eo.shape.polygon,en)){el.push(eo.shape.outer)}}}}else{if(eo.child1!=null){this.treeStack.add(eo.child1)}if(eo.child2!=null){this.treeStack.add(eo.child2)}}}}}if(en.outer!=null){en.outer.zpp_inner=null;en.outer=null}en._isimmutable=null;en._validate=null;en._invalidate=null;en.next=bB.zpp_pool;bB.zpp_pool=en;return el};cT.prototype.bodiesUnderPoint=function(eo,em,eb,ec){this.sync_broadphase();var ek;if(bB.zpp_pool==null){ek=new bB()}else{ek=bB.zpp_pool;bB.zpp_pool=ek.next;ek.next=null}ek.weak=false;ek._immutable=false;ek.x=eo;ek.y=em;var ep=ek;var en=ec==null?new a5():ec;if(this.stree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.stree.root);while(this.treeStack.head!=null){var ed=this.treeStack.pop_unsafe();var ei=ed.aabb;if(ep.x>=ei.minx&&ep.x<=ei.maxx&&ep.y>=ei.miny&&ep.y<=ei.maxy){if(ed.child1==null){var eg=ed.shape.body.outer;if(!en.has(eg)){var ef;if(eb!=null){var el=ed.shape.filter;if((el.collisionMask&eb.collisionGroup)!=0){ef=(eb.collisionMask&el.collisionGroup)!=0}else{ef=false}}else{ef=true}if(ef){if(ed.shape.type==0){if(b7.circleContains(ed.shape.circle,ep)){en.push(eg)}}else{if(b7.polyContains(ed.shape.polygon,ep)){en.push(eg)}}}}}else{if(ed.child1!=null){this.treeStack.add(ed.child1)}if(ed.child2!=null){this.treeStack.add(ed.child2)}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var eq=this.treeStack.pop_unsafe();var ej=eq.aabb;if(ep.x>=ej.minx&&ep.x<=ej.maxx&&ep.y>=ej.miny&&ep.y<=ej.maxy){if(eq.child1==null){var ea=eq.shape.body.outer;if(!en.has(ea)){var ee;if(eb!=null){var eh=eq.shape.filter;if((eh.collisionMask&eb.collisionGroup)!=0){ee=(eb.collisionMask&eh.collisionGroup)!=0}else{ee=false}}else{ee=true}if(ee){if(eq.shape.type==0){if(b7.circleContains(eq.shape.circle,ep)){en.push(ea)}}else{if(b7.polyContains(eq.shape.polygon,ep)){en.push(ea)}}}}}else{if(eq.child1!=null){this.treeStack.add(eq.child1)}if(eq.child2!=null){this.treeStack.add(eq.child2)}}}}}if(ep.outer!=null){ep.outer.zpp_inner=null;ep.outer=null}ep._isimmutable=null;ep._validate=null;ep._invalidate=null;ep.next=bB.zpp_pool;bB.zpp_pool=ep;return en};cT.prototype.treeStack2=null;cT.prototype.shapesInAABB=function(ed,eG,eC,eg,ee){this.sync_broadphase();this.updateAABBShape(ed);var eE=this.aabbShape.zpp_inner.aabb;var eF=ee==null?new cZ():ee;if(this.stree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.stree.root);while(this.treeStack.head!=null){var eo=this.treeStack.pop_unsafe();var ef=eo.aabb;if(ef.minx>=eE.minx&&ef.miny>=eE.miny&&ef.maxx<=eE.maxx&&ef.maxy<=eE.maxy){if(eo.child1==null){var eD;if(eg!=null){var es=eo.shape.filter;if((es.collisionMask&eg.collisionGroup)!=0){eD=(eg.collisionMask&es.collisionGroup)!=0}else{eD=false}}else{eD=true}if(eD){eF.push(eo.shape.outer)}}else{if(this.treeStack2==null){this.treeStack2=new ai()}this.treeStack2.add(eo);while(this.treeStack2.head!=null){var ec=this.treeStack2.pop_unsafe();if(ec.child1==null){var en;if(eg!=null){var eB=ec.shape.filter;if((eB.collisionMask&eg.collisionGroup)!=0){en=(eg.collisionMask&eB.collisionGroup)!=0}else{en=false}}else{en=true}if(en){eF.push(ec.shape.outer)}}else{if(ec.child1!=null){this.treeStack2.add(ec.child1)}if(ec.child2!=null){this.treeStack2.add(ec.child2)}}}}}else{var eA=eo.aabb;if(eE.miny<=eA.maxy&&eA.miny<=eE.maxy&&eE.minx<=eA.maxx&&eA.minx<=eE.maxx){if(eo.child1==null){var em;if(eg!=null){var ey=eo.shape.filter;if((ey.collisionMask&eg.collisionGroup)!=0){em=(eg.collisionMask&ey.collisionGroup)!=0}else{em=false}}else{em=true}if(em){if(eG){if(eC){if(b7.containTest(this.aabbShape.zpp_inner,eo.shape)){eF.push(eo.shape.outer)}}else{var ez=eo.shape.aabb;if(ez.minx>=eE.minx&&ez.miny>=eE.miny&&ez.maxx<=eE.maxx&&ez.maxy<=eE.maxy){eF.push(eo.shape.outer)}else{if(b7.testCollide_safe(eo.shape,this.aabbShape.zpp_inner)){eF.push(eo.shape.outer)}}}}else{var el;if(!(!eC)){var ex=eo.shape.aabb;if(ex.minx>=eE.minx&&ex.miny>=eE.miny&&ex.maxx<=eE.maxx){el=ex.maxy<=eE.maxy}else{el=false}}else{el=true}if(el){eF.push(eo.shape.outer)}}}}else{if(eo.child1!=null){this.treeStack.add(eo.child1)}if(eo.child2!=null){this.treeStack.add(eo.child2)}}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var eb=this.treeStack.pop_unsafe();var ew=eb.aabb;if(ew.minx>=eE.minx&&ew.miny>=eE.miny&&ew.maxx<=eE.maxx&&ew.maxy<=eE.maxy){if(eb.child1==null){var ek;if(eg!=null){var ev=eb.shape.filter;if((ev.collisionMask&eg.collisionGroup)!=0){ek=(eg.collisionMask&ev.collisionGroup)!=0}else{ek=false}}else{ek=true}if(ek){eF.push(eb.shape.outer)}}else{if(this.treeStack2==null){this.treeStack2=new ai()}this.treeStack2.add(eb);while(this.treeStack2.head!=null){var ea=this.treeStack2.pop_unsafe();if(ea.child1==null){var ej;if(eg!=null){var eu=ea.shape.filter;if((eu.collisionMask&eg.collisionGroup)!=0){ej=(eg.collisionMask&eu.collisionGroup)!=0}else{ej=false}}else{ej=true}if(ej){eF.push(ea.shape.outer)}}else{if(ea.child1!=null){this.treeStack2.add(ea.child1)}if(ea.child2!=null){this.treeStack2.add(ea.child2)}}}}}else{var er=eb.aabb;if(eE.miny<=er.maxy&&er.miny<=eE.maxy&&eE.minx<=er.maxx&&er.minx<=eE.maxx){if(eb.child1==null){var ei;if(eg!=null){var ep=eb.shape.filter;if((ep.collisionMask&eg.collisionGroup)!=0){ei=(eg.collisionMask&ep.collisionGroup)!=0}else{ei=false}}else{ei=true}if(ei){if(eG){if(eC){if(b7.containTest(this.aabbShape.zpp_inner,eb.shape)){eF.push(eb.shape.outer)}}else{var et=eb.shape.aabb;if(et.minx>=eE.minx&&et.miny>=eE.miny&&et.maxx<=eE.maxx&&et.maxy<=eE.maxy){eF.push(eb.shape.outer)}else{if(b7.testCollide_safe(eb.shape,this.aabbShape.zpp_inner)){eF.push(eb.shape.outer)}}}}else{var eh;if(!(!eC)){var eq=eb.shape.aabb;if(eq.minx>=eE.minx&&eq.miny>=eE.miny&&eq.maxx<=eE.maxx){eh=eq.maxy<=eE.maxy}else{eh=false}}else{eh=true}if(eh){eF.push(eb.shape.outer)}}}}else{if(eb.child1!=null){this.treeStack.add(eb.child1)}if(eb.child2!=null){this.treeStack.add(eb.child2)}}}}}}return eF};cT.prototype.failed=null;cT.prototype.bodiesInAABB=function(ew,eB,eu,ez,ev){this.sync_broadphase();this.updateAABBShape(ew);var en=this.aabbShape.zpp_inner.aabb;var ey=ev==null?new a5():ev;if(this.failed==null){this.failed=new a5()}if(this.stree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.stree.root);while(this.treeStack.head!=null){var ex=this.treeStack.pop_unsafe();var eE=ex.aabb;if(eE.minx>=en.minx&&eE.miny>=en.miny&&eE.maxx<=en.maxx&&eE.maxy<=en.maxy){if(ex.child1==null){var eJ;if(ez!=null){var ed=ex.shape.filter;if((ed.collisionMask&ez.collisionGroup)!=0){eJ=(ez.collisionMask&ed.collisionGroup)!=0}else{eJ=false}}else{eJ=true}if(eJ){var et=ex.shape.body.outer;if(!ey.has(et)){ey.push(et)}}}else{if(this.treeStack2==null){this.treeStack2=new ai()}this.treeStack2.add(ex);while(this.treeStack2.head!=null){var es=this.treeStack2.pop_unsafe();if(es.child1==null){var eQ;if(ez!=null){var eI=es.shape.filter;if((eI.collisionMask&ez.collisionGroup)!=0){eQ=(ez.collisionMask&eI.collisionGroup)!=0}else{eQ=false}}else{eQ=true}if(eQ){var ei=es.shape.body.outer;if(!ey.has(ei)){ey.push(ei)}}}else{if(es.child1!=null){this.treeStack2.add(es.child1)}if(es.child2!=null){this.treeStack2.add(es.child2)}}}}}else{var eH=ex.aabb;if(en.miny<=eH.maxy&&eH.miny<=en.maxy&&en.minx<=eH.maxx&&eH.minx<=en.maxx){if(ex.child1==null){var eh=ex.shape.body.outer;var eP;if(ez!=null){var eG=ex.shape.filter;if((eG.collisionMask&ez.collisionGroup)!=0){eP=(ez.collisionMask&eG.collisionGroup)!=0}else{eP=false}}else{eP=true}if(eP){if(eB){if(eu){if(!this.failed.has(eh)){var ej=b7.containTest(this.aabbShape.zpp_inner,ex.shape);if(!ey.has(eh)&&ej){ey.push(eh)}else{if(!ej){ey.remove(eh);this.failed.push(eh)}}}}else{if(!ey.has(eh)&&b7.testCollide_safe(ex.shape,this.aabbShape.zpp_inner)){ey.push(eh)}}}else{if(eu){if(!this.failed.has(eh)){var ep=ex.shape.aabb;var ec=ep.minx>=en.minx&&ep.miny>=en.miny&&ep.maxx<=en.maxx&&ep.maxy<=en.maxy;if(!ey.has(eh)&&ec){ey.push(eh)}else{if(!ec){ey.remove(eh);this.failed.push(eh)}}}}else{var eO;if(!ey.has(eh)){var eo=ex.shape.aabb;if(eo.minx>=en.minx&&eo.miny>=en.miny&&eo.maxx<=en.maxx){eO=eo.maxy<=en.maxy}else{eO=false}}else{eO=false}if(eO){ey.push(eh)}}}}}else{if(ex.child1!=null){this.treeStack.add(ex.child1)}if(ex.child2!=null){this.treeStack.add(ex.child2)}}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var er=this.treeStack.pop_unsafe();var em=er.aabb;if(em.minx>=en.minx&&em.miny>=en.miny&&em.maxx<=en.maxx&&em.maxy<=en.maxy){if(er.child1==null){var eN;if(ez!=null){var eF=er.shape.filter;if((eF.collisionMask&ez.collisionGroup)!=0){eN=(ez.collisionMask&eF.collisionGroup)!=0}else{eN=false}}else{eN=true}if(eN){var eg=er.shape.body.outer;if(!ey.has(eg)){ey.push(eg)}}}else{if(this.treeStack2==null){this.treeStack2=new ai()}this.treeStack2.add(er);while(this.treeStack2.head!=null){var eq=this.treeStack2.pop_unsafe();if(eq.child1==null){var eM;if(ez!=null){var eD=eq.shape.filter;if((eD.collisionMask&ez.collisionGroup)!=0){eM=(ez.collisionMask&eD.collisionGroup)!=0}else{eM=false}}else{eM=true}if(eM){var ef=eq.shape.body.outer;if(!ey.has(ef)){ey.push(ef)}}}else{if(eq.child1!=null){this.treeStack2.add(eq.child1)}if(eq.child2!=null){this.treeStack2.add(eq.child2)}}}}}else{var eC=er.aabb;if(en.miny<=eC.maxy&&eC.miny<=en.maxy&&en.minx<=eC.maxx&&eC.minx<=en.maxx){if(er.child1==null){var ee=er.shape.body.outer;var eL;if(ez!=null){var eA=er.shape.filter;if((eA.collisionMask&ez.collisionGroup)!=0){eL=(ez.collisionMask&eA.collisionGroup)!=0}else{eL=false}}else{eL=true}if(eL){if(eB){if(eu){if(!this.failed.has(ee)){var eb=b7.containTest(this.aabbShape.zpp_inner,er.shape);if(!ey.has(ee)&&eb){ey.push(ee)}else{if(!eb){ey.remove(ee);this.failed.push(ee)}}}}else{if(!ey.has(ee)&&b7.testCollide_safe(er.shape,this.aabbShape.zpp_inner)){ey.push(ee)}}}else{if(eu){if(!this.failed.has(ee)){var el=er.shape.aabb;var ea=el.minx>=en.minx&&el.miny>=en.miny&&el.maxx<=en.maxx&&el.maxy<=en.maxy;if(!ey.has(ee)&&ea){ey.push(ee)}else{if(!ea){ey.remove(ee);this.failed.push(ee)}}}}else{var eK;if(!ey.has(ee)){var ek=er.shape.aabb;if(ek.minx>=en.minx&&ek.miny>=en.miny&&ek.maxx<=en.maxx){eK=ek.maxy<=en.maxy}else{eK=false}}else{eK=false}if(eK){ey.push(ee)}}}}}else{if(er.child1!=null){this.treeStack.add(er.child1)}if(er.child2!=null){this.treeStack.add(er.child2)}}}}}}this.failed.clear();return ey};cT.prototype.shapesInCircle=function(en,em,eb,ea,ec,ed){this.sync_broadphase();this.updateCircShape(en,em,eb);var ep=this.circShape.zpp_inner.aabb;var ek=ed==null?new cZ():ed;if(this.stree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.stree.root);while(this.treeStack.head!=null){var ee=this.treeStack.pop_unsafe();var ei=ee.aabb;if(ep.miny<=ei.maxy&&ei.miny<=ep.maxy&&ep.minx<=ei.maxx&&ei.minx<=ep.maxx){if(ee.child1==null){var eg;if(ec!=null){var el=ee.shape.filter;if((el.collisionMask&ec.collisionGroup)!=0){eg=(ec.collisionMask&el.collisionGroup)!=0}else{eg=false}}else{eg=true}if(eg){if(ea){if(b7.containTest(this.circShape.zpp_inner,ee.shape)){ek.push(ee.shape.outer)}}else{if(b7.testCollide_safe(ee.shape,this.circShape.zpp_inner)){ek.push(ee.shape.outer)}}}}else{if(ee.child1!=null){this.treeStack.add(ee.child1)}if(ee.child2!=null){this.treeStack.add(ee.child2)}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var eo=this.treeStack.pop_unsafe();var ej=eo.aabb;if(ep.miny<=ej.maxy&&ej.miny<=ep.maxy&&ep.minx<=ej.maxx&&ej.minx<=ep.maxx){if(eo.child1==null){var ef;if(ec!=null){var eh=eo.shape.filter;if((eh.collisionMask&ec.collisionGroup)!=0){ef=(ec.collisionMask&eh.collisionGroup)!=0}else{ef=false}}else{ef=true}if(ef){if(ea){if(b7.containTest(this.circShape.zpp_inner,eo.shape)){ek.push(eo.shape.outer)}}else{if(b7.testCollide_safe(eo.shape,this.circShape.zpp_inner)){ek.push(eo.shape.outer)}}}}else{if(eo.child1!=null){this.treeStack.add(eo.child1)}if(eo.child2!=null){this.treeStack.add(eo.child2)}}}}}return ek};cT.prototype.bodiesInCircle=function(ee,ed,ei,eq,eg,ec){this.sync_broadphase();this.updateCircShape(ee,ed,ei);var es=this.circShape.zpp_inner.aabb;var et=ec==null?new a5():ec;if(this.failed==null){this.failed=new a5()}if(this.stree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.stree.root);while(this.treeStack.head!=null){var ek=this.treeStack.pop_unsafe();var el=ek.aabb;if(es.miny<=el.maxy&&el.miny<=es.maxy&&es.minx<=el.maxx&&el.minx<=es.maxx){if(ek.child1==null){var ef=ek.shape.body.outer;var er;if(eg!=null){var eo=ek.shape.filter;if((eo.collisionMask&eg.collisionGroup)!=0){er=(eg.collisionMask&eo.collisionGroup)!=0}else{er=false}}else{er=true}if(er){if(eq){if(!this.failed.has(ef)){var eb=b7.containTest(this.circShape.zpp_inner,ek.shape);if(!et.has(ef)&&eb){et.push(ef)}else{if(!eb){et.remove(ef);this.failed.push(ef)}}}}else{if(!et.has(ef)&&b7.testCollide_safe(ek.shape,this.circShape.zpp_inner)){et.push(ef)}}}}else{if(ek.child1!=null){this.treeStack.add(ek.child1)}if(ek.child2!=null){this.treeStack.add(ek.child2)}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var ea=this.treeStack.pop_unsafe();var en=ea.aabb;if(es.miny<=en.maxy&&en.miny<=es.maxy&&es.minx<=en.maxx&&en.minx<=es.maxx){if(ea.child1==null){var eh=ea.shape.body.outer;var ej;if(eg!=null){var em=ea.shape.filter;if((em.collisionMask&eg.collisionGroup)!=0){ej=(eg.collisionMask&em.collisionGroup)!=0}else{ej=false}}else{ej=true}if(ej){if(eq){if(!this.failed.has(eh)){var ep=b7.containTest(this.circShape.zpp_inner,ea.shape);if(!et.has(eh)&&ep){et.push(eh)}else{if(!ep){et.remove(eh);this.failed.push(eh)}}}}else{if(!et.has(eh)&&b7.testCollide_safe(ea.shape,this.circShape.zpp_inner)){et.push(eh)}}}}else{if(ea.child1!=null){this.treeStack.add(ea.child1)}if(ea.child2!=null){this.treeStack.add(ea.child2)}}}}}this.failed.clear();return et};cT.prototype.shapesInShape=function(em,ea,eb,ec){this.sync_broadphase();this.validateShape(em);var en=em.aabb;var ej=ec==null?new cZ():ec;if(this.stree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.stree.root);while(this.treeStack.head!=null){var ed=this.treeStack.pop_unsafe();var eh=ed.aabb;if(en.miny<=eh.maxy&&eh.miny<=en.maxy&&en.minx<=eh.maxx&&eh.minx<=en.maxx){if(ed.child1==null){var ef;if(eb!=null){var ek=ed.shape.filter;if((ek.collisionMask&eb.collisionGroup)!=0){ef=(eb.collisionMask&ek.collisionGroup)!=0}else{ef=false}}else{ef=true}if(ef){if(ea){if(b7.containTest(em,ed.shape)){ej.push(ed.shape.outer)}}else{if(b7.testCollide_safe(ed.shape,em)){ej.push(ed.shape.outer)}}}}else{if(ed.child1!=null){this.treeStack.add(ed.child1)}if(ed.child2!=null){this.treeStack.add(ed.child2)}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var el=this.treeStack.pop_unsafe();var ei=el.aabb;if(en.miny<=ei.maxy&&ei.miny<=en.maxy&&en.minx<=ei.maxx&&ei.minx<=en.maxx){if(el.child1==null){var ee;if(eb!=null){var eg=el.shape.filter;if((eg.collisionMask&eb.collisionGroup)!=0){ee=(eb.collisionMask&eg.collisionGroup)!=0}else{ee=false}}else{ee=true}if(ee){if(ea){if(b7.containTest(em,el.shape)){ej.push(el.shape.outer)}}else{if(b7.testCollide_safe(el.shape,em)){ej.push(el.shape.outer)}}}}else{if(el.child1!=null){this.treeStack.add(el.child1)}if(el.child2!=null){this.treeStack.add(el.child2)}}}}}return ej};cT.prototype.bodiesInShape=function(eg,eo,ee,ec){this.sync_broadphase();this.validateShape(eg);var eq=eg.aabb;var er=ec==null?new a5():ec;if(this.failed==null){this.failed=new a5()}if(this.stree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.stree.root);while(this.treeStack.head!=null){var ei=this.treeStack.pop_unsafe();var ej=ei.aabb;if(eq.miny<=ej.maxy&&ej.miny<=eq.maxy&&eq.minx<=ej.maxx&&ej.minx<=eq.maxx){if(ei.child1==null){var ed=ei.shape.body.outer;var ep;if(ee!=null){var em=ei.shape.filter;if((em.collisionMask&ee.collisionGroup)!=0){ep=(ee.collisionMask&em.collisionGroup)!=0}else{ep=false}}else{ep=true}if(ep){if(eo){if(!this.failed.has(ed)){var eb=b7.containTest(eg,ei.shape);if(!er.has(ed)&&eb){er.push(ed)}else{if(!eb){er.remove(ed);this.failed.push(ed)}}}}else{if(!er.has(ed)&&b7.testCollide_safe(ei.shape,eg)){er.push(ed)}}}}else{if(ei.child1!=null){this.treeStack.add(ei.child1)}if(ei.child2!=null){this.treeStack.add(ei.child2)}}}}}if(this.dtree.root!=null){if(this.treeStack==null){this.treeStack=new ai()}this.treeStack.add(this.dtree.root);while(this.treeStack.head!=null){var ea=this.treeStack.pop_unsafe();var el=ea.aabb;if(eq.miny<=el.maxy&&el.miny<=eq.maxy&&eq.minx<=el.maxx&&el.minx<=eq.maxx){if(ea.child1==null){var ef=ea.shape.body.outer;var eh;if(ee!=null){var ek=ea.shape.filter;if((ek.collisionMask&ee.collisionGroup)!=0){eh=(ee.collisionMask&ek.collisionGroup)!=0}else{eh=false}}else{eh=true}if(eh){if(eo){if(!this.failed.has(ef)){var en=b7.containTest(eg,ea.shape);if(!er.has(ef)&&en){er.push(ef)}else{if(!en){er.remove(ef);this.failed.push(ef)}}}}else{if(!er.has(ef)&&b7.testCollide_safe(ea.shape,eg)){er.push(ef)}}}}else{if(ea.child1!=null){this.treeStack.add(ea.child1)}if(ea.child2!=null){this.treeStack.add(ea.child2)}}}}}this.failed.clear();return er};cT.prototype.openlist=null;cT.prototype.rayCast=function(en,eF,em){if(this.openlist==null){this.openlist=new ai()}this.sync_broadphase();en.validate_dir();var eh=en.maxdist;if(this.dtree.root!=null){if(en.aabbtest(this.dtree.root.aabb)){var eo=en.aabbsect(this.dtree.root.aabb);if(eo>=0&&eo=0&&ek=eh){break}if(ex.child1==null){var ec=ex.shape;var eC;if(em!=null){var ez=ec.filter;if((ez.collisionMask&em.collisionGroup)!=0){eC=(em.collisionMask&ez.collisionGroup)!=0}else{eC=false}}else{eC=true}if(eC){var el=ec.type==0?en.circlesect(ec.circle,eF,eh):en.aabbtest(ec.aabb)?en.polysect(ec.polygon,eF,eh):null;if(el!=null){eh=el.zpp_inner.toiDistance;if(ep!=null){ep.zpp_inner.free()}ep=el}}}else{if(ex.child1!=null){if(en.aabbtest(ex.child1.aabb)){var ej=en.aabbsect(ex.child1.aabb);if(ej>=0&&ej=0&&ei=Infinity;var ej=ec==null?new aa():ec;if(this.dtree.root!=null){if(el.aabbtest(this.dtree.root.aabb)){if(eb){this.openlist.add(this.dtree.root)}else{var em=el.aabbsect(this.dtree.root.aabb);if(em>=0&&em=0&&eg=0&&ef=0&&ed0&&ea.next!=null){this.erase(ea)}return ea.next};cW.prototype.clear=function(){};cW.prototype.inlined_clear=function(){};cW.prototype.reverse=function(){var ec=this.next;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.next=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};cW.prototype.empty=function(){return this.next==null};cW.prototype.size=function(){return this.length};cW.prototype.has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};cW.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};cW.prototype.front=function(){return this.next};cW.prototype.back=function(){var ea=this.next;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea};cW.prototype.iterator_at=function(eb){var ea=this.next;while(eb-->0&&ea!=null){ea=ea.next}return ea};cW.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea}else{return null}};cW.prototype.comps=null;cW.prototype.sleep=null;cW.prototype.waket=null;cW.prototype.free=function(){};cW.prototype.alloc=function(){this.waket=0};cW.prototype.__class__=cW;var bx=zpp_nape.space.ZPP_Component=function(){this.woken=false;this.waket=0;this.sleeping=false;this.island=null;this.constraint=null;this.body=null;this.isBody=false;this.rank=0;this.parent=null;this.next=null;this.sleeping=false;this.island=null;this.parent=this;this.rank=0;this.woken=false};bx.__name__=["zpp_nape","space","ZPP_Component"];bx.prototype.next=null;bx.prototype.parent=null;bx.prototype.rank=null;bx.prototype.isBody=null;bx.prototype.body=null;bx.prototype.constraint=null;bx.prototype.island=null;bx.prototype.sleeping=null;bx.prototype.waket=null;bx.prototype.woken=null;bx.prototype.free=function(){this.body=null;this.constraint=null};bx.prototype.alloc=function(){};bx.prototype.reset=function(){this.sleeping=false;this.island=null;this.parent=this;this.rank=0};bx.prototype.__class__=bx;var cg=zpp_nape.space.ZPP_CallbackSet=function(){this.lazydel=false;this.freed=false;this.length=0;this.pushmod=false;this.modified=false;this._inuse=false;this.next=null;this.int2=null;this.int1=null;this.di=0;this.id=0;this.arbiters=new h()};cg.__name__=["zpp_nape","space","ZPP_CallbackSet"];cg.get=function(ec,eb){var ea;if(cg.zpp_pool==null){ea=new cg()}else{ea=cg.zpp_pool;cg.zpp_pool=ea.next;ea.next=null}ea.freed=false;ea.lazydel=false;ea.COLLISIONstate=1;ea.COLLISIONstamp=0;ea.SENSORstate=1;ea.SENSORstamp=0;ea.FLUIDstate=1;ea.FLUIDstamp=0;if(ec.id0&&ea.next!=null){this.erase(ea)}return ea.next};cg.prototype.clear=function(){};cg.prototype.inlined_clear=function(){};cg.prototype.reverse=function(){var ec=this.next;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.next=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};cg.prototype.empty=function(){return this.next==null};cg.prototype.size=function(){return this.length};cg.prototype.has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};cg.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.next;while(eb!=null){if(eb==ec){ea=true;break}eb=eb.next}return ea};cg.prototype.front=function(){return this.next};cg.prototype.back=function(){var ea=this.next;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea};cg.prototype.iterator_at=function(eb){var ea=this.next;while(eb-->0&&ea!=null){ea=ea.next}return ea};cg.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea}else{return null}};cg.prototype.freed=null;cg.prototype.lazydel=null;cg.prototype.free=function(){this.int1=this.int2=null;this.id=this.di=-1;this.freed=true};cg.prototype.alloc=function(){this.freed=false;this.lazydel=false;this.COLLISIONstate=1;this.COLLISIONstamp=0;this.SENSORstate=1;this.SENSORstamp=0;this.FLUIDstate=1;this.FLUIDstamp=0};cg.prototype.add_arb=function(ea){var ec;ec=false;var ed=this.arbiters.head;while(ed!=null){if(ed.elt==ea){ec=true;break}ed=ed.next}if(!ec){var ef=this.arbiters;var ee;if(dL.zpp_pool==null){ee=new dL()}else{ee=dL.zpp_pool;dL.zpp_pool=ee.next;ee.next=null}ee.elt=ea;var eb=ee;eb.next=ef.head;ef.head=eb;ef.modified=true;ef.length++;return true}else{return false}};cg.prototype.try_remove_arb=function(ea){var eh=this.arbiters;var ee=null;var eg=eh.head;var ec=false;while(eg!=null){if(eg.elt==ea){var eb;var ed;if(ee==null){eb=eh.head;ed=eb.next;eh.head=ed;if(eh.head==null){eh.pushmod=true}}else{eb=ee.next;ed=eb.next;ee.next=ed;if(ed==null){eh.pushmod=true}}var ef=eb;ef.elt=null;ef.next=dL.zpp_pool;dL.zpp_pool=ef;eh.modified=true;eh.length--;eh.pushmod=true;ec=true;break}ee=eg;eg=eg.next}return ec};cg.prototype.remove_arb=function(ea){var eg=this.arbiters;var ed=null;var ef=eg.head;while(ef!=null){if(ef.elt==ea){var eb;var ec;if(ed==null){eb=eg.head;ec=eb.next;eg.head=ec;if(eg.head==null){eg.pushmod=true}}else{eb=ed.next;ec=eb.next;ed.next=ec;if(ec==null){eg.pushmod=true}}var ee=eb;ee.elt=null;ee.next=dL.zpp_pool;dL.zpp_pool=ee;eg.modified=true;eg.length--;eg.pushmod=true;break}ed=ef;ef=ef.next}};cg.prototype.empty_arb=function(eb){var ec;ec=true;var ea=this.arbiters.head;while(ea!=null){if((ea.elt.type&eb)==0){ea=ea.next;continue}else{ec=false;break}}return ec};cg.prototype.really_empty=function(){return this.arbiters.head==null};cg.prototype.sleeping=function(){var ea;ea=true;var eb=this.arbiters.head;while(eb!=null){if(eb.elt.sleeping){eb=eb.next;continue}else{ea=false;break}}return ea};cg.prototype.__class__=cg;var M=zpp_nape.space.ZPP_CbSetManager=function(ea){this.space=null;this.cbsets=null;if(dT.zpp_pool==null){this.cbsets=new dT()}else{this.cbsets=dT.zpp_pool;dT.zpp_pool=this.cbsets.next;this.cbsets.next=null}this.cbsets.lt=cC.setlt;this.space=ea};M.__name__=["zpp_nape","space","ZPP_CbSetManager"];M.prototype.cbsets=null;M.prototype.space=null;M.prototype.get=function(ee){if(ee.head==null){return null}var ea;if(cC.zpp_pool==null){ea=new cC()}else{ea=cC.zpp_pool;cC.zpp_pool=ea.next;ea.next=null}var eb=ea.cbTypes;ea.cbTypes=ee;var ed=this.cbsets.find_weak(ea);var ec;if(ed!=null){ec=ed.data}else{var eg=cC.get(ee);this.cbsets.insert(eg);eg.manager=this;ec=eg}ea.cbTypes=eb;var ef=ea;ef.listeners.clear();ef.zip_listeners=true;ef.bodylisteners.clear();ef.zip_bodylisteners=true;ef.conlisteners.clear();ef.zip_conlisteners=true;while(ef.cbTypes.head!=null){ef.cbTypes.pop_unsafe().cbsets.remove(ef)}ef.next=cC.zpp_pool;cC.zpp_pool=ef;return ec};M.prototype.remove=function(eb){this.cbsets.remove(eb);while(eb.cbpairs.head!=null){var ea=eb.cbpairs.pop_unsafe();if(ea.a!=ea.b){if(eb==ea.a){ea.b.cbpairs.remove(ea)}else{ea.a.cbpairs.remove(ea)}}ea.a=ea.b=null;ea.listeners.clear();ea.next=ar.zpp_pool;ar.zpp_pool=ea}eb.manager=null};M.prototype.clear=function(){};M.prototype.validate=function(){if(!this.cbsets.empty()){var ea=this.cbsets.parent;while(ea.prev!=null){ea=ea.prev}while(ea!=null){ea.data.validate();if(ea.next!=null){ea=ea.next;while(ea.prev!=null){ea=ea.prev}}else{while(ea.parent!=null&&ea==ea.parent.next){ea=ea.parent}ea=ea.parent}}}};M.prototype.pair=function(eb,ea){var ec=null;var ed=(eb.cbpairs.length0.0001){ez.axisx=Math.sin(ez.rot);ez.axisy=Math.cos(ez.rot)}else{var ft=ev*ev;var eY=1-0.5*ft;var fa=1-ft*ft/8;var fv=(eY*ez.axisx+ev*ez.axisy)*fa;ez.axisy=(eY*ez.axisy-ev*ez.axisx)*fa;ez.axisx=fv}}}var fT=ez.posx;var fQ=ez.posy;eC.validate_sweepRadius();var er=eC.sweepRadius;var ei;if(bT.zpp_pool==null){ei=new bT()}else{ei=bT.zpp_pool;bT.zpp_pool=ei.next;ei.next=null}ei.minx=(eIfT?eI:fT)+er;ei.miny=(eGfQ?eG:fQ)+er;var eB=this.convexShapeList=this.bphase.shapesInAABB(ei,false,false,eF==null?null:eF.zpp_inner,this.convexShapeList);var e6=ei;if(e6.outer!=null){e6.outer.zpp_inner=null;e6.outer=null}e6.wrap_min=e6.wrap_max=null;e6._invalidate=null;e6._validate=null;e6.next=bT.zpp_pool;bT.zpp_pool=e6;var fE=0;var fB=0;fE=0;fB=0;var fu=0;var fr=0;fu=0;fr=0;var eq=null;var eo=et+1;eB.zpp_inner.valmod();var ec=bC.get(eB);while(true){ec.zpp_inner.zpp_inner.valmod();var e7=ec.zpp_inner;e7.zpp_inner.valmod();if(e7.zpp_inner.zip_length){e7.zpp_inner.zip_length=false;e7.zpp_inner.user_length=e7.zpp_inner.inner.length}var em=e7.zpp_inner.user_length;ec.zpp_critical=true;var ek;if(ec.zpp_i0.0001){eZ.axisx=Math.sin(eZ.rot);eZ.axisy=Math.cos(eZ.rot)}else{var fn=ep*ep;var fz=1-0.5*fn;var ee=1-fn*fn/8;var f1=(fz*eZ.axisx+ep*eZ.axisy)*ee;eZ.axisy=(fz*eZ.axisy-ep*eZ.axisx)*ee;eZ.axisx=f1}}}var eX=(eU.zpp_inner.body!=null?eU.zpp_inner.body.outer:null).zpp_inner;var ej=eU.zpp_inner;if(ej.type==0){ej.worldCOMx=eX.posx+(eX.axisy*ej.localCOMx-eX.axisx*ej.localCOMy);ej.worldCOMy=eX.posy+(ej.localCOMx*eX.axisx+ej.localCOMy*eX.axisy)}else{var fy=ej.polygon;var eE=fy.lverts.next;var fK=fy.gverts.next;while(fK!=null){var eb=fK;var ey=eE;eE=eE.next;eb.x=eX.posx+(eX.axisy*ey.x-eX.axisx*ey.y);eb.y=eX.posy+(ey.x*eX.axisx+ey.y*eX.axisy);fK=fK.next}var fi=fy.edges.head;var fI=fy.gverts.next;var fX=fI;fI=fI.next;while(fI!=null){var fH=fI;var eL=fi.elt;fi=fi.next;eL.gnormx=eX.axisy*eL.lnormx-eX.axisx*eL.lnormy;eL.gnormy=eL.lnormx*eX.axisx+eL.lnormy*eX.axisy;eL.gprojection=eX.posx*eL.gnormx+eX.posy*eL.gnormy+eL.lprojection;eL.tp0=fX.y*eL.gnormx-fX.x*eL.gnormy;eL.tp1=fH.y*eL.gnormx-fH.x*eL.gnormy;fX=fH;fI=fI.next}var fG=fy.gverts.next;var eK=fi.elt;eK.gnormx=eX.axisy*eK.lnormx-eX.axisx*eK.lnormy;eK.gnormy=eK.lnormx*eX.axisx+eK.lnormy*eX.axisy;eK.gprojection=eX.posx*eK.gnormx+eX.posy*eK.gnormy+eK.lprojection;eK.tp0=fX.y*eK.gnormx-fX.x*eK.gnormy;eK.tp1=fG.y*eK.gnormx-fG.x*eK.gnormy}}else{de.staticSweep(fZ,et,0,0)}fZ.toi*=et;if(fZ.toi>0&&fZ.toi0.0001){ez.axisx=Math.sin(ez.rot);ez.axisy=Math.cos(ez.rot)}else{var fl=en*en;var fx=1-0.5*fl;var ed=1-fl*fl/8;var f0=(fx*ez.axisx+en*ez.axisy)*ed;ez.axisy=(fx*ez.axisy-en*ez.axisx)*ed;ez.axisx=f0}}}if(eC.type==0){eC.worldCOMx=ez.posx+(ez.axisy*eC.localCOMx-ez.axisx*eC.localCOMy);eC.worldCOMy=ez.posy+(eC.localCOMx*ez.axisx+eC.localCOMy*ez.axisy)}else{var fw=eC.polygon;var eD=fw.lverts.next;var fF=fw.gverts.next;while(fF!=null){var ea=fF;var ex=eD;eD=eD.next;ea.x=ez.posx+(ez.axisy*ex.x-ez.axisx*ex.y);ea.y=ez.posy+(ex.x*ez.axisx+ex.y*ez.axisy);fF=fF.next}var fh=fw.edges.head;var fD=fw.gverts.next;var fW=fD;fD=fD.next;while(fD!=null){var fC=fD;var eJ=fh.elt;fh=fh.next;eJ.gnormx=ez.axisy*eJ.lnormx-ez.axisx*eJ.lnormy;eJ.gnormy=eJ.lnormx*ez.axisx+eJ.lnormy*ez.axisy;eJ.gprojection=ez.posx*eJ.gnormx+ez.posy*eJ.gnormy+eJ.lprojection;eJ.tp0=fW.y*eJ.gnormx-fW.x*eJ.gnormy;eJ.tp1=fC.y*eJ.gnormx-fC.x*eJ.gnormy;fW=fC;fD=fD.next}var fA=fw.gverts.next;var eH=fh.elt;eH.gnormx=ez.axisy*eH.lnormx-ez.axisx*eH.lnormy;eH.gnormy=eH.lnormx*ez.axisx+eH.lnormy*ez.axisy;eH.gprojection=ez.posx*eH.gnormx+ez.posy*eH.gnormy+eH.lprojection;eH.tp0=fW.y*eH.gnormx-fW.x*eH.gnormy;eH.tp1=fA.y*eH.gnormx-fA.x*eH.gnormy}if(eo<=et){var eP=-fE;var eO=-fB;var e0;if(au.poolVec2==null){e0=new r()}else{e0=au.poolVec2;au.poolVec2=e0.zpp_pool;e0.zpp_pool=null}if(e0.zpp_inner==null){var fR;if(bB.zpp_pool==null){fR=new bB()}else{fR=bB.zpp_pool;bB.zpp_pool=fR.next;fR.next=null}fR.weak=false;fR._immutable=false;fR.x=eP;fR.y=eO;e0.zpp_inner=fR;e0.zpp_inner.outer=e0}else{var ew;var eW=e0.zpp_inner;if(eW._validate!=null){eW._validate()}if(e0.zpp_inner.x==eP){var fs=e0.zpp_inner;if(fs._validate!=null){fs._validate()}ew=e0.zpp_inner.y==eO}else{ew=false}if(!ew){e0.zpp_inner.x=eP;e0.zpp_inner.y=eO;var fq=e0.zpp_inner;if(fq._invalidate!=null){fq._invalidate(fq)}}}e0.zpp_inner.weak=false;var eu=e0;var fP;if(au.poolVec2==null){fP=new r()}else{fP=au.poolVec2;au.poolVec2=fP.zpp_pool;fP.zpp_pool=null}if(fP.zpp_inner==null){var fO;if(bB.zpp_pool==null){fO=new bB()}else{fO=bB.zpp_pool;bB.zpp_pool=fO.next;fO.next=null}fO.weak=false;fO._immutable=false;fO.x=fu;fO.y=fr;fP.zpp_inner=fO;fP.zpp_inner.outer=fP}else{var es;var fp=fP.zpp_inner;if(fp._validate!=null){fp._validate()}if(fP.zpp_inner.x==fu){var fo=fP.zpp_inner;if(fo._validate!=null){fo._validate()}es=fP.zpp_inner.y==fr}else{es=false}if(!es){fP.zpp_inner.x=fu;fP.zpp_inner.y=fr;var fm=fP.zpp_inner;if(fm._invalidate!=null){fm._invalidate(fm)}}}fP.zpp_inner.weak=false;return a4.getConvex(eu,fP,eo,eq)}else{return null}};a3.prototype.prepareCast=function(en){if(en.type==0){var es=en.circle;if(es.zip_worldCOM){if(es.body!=null){es.zip_worldCOM=false;if(es.zip_localCOM){es.zip_localCOM=false;if(es.type==1){var ez=es.polygon;if(ez.lverts.next.next==null){ez.localCOMx=ez.lverts.next.x;ez.localCOMy=ez.lverts.next.y}else{if(ez.lverts.next.next.next==null){ez.localCOMx=ez.lverts.next.x;ez.localCOMy=ez.lverts.next.y;ez.localCOMx+=ez.lverts.next.next.x;ez.localCOMy+=ez.lverts.next.next.y;ez.localCOMx*=0.5;ez.localCOMy*=0.5}else{ez.localCOMx=0;ez.localCOMy=0;var eA=0;var er=ez.lverts.next;var ej=er;er=er.next;var ei=er;er=er.next;while(er!=null){var eg=er;eA+=ei.x*(eg.y-ej.y);var em=eg.y*ei.x-eg.x*ei.y;ez.localCOMx+=(ei.x+eg.x)*em;ez.localCOMy+=(ei.y+eg.y)*em;ej=ei;ei=eg;er=er.next}er=ez.lverts.next;var eh=er;eA+=ei.x*(eh.y-ej.y);var ee=eh.y*ei.x-eh.x*ei.y;ez.localCOMx+=(ei.x+eh.x)*ee;ez.localCOMy+=(ei.y+eh.y)*ee;ej=ei;er=er.next;var ef=er;eA+=eh.x*(ef.y-ej.y);var ed=ef.y*eh.x-ef.x*eh.y;ez.localCOMx+=(eh.x+ef.x)*ed;ez.localCOMy+=(eh.y+ef.y)*ed;eA=1/(3*eA);var el=eA;ez.localCOMx*=el;ez.localCOMy*=el}}}if(es.wrap_localCOM!=null){es.wrap_localCOM.zpp_inner.x=es.localCOMx;es.wrap_localCOM.zpp_inner.y=es.localCOMy}}var ey=es.body;if(ey.zip_axis){ey.zip_axis=false;ey.axisx=Math.sin(ey.rot);ey.axisy=Math.cos(ey.rot)}es.worldCOMx=es.body.posx+(es.body.axisy*es.localCOMx-es.body.axisx*es.localCOMy);es.worldCOMy=es.body.posy+(es.localCOMx*es.body.axisx+es.localCOMy*es.body.axisy)}}}else{var ew=en.polygon;if(ew.zip_gaxi){if(ew.body!=null){ew.zip_gaxi=false;ew.validate_laxi();var eu=ew.body;if(eu.zip_axis){eu.zip_axis=false;eu.axisx=Math.sin(eu.rot);eu.axisy=Math.cos(eu.rot)}if(ew.zip_gverts){if(ew.body!=null){ew.zip_gverts=false;ew.validate_lverts();var et=ew.body;if(et.zip_axis){et.zip_axis=false;et.axisx=Math.sin(et.rot);et.axisy=Math.cos(et.rot)}var ek=ew.lverts.next;var ep=ew.gverts.next;while(ep!=null){var ex=ep;var eq=ek;ek=ek.next;ex.x=ew.body.posx+(ew.body.axisy*eq.x-ew.body.axisx*eq.y);ex.y=ew.body.posy+(eq.x*ew.body.axisx+eq.y*ew.body.axisy);ep=ep.next}}}var ec=ew.edges.head;var eo=ew.gverts.next;var ev=eo;eo=eo.next;while(eo!=null){var ea=eo;var eB=ec.elt;ec=ec.next;eB.gp0=ev;eB.gp1=ea;eB.gnormx=ew.body.axisy*eB.lnormx-ew.body.axisx*eB.lnormy;eB.gnormy=eB.lnormx*ew.body.axisx+eB.lnormy*ew.body.axisy;eB.gprojection=ew.body.posx*eB.gnormx+ew.body.posy*eB.gnormy+eB.lprojection;if(eB.wrap_gnorm!=null){eB.wrap_gnorm.zpp_inner.x=eB.gnormx;eB.wrap_gnorm.zpp_inner.y=eB.gnormy}eB.tp0=eB.gp0.y*eB.gnormx-eB.gp0.x*eB.gnormy;eB.tp1=eB.gp1.y*eB.gnormx-eB.gp1.x*eB.gnormy;ev=ea;eo=eo.next}var eb=ec.elt;eb.gp0=ev;eb.gp1=ew.gverts.next;eb.gnormx=ew.body.axisy*eb.lnormx-ew.body.axisx*eb.lnormy;eb.gnormy=eb.lnormx*ew.body.axisx+eb.lnormy*ew.body.axisy;eb.gprojection=ew.body.posx*eb.gnormx+ew.body.posy*eb.gnormy+eb.lprojection;if(eb.wrap_gnorm!=null){eb.wrap_gnorm.zpp_inner.x=eb.gnormx;eb.wrap_gnorm.zpp_inner.y=eb.gnormy}eb.tp0=eb.gp0.y*eb.gnormx-eb.gp0.x*eb.gnormy;eb.tp1=eb.gp1.y*eb.gnormx-eb.gp1.x*eb.gnormy}}}};a3.prototype.convexMultiCast=function(eD,es,eG,f6,ew){var f3;if(ct.zpp_pool==null){f3=new ct()}else{f3=ct.zpp_pool;ct.zpp_pool=f3.next;f3.next=null}f3.failed=false;f3.s1=f3.s2=null;f3.arbiter=null;if(eD.type==0){var eA=eD.circle;if(eA.zip_worldCOM){if(eA.body!=null){eA.zip_worldCOM=false;if(eA.zip_localCOM){eA.zip_localCOM=false;if(eA.type==1){var fi=eA.polygon;if(fi.lverts.next.next==null){fi.localCOMx=fi.lverts.next.x;fi.localCOMy=fi.lverts.next.y}else{if(fi.lverts.next.next.next==null){fi.localCOMx=fi.lverts.next.x;fi.localCOMy=fi.lverts.next.y;fi.localCOMx+=fi.lverts.next.next.x;fi.localCOMy+=fi.lverts.next.next.y;fi.localCOMx*=0.5;fi.localCOMy*=0.5}else{fi.localCOMx=0;fi.localCOMy=0;var ef=0;var fP=fi.lverts.next;var eT=fP;fP=fP.next;var eS=fP;fP=fP.next;while(fP!=null){var eR=fP;ef+=eS.x*(eR.y-eT.y);var eW=eR.y*eS.x-eR.x*eS.y;fi.localCOMx+=(eS.x+eR.x)*eW;fi.localCOMy+=(eS.y+eR.y)*eW;eT=eS;eS=eR;fP=fP.next}fP=fi.lverts.next;var fe=fP;ef+=eS.x*(fe.y-eT.y);var el=fe.y*eS.x-fe.x*eS.y;fi.localCOMx+=(eS.x+fe.x)*el;fi.localCOMy+=(eS.y+fe.y)*el;eT=eS;fP=fP.next;var fb=fP;ef+=fe.x*(fb.y-eT.y);var eh=fb.y*fe.x-fb.x*fe.y;fi.localCOMx+=(fe.x+fb.x)*eh;fi.localCOMy+=(fe.y+fb.y)*eh;ef=1/(3*ef);var eU=ef;fi.localCOMx*=eU;fi.localCOMy*=eU}}}if(eA.wrap_localCOM!=null){eA.wrap_localCOM.zpp_inner.x=eA.localCOMx;eA.wrap_localCOM.zpp_inner.y=eA.localCOMy}}var fh=eA.body;if(fh.zip_axis){fh.zip_axis=false;fh.axisx=Math.sin(fh.rot);fh.axisy=Math.cos(fh.rot)}eA.worldCOMx=eA.body.posx+(eA.body.axisy*eA.localCOMx-eA.body.axisx*eA.localCOMy);eA.worldCOMy=eA.body.posy+(eA.localCOMx*eA.body.axisx+eA.localCOMy*eA.body.axisy)}}}else{var fg=eD.polygon;if(fg.zip_gaxi){if(fg.body!=null){fg.zip_gaxi=false;fg.validate_laxi();var fd=fg.body;if(fd.zip_axis){fd.zip_axis=false;fd.axisx=Math.sin(fd.rot);fd.axisy=Math.cos(fd.rot)}if(fg.zip_gverts){if(fg.body!=null){fg.zip_gverts=false;fg.validate_lverts();var fa=fg.body;if(fa.zip_axis){fa.zip_axis=false;fa.axisx=Math.sin(fa.rot);fa.axisy=Math.cos(fa.rot)}var f7=fg.lverts.next;var fO=fg.gverts.next;while(fO!=null){var fm=fO;var ff=f7;f7=f7.next;fm.x=fg.body.posx+(fg.body.axisy*ff.x-fg.body.axisx*ff.y);fm.y=fg.body.posy+(ff.x*fg.body.axisx+ff.y*fg.body.axisy);fO=fO.next}}}var eN=fg.edges.head;var fN=fg.gverts.next;var f2=fN;fN=fN.next;while(fN!=null){var fL=fN;var fn=eN.elt;eN=eN.next;fn.gp0=f2;fn.gp1=fL;fn.gnormx=fg.body.axisy*fn.lnormx-fg.body.axisx*fn.lnormy;fn.gnormy=fn.lnormx*fg.body.axisx+fn.lnormy*fg.body.axisy;fn.gprojection=fg.body.posx*fn.gnormx+fg.body.posy*fn.gnormy+fn.lprojection;if(fn.wrap_gnorm!=null){fn.wrap_gnorm.zpp_inner.x=fn.gnormx;fn.wrap_gnorm.zpp_inner.y=fn.gnormy}fn.tp0=fn.gp0.y*fn.gnormx-fn.gp0.x*fn.gnormy;fn.tp1=fn.gp1.y*fn.gnormx-fn.gp1.x*fn.gnormy;f2=fL;fN=fN.next}var eO=eN.elt;eO.gp0=f2;eO.gp1=fg.gverts.next;eO.gnormx=fg.body.axisy*eO.lnormx-fg.body.axisx*eO.lnormy;eO.gnormy=eO.lnormx*fg.body.axisx+eO.lnormy*fg.body.axisy;eO.gprojection=fg.body.posx*eO.gnormx+fg.body.posy*eO.gnormy+eO.lprojection;if(eO.wrap_gnorm!=null){eO.wrap_gnorm.zpp_inner.x=eO.gnormx;eO.wrap_gnorm.zpp_inner.y=eO.gnormy}eO.tp0=eO.gp0.y*eO.gnormx-eO.gp0.x*eO.gnormy;eO.tp1=eO.gp1.y*eO.gnormx-eO.gp1.x*eO.gnormy}}}var ey=eD.body;var eJ=ey.posx;var eH=ey.posy;ey.sweepTime=0;ey.sweep_angvel=ey.angvel;var eg=es-ey.sweepTime;if(eg!=0){ey.sweepTime=es;ey.posx+=ey.velx*eg;ey.posy+=ey.vely*eg;if(ey.angvel!=0){var eu=ey.sweep_angvel*eg;ey.rot+=eu;if(eu*eu>0.0001){ey.axisx=Math.sin(ey.rot);ey.axisy=Math.cos(ey.rot)}else{var fw=eu*eu;var eZ=1-0.5*fw;var fc=1-fw*fw/8;var fx=(eZ*ey.axisx+eu*ey.axisy)*fc;ey.axisy=(eZ*ey.axisy-eu*ey.axisx)*fc;ey.axisx=fx}}}var fX=ey.posx;var fU=ey.posy;eD.validate_sweepRadius();var eq=eD.sweepRadius;var ei;if(bT.zpp_pool==null){ei=new bT()}else{ei=bT.zpp_pool;bT.zpp_pool=ei.next;ei.next=null}ei.minx=(eJfX?eJ:fX)+eq;ei.miny=(eHfU?eH:fU)+eq;var eB=this.convexShapeList=this.bphase.shapesInAABB(ei,false,false,eG==null?null:eG.zpp_inner,this.convexShapeList);var e6=ei;if(e6.outer!=null){e6.outer.zpp_inner=null;e6.outer=null}e6.wrap_min=e6.wrap_max=null;e6._invalidate=null;e6._validate=null;e6.next=bT.zpp_pool;bT.zpp_pool=e6;var e8=ew==null?new cs():ew;eB.zpp_inner.valmod();var ec=bC.get(eB);while(true){ec.zpp_inner.zpp_inner.valmod();var e7=ec.zpp_inner;e7.zpp_inner.valmod();if(e7.zpp_inner.zip_length){e7.zpp_inner.zip_length=false;e7.zpp_inner.user_length=e7.zpp_inner.inner.length}var em=e7.zpp_inner.user_length;ec.zpp_critical=true;var ek;if(ec.zpp_i0.0001){e0.axisx=Math.sin(e0.rot);e0.axisy=Math.cos(e0.rot)}else{var fr=eo*eo;var fB=1-0.5*fr;var ee=1-fr*fr/8;var f5=(fB*e0.axisx+eo*e0.axisy)*ee;e0.axisy=(fB*e0.axisy-eo*e0.axisx)*ee;e0.axisx=f5}}}var eY=(eV.zpp_inner.body!=null?eV.zpp_inner.body.outer:null).zpp_inner;var ej=eV.zpp_inner;if(ej.type==0){ej.worldCOMx=eY.posx+(eY.axisy*ej.localCOMx-eY.axisx*ej.localCOMy);ej.worldCOMy=eY.posy+(ej.localCOMx*eY.axisx+ej.localCOMy*eY.axisy)}else{var fA=ej.polygon;var eF=fA.lverts.next;var fM=fA.gverts.next;while(fM!=null){var eb=fM;var ez=eF;eF=eF.next;eb.x=eY.posx+(eY.axisy*ez.x-eY.axisx*ez.y);eb.y=eY.posy+(ez.x*eY.axisx+ez.y*eY.axisy);fM=fM.next}var fl=fA.edges.head;var fK=fA.gverts.next;var f1=fK;fK=fK.next;while(fK!=null){var fJ=fK;var eM=fl.elt;fl=fl.next;eM.gnormx=eY.axisy*eM.lnormx-eY.axisx*eM.lnormy;eM.gnormy=eM.lnormx*eY.axisx+eM.lnormy*eY.axisy;eM.gprojection=eY.posx*eM.gnormx+eY.posy*eM.gnormy+eM.lprojection;eM.tp0=f1.y*eM.gnormx-f1.x*eM.gnormy;eM.tp1=fJ.y*eM.gnormx-fJ.x*eM.gnormy;f1=fJ;fK=fK.next}var fH=fA.gverts.next;var eL=fl.elt;eL.gnormx=eY.axisy*eL.lnormx-eY.axisx*eL.lnormy;eL.gnormy=eL.lnormx*eY.axisx+eL.lnormy*eY.axisy;eL.gprojection=eY.posx*eL.gnormx+eY.posy*eL.gnormy+eL.lprojection;eL.tp0=f1.y*eL.gnormx-f1.x*eL.gnormy;eL.tp1=fH.y*eL.gnormx-fH.x*eL.gnormy}}else{de.staticSweep(f3,es,0,0)}f3.toi*=es;if(f3.toi>0){var eQ=-f3.axis.x;var eP=-f3.axis.y;var fW;if(au.poolVec2==null){fW=new r()}else{fW=au.poolVec2;au.poolVec2=fW.zpp_pool;fW.zpp_pool=null}if(fW.zpp_inner==null){var fT;if(bB.zpp_pool==null){fT=new bB()}else{fT=bB.zpp_pool;bB.zpp_pool=fT.next;fT.next=null}fT.weak=false;fT._immutable=false;fT.x=eQ;fT.y=eP;fW.zpp_inner=fT;fW.zpp_inner.outer=fW}else{var ev;var eX=fW.zpp_inner;if(eX._validate!=null){eX._validate()}if(fW.zpp_inner.x==eQ){var fv=fW.zpp_inner;if(fv._validate!=null){fv._validate()}ev=fW.zpp_inner.y==eP}else{ev=false}if(!ev){fW.zpp_inner.x=eQ;fW.zpp_inner.y=eP;var fu=fW.zpp_inner;if(fu._invalidate!=null){fu._invalidate(fu)}}}fW.zpp_inner.weak=false;var et=fW;var eC=f3.c2.x;var ep=f3.c2.y;var fS;if(au.poolVec2==null){fS=new r()}else{fS=au.poolVec2;au.poolVec2=fS.zpp_pool;fS.zpp_pool=null}if(fS.zpp_inner==null){var fR;if(bB.zpp_pool==null){fR=new bB()}else{fR=bB.zpp_pool;bB.zpp_pool=fR.next;fR.next=null}fR.weak=false;fR._immutable=false;fR.x=eC;fR.y=ep;fS.zpp_inner=fR;fS.zpp_inner.outer=fS}else{var er;var ft=fS.zpp_inner;if(ft._validate!=null){ft._validate()}if(fS.zpp_inner.x==eC){var fs=fS.zpp_inner;if(fs._validate!=null){fs._validate()}er=fS.zpp_inner.y==ep}else{er=false}if(!er){fS.zpp_inner.x=eC;fS.zpp_inner.y=ep;var fq=fS.zpp_inner;if(fq._invalidate!=null){fq._invalidate(fq)}}}fS.zpp_inner.weak=false;var e9=a4.getConvex(et,fS,f3.toi,eV);var fk=null;var fG=e8.zpp_inner.inner.head;while(fG!=null){if(e9.zpp_inner.toiDistance0.0001){ey.axisx=Math.sin(ey.rot);ey.axisy=Math.cos(ey.rot)}else{var fo=en*en;var fz=1-0.5*fo;var ed=1-fo*fo/8;var f4=(fz*ey.axisx+en*ey.axisy)*ed;ey.axisy=(fz*ey.axisy-en*ey.axisx)*ed;ey.axisx=f4}}}if(eD.type==0){eD.worldCOMx=ey.posx+(ey.axisy*eD.localCOMx-ey.axisx*eD.localCOMy);eD.worldCOMy=ey.posy+(eD.localCOMx*ey.axisx+eD.localCOMy*ey.axisy)}else{var fy=eD.polygon;var eE=fy.lverts.next;var fF=fy.gverts.next;while(fF!=null){var ea=fF;var ex=eE;eE=eE.next;ea.x=ey.posx+(ey.axisy*ex.x-ey.axisx*ex.y);ea.y=ey.posy+(ex.x*ey.axisx+ex.y*ey.axisy);fF=fF.next}var fj=fy.edges.head;var fD=fy.gverts.next;var f0=fD;fD=fD.next;while(fD!=null){var fE=fD;var eK=fj.elt;fj=fj.next;eK.gnormx=ey.axisy*eK.lnormx-ey.axisx*eK.lnormy;eK.gnormy=eK.lnormx*ey.axisx+eK.lnormy*ey.axisy;eK.gprojection=ey.posx*eK.gnormx+ey.posy*eK.gnormy+eK.lprojection;eK.tp0=f0.y*eK.gnormx-f0.x*eK.gnormy;eK.tp1=fE.y*eK.gnormx-fE.x*eK.gnormy;f0=fE;fD=fD.next}var fC=fy.gverts.next;var eI=fj.elt;eI.gnormx=ey.axisy*eI.lnormx-ey.axisx*eI.lnormy;eI.gnormy=eI.lnormx*ey.axisx+eI.lnormy*ey.axisy;eI.gprojection=ey.posx*eI.gnormx+ey.posy*eI.gnormy+eI.lprojection;eI.tp0=f0.y*eI.gnormx-f0.x*eI.gnormy;eI.tp1=fC.y*eI.gnormx-fC.x*eI.gnormy}return e8};a3.prototype.push_callback=function(eb){var ea;if(cS.zpp_pool==null){ea=new cS()}else{ea=cS.zpp_pool;cS.zpp_pool=ea.next;ea.next=null}this.callbacks.push(ea);ea.listener=eb;return ea};a3.prototype.pre_dt=null;a3.prototype.step=function(e0,et,eG){var e9=this;this.time+=e0;this.pre_dt=e0;this.midstep=true;this.stamp++;this.validation();this.bphase.broadphase(this,true);this.prestep(e0);if(this.sortcontacts){var eE=this.c_arbiters_false;if(eE.head!=null&&eE.head.next!=null){var em=eE.head;var fe=null;var eg=null;var e3=null;var e6=null;var ev=1;var ee;var eK;var ea;while(true){ee=0;eg=em;em=null;fe=em;while(eg!=null){++ee;e3=eg;eK=0;ea=ev;while(e3!=null&&eK0||ea>0&&e3!=null){if(eK==0){e6=e3;e3=e3.next;--ea}else{if(ea==0||e3==null){e6=eg;eg=eg.next;--eK}else{if(eg.elt.active&&e3.elt.active?eg.elt.oc1.dist1)){break}}eE.head=em;eE.modified=true;eE.pushmod=true}}this.updateVel(e0);this.warmStart();this.iterateVel(et);var ei=this.kinematics.head;while(ei!=null){var eh=ei.elt;eh.pre_posx=eh.posx;eh.pre_posy=eh.posy;eh.pre_rot=eh.rot;ei=ei.next}var ez=this.live.head;while(ez!=null){var eA=ez.elt;eA.pre_posx=eA.posx;eA.pre_posy=eA.posy;eA.pre_rot=eA.rot;ez=ez.next}this.updatePos(e0);this.continuous=true;this.continuousCollisions(e0);this.continuous=false;this.iteratePos(eG);var ex=this.kinematics.head;while(ex!=null){var ey=ex.elt;var eL=!(ey.posx==ey.pre_posx&&ey.posy==ey.pre_posy);var eB=ey.pre_rot!=ey.rot;if(eL){var eu=ey.shapes.head;while(eu!=null){var eZ=eu.elt;if(eZ.type==1){eZ.polygon.invalidate_gverts();eZ.polygon.invalidate_gaxi()}eZ.invalidate_worldCOM();eu=eu.next}ey.zip_worldCOM=true}if(eB){ey.zip_axis=true;var es=ey.shapes.head;while(es!=null){var fb=es.elt;if(fb.type==1){fb.polygon.invalidate_gverts();fb.polygon.invalidate_gaxi()}fb.invalidate_worldCOM();es=es.next}ey.zip_worldCOM=true}ex=ex.next}var er=this.live.head;while(er!=null){var ew=er.elt;var ed=!(ew.posx==ew.pre_posx&&ew.posy==ew.pre_posy);var eF=ew.pre_rot!=ew.rot;if(ed){var eq=ew.shapes.head;while(eq!=null){var fa=eq.elt;if(fa.type==1){fa.polygon.invalidate_gverts();fa.polygon.invalidate_gaxi()}fa.invalidate_worldCOM();eq=eq.next}ew.zip_worldCOM=true}if(eF){ew.zip_axis=true;var ep=ew.shapes.head;while(ep!=null){var e8=ep.elt;if(e8.type==1){e8.polygon.invalidate_gverts();e8.polygon.invalidate_gaxi()}e8.invalidate_worldCOM();ep=ep.next}ew.zip_worldCOM=true}er=er.next}var eW=null;var eo=this.staticsleep.head;while(eo!=null){var fc=eo.elt;if(fc.type!=3||fc.velx==0&&fc.vely==0&&fc.angvel==0){if(fc.kinematicDelaySleep){fc.kinematicDelaySleep=false;eo=eo.next;continue}fc.component.sleeping=true;var ef=this.staticsleep;var e5;var eI;if(eW==null){e5=ef.head;eI=e5.next;ef.head=eI;if(ef.head==null){ef.pushmod=true}}else{e5=eW.next;eI=e5.next;eW.next=eI;if(eI==null){ef.pushmod=true}}var e4=e5;e4.elt=null;e4.next=bE.zpp_pool;bE.zpp_pool=e4;ef.modified=true;ef.length--;ef.pushmod=true;eo=eI;continue}eW=eo;eo=eo.next}this.doForests(e0);this.sleepArbiters();this.midstep=false;var en=null;var el=this.callbackset_list.next;while(el!=null){var eD=el;if(eD.arbiters.head==null){var eY=this.callbackset_list;var e7;var eR;if(en==null){e7=eY.next;eR=e7.next;eY.next=eR;if(eY.next==null){eY.pushmod=true}}else{e7=en.next;eR=e7.next;en.next=eR;if(eR==null){eY.pushmod=true}}e7._inuse=false;eY.modified=true;eY.length--;eY.pushmod=true;el=eR;eD.int1=eD.int2=null;eD.id=eD.di=-1;eD.freed=true;eD.next=cg.zpp_pool;cg.zpp_pool=eD;continue}var eP;eP=true;var eX=eD.arbiters.head;while(eX!=null){if(eX.elt.sleeping){eX=eX.next;continue}else{eP=false;break}}var eH=eP;var fd=eD.int1.cbSet;var eC=eD.int2.cbSet;var eO=null;var eV=(fd.cbpairs.length=0&&(fF.toi0.0001){ea.axisx=Math.sin(ea.rot);ea.axisy=Math.cos(ea.rot)}else{var f9=fy*fy;var fV=1-0.5*f9;var fX=1-f9*f9/8;var gd=(fV*ea.axisx+fy*ea.axisy)*fX;ea.axisy=(fV*ea.axisy-fy*ea.axisx)*fX;ea.axisx=gd}}}var fT=gw.s1;if(fT.type==0){fT.worldCOMx=ea.posx+(ea.axisy*fT.localCOMx-ea.axisx*fT.localCOMy);fT.worldCOMy=ea.posy+(fT.localCOMx*ea.axisx+fT.localCOMy*ea.axisy)}else{var gi=fT.polygon;var gC=gi.lverts.next;var e5=gi.gverts.next;while(e5!=null){var f2=e5;var fY=gC;gC=gC.next;f2.x=ea.posx+(ea.axisy*fY.x-ea.axisx*fY.y);f2.y=ea.posy+(fY.x*ea.axisx+fY.y*ea.axisy);e5=e5.next}var gp=gi.edges.head;var e0=gi.gverts.next;var fN=e0;e0=e0.next;while(e0!=null){var fK=e0;var f4=gp.elt;gp=gp.next;f4.gnormx=ea.axisy*f4.lnormx-ea.axisx*f4.lnormy;f4.gnormy=f4.lnormx*ea.axisx+f4.lnormy*ea.axisy;f4.gprojection=ea.posx*f4.gnormx+ea.posy*f4.gnormy+f4.lprojection;f4.tp0=fN.y*f4.gnormx-fN.x*f4.gnormy;f4.tp1=fK.y*f4.gnormx-fK.x*f4.gnormy;fN=fK;e0=e0.next}var e8=gi.gverts.next;var fR=gp.elt;fR.gnormx=ea.axisy*fR.lnormx-ea.axisx*fR.lnormy;fR.gnormy=fR.lnormx*ea.axisx+fR.lnormy*ea.axisy;fR.gprojection=ea.posx*fR.gnormx+ea.posy*fR.gnormy+fR.lprojection;fR.tp0=fN.y*fR.gnormx-fN.x*fR.gnormy;fR.tp1=e8.y*fR.gnormx-e8.x*fR.gnormy}}if(!gt.sweepFrozen){var fs=ft*fG;var fE=fs-gt.sweepTime;if(fE!=0){gt.sweepTime=fs;gt.posx+=gt.velx*fE;gt.posy+=gt.vely*fE;if(gt.angvel!=0){var f3=gt.sweep_angvel*fE;gt.rot+=f3;if(f3*f3>0.0001){gt.axisx=Math.sin(gt.rot);gt.axisy=Math.cos(gt.rot)}else{var gs=f3*f3;var gh=1-0.5*gs;var ej=1-gs*gs/8;var eF=(gh*gt.axisx+f3*gt.axisy)*ej;gt.axisy=(gh*gt.axisy-f3*gt.axisx)*ej;gt.axisx=eF}}}var fq=gw.s2;if(fq.type==0){fq.worldCOMx=gt.posx+(gt.axisy*fq.localCOMx-gt.axisx*fq.localCOMy);fq.worldCOMy=gt.posy+(fq.localCOMx*gt.axisx+fq.localCOMy*gt.axisy)}else{var gg=fq.polygon;var fa=gg.lverts.next;var eY=gg.gverts.next;while(eY!=null){var fm=eY;var ez=fa;fa=fa.next;fm.x=gt.posx+(gt.axisy*ez.x-gt.axisx*ez.y);fm.y=gt.posy+(ez.x*gt.axisx+ez.y*gt.axisy);eY=eY.next}var fb=gg.edges.head;var eW=gg.gverts.next;var ff=eW;eW=eW.next;while(eW!=null){var e7=eW;var fO=fb.elt;fb=fb.next;fO.gnormx=gt.axisy*fO.lnormx-gt.axisx*fO.lnormy;fO.gnormy=fO.lnormx*gt.axisx+fO.lnormy*gt.axisy;fO.gprojection=gt.posx*fO.gnormx+gt.posy*fO.gnormy+fO.lprojection;fO.tp0=ff.y*fO.gnormx-ff.x*fO.gnormy;fO.tp1=e7.y*fO.gnormx-e7.x*fO.gnormy;ff=e7;eW=eW.next}var e6=gg.gverts.next;var fL=fb.elt;fL.gnormx=gt.axisy*fL.lnormx-gt.axisx*fL.lnormy;fL.gnormy=fL.lnormx*gt.axisx+fL.lnormy*gt.axisy;fL.gprojection=gt.posx*fL.gnormx+gt.posy*fL.gnormy+fL.lprojection;fL.tp0=ff.y*fL.gnormx-ff.x*fL.gnormy;fL.tp1=e6.y*fL.gnormx-e6.x*fL.gnormy}}var ey=this.narrowPhase(gw.s1,gw.s2,true,gw.arbiter,true);if(ey==null){if(gw.arbiter!=null&&gw.arbiter.pair!=null){gw.arbiter.pair.arb=null;gw.arbiter.pair=null}}else{if(!this.presteparb(ey,fG,true)){if(ey.type==j.COL&&(ey.active&&(ey.immState&1)!=0)){var fv=ey.colarb;var et=fv.nx*fv.c1.jnAcc-fv.ny*fv.c1.jtAcc;var er=fv.ny*fv.c1.jnAcc+fv.nx*fv.c1.jtAcc;var fQ=fv.b1.imass;fv.b1.velx-=et*fQ;fv.b1.vely-=er*fQ;fv.b1.angvel-=fv.b1.iinertia*(er*fv.c1.r1x-et*fv.c1.r1y);var fj=fv.b2.imass;fv.b2.velx+=et*fj;fv.b2.vely+=er*fj;fv.b2.angvel+=fv.b2.iinertia*(er*fv.c1.r2x-et*fv.c1.r2y);if(fv.hc2){var eM=fv.nx*fv.c2.jnAcc-fv.ny*fv.c2.jtAcc;var eu=fv.ny*fv.c2.jnAcc+fv.nx*fv.c2.jtAcc;var fi=fv.b1.imass;fv.b1.velx-=eM*fi;fv.b1.vely-=eu*fi;fv.b1.angvel-=fv.b1.iinertia*(eu*fv.c2.r1x-eM*fv.c2.r1y);var fh=fv.b2.imass;fv.b2.velx+=eM*fh;fv.b2.vely+=eu*fh;fv.b2.angvel+=fv.b2.iinertia*(eu*fv.c2.r2x-eM*fv.c2.r2y)}fv.b2.angvel+=fv.jrAcc*fv.b2.iinertia;fv.b1.angvel-=fv.jrAcc*fv.b1.iinertia;var fg=ey.colarb;var eK;var es;var fZ;var fw;var f5;var fI;var fC=fg.k1x+fg.b2.velx-fg.c1.r2y*fg.b2.angvel-(fg.b1.velx-fg.c1.r1y*fg.b1.angvel);var fA=fg.k1y+fg.b2.vely+fg.c1.r2x*fg.b2.angvel-(fg.b1.vely+fg.c1.r1x*fg.b1.angvel);fZ=(fA*fg.nx-fC*fg.ny+fg.surfacex)*fg.c1.tMass;fw=fg.c1.friction*fg.c1.jnAcc;f5=fg.c1.jtAcc;fI=f5-fZ;if(fI>fw){fI=fw}else{if(fI<-fw){fI=-fw}}fZ=fI-f5;fg.c1.jtAcc=fI;eK=-fg.ny*fZ;es=fg.nx*fZ;fg.b2.velx+=eK*fg.b2.imass;fg.b2.vely+=es*fg.b2.imass;fg.b1.velx-=eK*fg.b1.imass;fg.b1.vely-=es*fg.b1.imass;fg.b2.angvel+=fg.rt1b*fZ*fg.b2.iinertia;fg.b1.angvel-=fg.rt1a*fZ*fg.b1.iinertia;if(fg.hc2){var fo=fg.k2x+fg.b2.velx-fg.c2.r2y*fg.b2.angvel-(fg.b1.velx-fg.c2.r1y*fg.b1.angvel);var fn=fg.k2y+fg.b2.vely+fg.c2.r2x*fg.b2.angvel-(fg.b1.vely+fg.c2.r1x*fg.b1.angvel);fZ=(fn*fg.nx-fo*fg.ny+fg.surfacex)*fg.c2.tMass;fw=fg.c2.friction*fg.c2.jnAcc;f5=fg.c2.jtAcc;fI=f5-fZ;if(fI>fw){fI=fw}else{if(fI<-fw){fI=-fw}}fZ=fI-f5;fg.c2.jtAcc=fI;eK=-fg.ny*fZ;es=fg.nx*fZ;fg.b2.velx+=eK*fg.b2.imass;fg.b2.vely+=es*fg.b2.imass;fg.b1.velx-=eK*fg.b1.imass;fg.b1.vely-=es*fg.b1.imass;fg.b2.angvel+=fg.rt2b*fZ*fg.b2.iinertia;fg.b1.angvel-=fg.rt2a*fZ*fg.b1.iinertia;fC=fg.k1x+fg.b2.velx-fg.c1.r2y*fg.b2.angvel-(fg.b1.velx-fg.c1.r1y*fg.b1.angvel);fA=fg.k1y+fg.b2.vely+fg.c1.r2x*fg.b2.angvel-(fg.b1.vely+fg.c1.r1x*fg.b1.angvel);fo=fg.k2x+fg.b2.velx-fg.c2.r2y*fg.b2.angvel-(fg.b1.velx-fg.c2.r1y*fg.b1.angvel);fn=fg.k2y+fg.b2.vely+fg.c2.r2x*fg.b2.angvel-(fg.b1.vely+fg.c2.r1x*fg.b1.angvel);var go=fg.c1.jnAcc;var gn=fg.c2.jnAcc;var gk=fC*fg.nx+fA*fg.ny+fg.surfacey+fg.c1.bounce-(fg.Ka*go+fg.Kb*gn);var gj=fo*fg.nx+fn*fg.ny+fg.surfacey+fg.c2.bounce-(fg.Kb*go+fg.Kc*gn);var gy=-(fg.kMassa*gk+fg.kMassb*gj);var gx=-(fg.kMassb*gk+fg.kMassc*gj);if(gy>=0&&gx>=0){gk=gy-go;gj=gx-gn;fg.c1.jnAcc=gy;fg.c2.jnAcc=gx}else{gy=-fg.c1.nMass*gk;if(gy>=0&&fg.Kb*gy+gj>=0){gk=gy-go;gj=-gn;fg.c1.jnAcc=gy;fg.c2.jnAcc=0}else{gx=-fg.c2.nMass*gj;if(gx>=0&&fg.Kb*gx+gk>=0){gk=-go;gj=gx-gn;fg.c1.jnAcc=0;fg.c2.jnAcc=gx}else{if(gk>=0&&gj>=0){gk=-go;gj=-gn;fg.c1.jnAcc=fg.c2.jnAcc=0}else{gk=0;gj=0}}}}fZ=gk+gj;eK=fg.nx*fZ;es=fg.ny*fZ;fg.b2.velx+=eK*fg.b2.imass;fg.b2.vely+=es*fg.b2.imass;fg.b1.velx-=eK*fg.b1.imass;fg.b1.vely-=es*fg.b1.imass;fg.b2.angvel+=(fg.rn1b*gk+fg.rn2b*gj)*fg.b2.iinertia;fg.b1.angvel-=(fg.rn1a*gk+fg.rn2a*gj)*fg.b1.iinertia}else{if(fg.radius!=0){fZ=(fg.b2.angvel-fg.b1.angvel)*fg.rMass;fw=fg.rfric*fg.c1.jnAcc;f5=fg.jrAcc;fg.jrAcc-=fZ;if(fg.jrAcc>fw){fg.jrAcc=fw}else{if(fg.jrAcc<-fw){fg.jrAcc=-fw}}fZ=fg.jrAcc-f5;fg.b2.angvel+=fZ*fg.b2.iinertia;fg.b1.angvel-=fZ*fg.b1.iinertia}fC=fg.k1x+fg.b2.velx-fg.c1.r2y*fg.b2.angvel-(fg.b1.velx-fg.c1.r1y*fg.b1.angvel);fA=fg.k1y+fg.b2.vely+fg.c1.r2x*fg.b2.angvel-(fg.b1.vely+fg.c1.r1x*fg.b1.angvel);fZ=(fg.c1.bounce+(fg.nx*fC+fg.ny*fA)+fg.surfacey)*fg.c1.nMass;f5=fg.c1.jnAcc;fI=f5-fZ;if(fI<0){fI=0}fZ=fI-f5;fg.c1.jnAcc=fI;eK=fg.nx*fZ;es=fg.ny*fZ;fg.b2.velx+=eK*fg.b2.imass;fg.b2.vely+=es*fg.b2.imass;fg.b1.velx-=eK*fg.b1.imass;fg.b1.vely-=es*fg.b1.imass;fg.b2.angvel+=fg.rn1b*fZ*fg.b2.iinertia;fg.b1.angvel-=fg.rn1a*fZ*fg.b1.iinertia}var fe=ey.colarb;var eJ;var eq;var e4;var fu;var ed;var eG;var gc=fe.k1x+fe.b2.velx-fe.c1.r2y*fe.b2.angvel-(fe.b1.velx-fe.c1.r1y*fe.b1.angvel);var fU=fe.k1y+fe.b2.vely+fe.c1.r2x*fe.b2.angvel-(fe.b1.vely+fe.c1.r1x*fe.b1.angvel);e4=(fU*fe.nx-gc*fe.ny+fe.surfacex)*fe.c1.tMass;fu=fe.c1.friction*fe.c1.jnAcc;ed=fe.c1.jtAcc;eG=ed-e4;if(eG>fu){eG=fu}else{if(eG<-fu){eG=-fu}}e4=eG-ed;fe.c1.jtAcc=eG;eJ=-fe.ny*e4;eq=fe.nx*e4;fe.b2.velx+=eJ*fe.b2.imass;fe.b2.vely+=eq*fe.b2.imass;fe.b1.velx-=eJ*fe.b1.imass;fe.b1.vely-=eq*fe.b1.imass;fe.b2.angvel+=fe.rt1b*e4*fe.b2.iinertia;fe.b1.angvel-=fe.rt1a*e4*fe.b1.iinertia;if(fe.hc2){var eT=fe.k2x+fe.b2.velx-fe.c2.r2y*fe.b2.angvel-(fe.b1.velx-fe.c2.r1y*fe.b1.angvel);var eO=fe.k2y+fe.b2.vely+fe.c2.r2x*fe.b2.angvel-(fe.b1.vely+fe.c2.r1x*fe.b1.angvel);e4=(eO*fe.nx-eT*fe.ny+fe.surfacex)*fe.c2.tMass;fu=fe.c2.friction*fe.c2.jnAcc;ed=fe.c2.jtAcc;eG=ed-e4;if(eG>fu){eG=fu}else{if(eG<-fu){eG=-fu}}e4=eG-ed;fe.c2.jtAcc=eG;eJ=-fe.ny*e4;eq=fe.nx*e4;fe.b2.velx+=eJ*fe.b2.imass;fe.b2.vely+=eq*fe.b2.imass;fe.b1.velx-=eJ*fe.b1.imass;fe.b1.vely-=eq*fe.b1.imass;fe.b2.angvel+=fe.rt2b*e4*fe.b2.iinertia;fe.b1.angvel-=fe.rt2a*e4*fe.b1.iinertia;gc=fe.k1x+fe.b2.velx-fe.c1.r2y*fe.b2.angvel-(fe.b1.velx-fe.c1.r1y*fe.b1.angvel);fU=fe.k1y+fe.b2.vely+fe.c1.r2x*fe.b2.angvel-(fe.b1.vely+fe.c1.r1x*fe.b1.angvel);eT=fe.k2x+fe.b2.velx-fe.c2.r2y*fe.b2.angvel-(fe.b1.velx-fe.c2.r1y*fe.b1.angvel);eO=fe.k2y+fe.b2.vely+fe.c2.r2x*fe.b2.angvel-(fe.b1.vely+fe.c2.r1x*fe.b1.angvel);var f8=fe.c1.jnAcc;var fM=fe.c2.jnAcc;var ex=gc*fe.nx+fU*fe.ny+fe.surfacey+fe.c1.bounce-(fe.Ka*f8+fe.Kb*fM);var eh=eT*fe.nx+eO*fe.ny+fe.surfacey+fe.c2.bounce-(fe.Kb*f8+fe.Kc*fM);var en=-(fe.kMassa*ex+fe.kMassb*eh);var gB=-(fe.kMassb*ex+fe.kMassc*eh);if(en>=0&&gB>=0){ex=en-f8;eh=gB-fM;fe.c1.jnAcc=en;fe.c2.jnAcc=gB}else{en=-fe.c1.nMass*ex;if(en>=0&&fe.Kb*en+eh>=0){ex=en-f8;eh=-fM;fe.c1.jnAcc=en;fe.c2.jnAcc=0}else{gB=-fe.c2.nMass*eh;if(gB>=0&&fe.Kb*gB+ex>=0){ex=-f8;eh=gB-fM;fe.c1.jnAcc=0;fe.c2.jnAcc=gB}else{if(ex>=0&&eh>=0){ex=-f8;eh=-fM;fe.c1.jnAcc=fe.c2.jnAcc=0}else{ex=0;eh=0}}}}e4=ex+eh;eJ=fe.nx*e4;eq=fe.ny*e4;fe.b2.velx+=eJ*fe.b2.imass;fe.b2.vely+=eq*fe.b2.imass;fe.b1.velx-=eJ*fe.b1.imass;fe.b1.vely-=eq*fe.b1.imass;fe.b2.angvel+=(fe.rn1b*ex+fe.rn2b*eh)*fe.b2.iinertia;fe.b1.angvel-=(fe.rn1a*ex+fe.rn2a*eh)*fe.b1.iinertia}else{if(fe.radius!=0){e4=(fe.b2.angvel-fe.b1.angvel)*fe.rMass;fu=fe.rfric*fe.c1.jnAcc;ed=fe.jrAcc;fe.jrAcc-=e4;if(fe.jrAcc>fu){fe.jrAcc=fu}else{if(fe.jrAcc<-fu){fe.jrAcc=-fu}}e4=fe.jrAcc-ed;fe.b2.angvel+=e4*fe.b2.iinertia;fe.b1.angvel-=e4*fe.b1.iinertia}gc=fe.k1x+fe.b2.velx-fe.c1.r2y*fe.b2.angvel-(fe.b1.velx-fe.c1.r1y*fe.b1.angvel);fU=fe.k1y+fe.b2.vely+fe.c1.r2x*fe.b2.angvel-(fe.b1.vely+fe.c1.r1x*fe.b1.angvel);e4=(fe.c1.bounce+(fe.nx*gc+fe.ny*fU)+fe.surfacey)*fe.c1.nMass;ed=fe.c1.jnAcc;eG=ed-e4;if(eG<0){eG=0}e4=eG-ed;fe.c1.jnAcc=eG;eJ=fe.nx*e4;eq=fe.ny*e4;fe.b2.velx+=eJ*fe.b2.imass;fe.b2.vely+=eq*fe.b2.imass;fe.b1.velx-=eJ*fe.b1.imass;fe.b1.vely-=eq*fe.b1.imass;fe.b2.angvel+=fe.rn1b*e4*fe.b2.iinertia;fe.b1.angvel-=fe.rn1a*e4*fe.b1.iinertia}var fd=ey.colarb;var eI;var ep;var eZ;var fr;var ec;var eE;var gb=fd.k1x+fd.b2.velx-fd.c1.r2y*fd.b2.angvel-(fd.b1.velx-fd.c1.r1y*fd.b1.angvel);var fS=fd.k1y+fd.b2.vely+fd.c1.r2x*fd.b2.angvel-(fd.b1.vely+fd.c1.r1x*fd.b1.angvel);eZ=(fS*fd.nx-gb*fd.ny+fd.surfacex)*fd.c1.tMass;fr=fd.c1.friction*fd.c1.jnAcc;ec=fd.c1.jtAcc;eE=ec-eZ;if(eE>fr){eE=fr}else{if(eE<-fr){eE=-fr}}eZ=eE-ec;fd.c1.jtAcc=eE;eI=-fd.ny*eZ;ep=fd.nx*eZ;fd.b2.velx+=eI*fd.b2.imass;fd.b2.vely+=ep*fd.b2.imass;fd.b1.velx-=eI*fd.b1.imass;fd.b1.vely-=ep*fd.b1.imass;fd.b2.angvel+=fd.rt1b*eZ*fd.b2.iinertia;fd.b1.angvel-=fd.rt1a*eZ*fd.b1.iinertia;if(fd.hc2){var eS=fd.k2x+fd.b2.velx-fd.c2.r2y*fd.b2.angvel-(fd.b1.velx-fd.c2.r1y*fd.b1.angvel);var eN=fd.k2y+fd.b2.vely+fd.c2.r2x*fd.b2.angvel-(fd.b1.vely+fd.c2.r1x*fd.b1.angvel);eZ=(eN*fd.nx-eS*fd.ny+fd.surfacex)*fd.c2.tMass;fr=fd.c2.friction*fd.c2.jnAcc;ec=fd.c2.jtAcc;eE=ec-eZ;if(eE>fr){eE=fr}else{if(eE<-fr){eE=-fr}}eZ=eE-ec;fd.c2.jtAcc=eE;eI=-fd.ny*eZ;ep=fd.nx*eZ;fd.b2.velx+=eI*fd.b2.imass;fd.b2.vely+=ep*fd.b2.imass;fd.b1.velx-=eI*fd.b1.imass;fd.b1.vely-=ep*fd.b1.imass;fd.b2.angvel+=fd.rt2b*eZ*fd.b2.iinertia;fd.b1.angvel-=fd.rt2a*eZ*fd.b1.iinertia;gb=fd.k1x+fd.b2.velx-fd.c1.r2y*fd.b2.angvel-(fd.b1.velx-fd.c1.r1y*fd.b1.angvel);fS=fd.k1y+fd.b2.vely+fd.c1.r2x*fd.b2.angvel-(fd.b1.vely+fd.c1.r1x*fd.b1.angvel);eS=fd.k2x+fd.b2.velx-fd.c2.r2y*fd.b2.angvel-(fd.b1.velx-fd.c2.r1y*fd.b1.angvel);eN=fd.k2y+fd.b2.vely+fd.c2.r2x*fd.b2.angvel-(fd.b1.vely+fd.c2.r1x*fd.b1.angvel);var f7=fd.c1.jnAcc;var fJ=fd.c2.jnAcc;var ew=gb*fd.nx+fS*fd.ny+fd.surfacey+fd.c1.bounce-(fd.Ka*f7+fd.Kb*fJ);var ef=eS*fd.nx+eN*fd.ny+fd.surfacey+fd.c2.bounce-(fd.Kb*f7+fd.Kc*fJ);var el=-(fd.kMassa*ew+fd.kMassb*ef);var gA=-(fd.kMassb*ew+fd.kMassc*ef);if(el>=0&&gA>=0){ew=el-f7;ef=gA-fJ;fd.c1.jnAcc=el;fd.c2.jnAcc=gA}else{el=-fd.c1.nMass*ew;if(el>=0&&fd.Kb*el+ef>=0){ew=el-f7;ef=-fJ;fd.c1.jnAcc=el;fd.c2.jnAcc=0}else{gA=-fd.c2.nMass*ef;if(gA>=0&&fd.Kb*gA+ew>=0){ew=-f7;ef=gA-fJ;fd.c1.jnAcc=0;fd.c2.jnAcc=gA}else{if(ew>=0&&ef>=0){ew=-f7;ef=-fJ;fd.c1.jnAcc=fd.c2.jnAcc=0}else{ew=0;ef=0}}}}eZ=ew+ef;eI=fd.nx*eZ;ep=fd.ny*eZ;fd.b2.velx+=eI*fd.b2.imass;fd.b2.vely+=ep*fd.b2.imass;fd.b1.velx-=eI*fd.b1.imass;fd.b1.vely-=ep*fd.b1.imass;fd.b2.angvel+=(fd.rn1b*ew+fd.rn2b*ef)*fd.b2.iinertia;fd.b1.angvel-=(fd.rn1a*ew+fd.rn2a*ef)*fd.b1.iinertia}else{if(fd.radius!=0){eZ=(fd.b2.angvel-fd.b1.angvel)*fd.rMass;fr=fd.rfric*fd.c1.jnAcc;ec=fd.jrAcc;fd.jrAcc-=eZ;if(fd.jrAcc>fr){fd.jrAcc=fr}else{if(fd.jrAcc<-fr){fd.jrAcc=-fr}}eZ=fd.jrAcc-ec;fd.b2.angvel+=eZ*fd.b2.iinertia;fd.b1.angvel-=eZ*fd.b1.iinertia}gb=fd.k1x+fd.b2.velx-fd.c1.r2y*fd.b2.angvel-(fd.b1.velx-fd.c1.r1y*fd.b1.angvel);fS=fd.k1y+fd.b2.vely+fd.c1.r2x*fd.b2.angvel-(fd.b1.vely+fd.c1.r1x*fd.b1.angvel);eZ=(fd.c1.bounce+(fd.nx*gb+fd.ny*fS)+fd.surfacey)*fd.c1.nMass;ec=fd.c1.jnAcc;eE=ec-eZ;if(eE<0){eE=0}eZ=eE-ec;fd.c1.jnAcc=eE;eI=fd.nx*eZ;ep=fd.ny*eZ;fd.b2.velx+=eI*fd.b2.imass;fd.b2.vely+=ep*fd.b2.imass;fd.b1.velx-=eI*fd.b1.imass;fd.b1.vely-=ep*fd.b1.imass;fd.b2.angvel+=fd.rn1b*eZ*fd.b2.iinertia;fd.b1.angvel-=fd.rn1a*eZ*fd.b1.iinertia}var fc=ey.colarb;var eH;var eo;var eX;var fp;var eb;var eC;var ga=fc.k1x+fc.b2.velx-fc.c1.r2y*fc.b2.angvel-(fc.b1.velx-fc.c1.r1y*fc.b1.angvel);var fP=fc.k1y+fc.b2.vely+fc.c1.r2x*fc.b2.angvel-(fc.b1.vely+fc.c1.r1x*fc.b1.angvel);eX=(fP*fc.nx-ga*fc.ny+fc.surfacex)*fc.c1.tMass;fp=fc.c1.friction*fc.c1.jnAcc;eb=fc.c1.jtAcc;eC=eb-eX;if(eC>fp){eC=fp}else{if(eC<-fp){eC=-fp}}eX=eC-eb;fc.c1.jtAcc=eC;eH=-fc.ny*eX;eo=fc.nx*eX;fc.b2.velx+=eH*fc.b2.imass;fc.b2.vely+=eo*fc.b2.imass;fc.b1.velx-=eH*fc.b1.imass;fc.b1.vely-=eo*fc.b1.imass;fc.b2.angvel+=fc.rt1b*eX*fc.b2.iinertia;fc.b1.angvel-=fc.rt1a*eX*fc.b1.iinertia;if(fc.hc2){var eR=fc.k2x+fc.b2.velx-fc.c2.r2y*fc.b2.angvel-(fc.b1.velx-fc.c2.r1y*fc.b1.angvel);var eL=fc.k2y+fc.b2.vely+fc.c2.r2x*fc.b2.angvel-(fc.b1.vely+fc.c2.r1x*fc.b1.angvel);eX=(eL*fc.nx-eR*fc.ny+fc.surfacex)*fc.c2.tMass;fp=fc.c2.friction*fc.c2.jnAcc;eb=fc.c2.jtAcc;eC=eb-eX;if(eC>fp){eC=fp}else{if(eC<-fp){eC=-fp}}eX=eC-eb;fc.c2.jtAcc=eC;eH=-fc.ny*eX;eo=fc.nx*eX;fc.b2.velx+=eH*fc.b2.imass;fc.b2.vely+=eo*fc.b2.imass;fc.b1.velx-=eH*fc.b1.imass;fc.b1.vely-=eo*fc.b1.imass;fc.b2.angvel+=fc.rt2b*eX*fc.b2.iinertia;fc.b1.angvel-=fc.rt2a*eX*fc.b1.iinertia;ga=fc.k1x+fc.b2.velx-fc.c1.r2y*fc.b2.angvel-(fc.b1.velx-fc.c1.r1y*fc.b1.angvel);fP=fc.k1y+fc.b2.vely+fc.c1.r2x*fc.b2.angvel-(fc.b1.vely+fc.c1.r1x*fc.b1.angvel);eR=fc.k2x+fc.b2.velx-fc.c2.r2y*fc.b2.angvel-(fc.b1.velx-fc.c2.r1y*fc.b1.angvel);eL=fc.k2y+fc.b2.vely+fc.c2.r2x*fc.b2.angvel-(fc.b1.vely+fc.c2.r1x*fc.b1.angvel);var f6=fc.c1.jnAcc;var fH=fc.c2.jnAcc;var ev=ga*fc.nx+fP*fc.ny+fc.surfacey+fc.c1.bounce-(fc.Ka*f6+fc.Kb*fH);var ee=eR*fc.nx+eL*fc.ny+fc.surfacey+fc.c2.bounce-(fc.Kb*f6+fc.Kc*fH);var ek=-(fc.kMassa*ev+fc.kMassb*ee);var gz=-(fc.kMassb*ev+fc.kMassc*ee);if(ek>=0&&gz>=0){ev=ek-f6;ee=gz-fH;fc.c1.jnAcc=ek;fc.c2.jnAcc=gz}else{ek=-fc.c1.nMass*ev;if(ek>=0&&fc.Kb*ek+ee>=0){ev=ek-f6;ee=-fH;fc.c1.jnAcc=ek;fc.c2.jnAcc=0}else{gz=-fc.c2.nMass*ee;if(gz>=0&&fc.Kb*gz+ev>=0){ev=-f6;ee=gz-fH;fc.c1.jnAcc=0;fc.c2.jnAcc=gz}else{if(ev>=0&&ee>=0){ev=-f6;ee=-fH;fc.c1.jnAcc=fc.c2.jnAcc=0}else{ev=0;ee=0}}}}eX=ev+ee;eH=fc.nx*eX;eo=fc.ny*eX;fc.b2.velx+=eH*fc.b2.imass;fc.b2.vely+=eo*fc.b2.imass;fc.b1.velx-=eH*fc.b1.imass;fc.b1.vely-=eo*fc.b1.imass;fc.b2.angvel+=(fc.rn1b*ev+fc.rn2b*ee)*fc.b2.iinertia;fc.b1.angvel-=(fc.rn1a*ev+fc.rn2a*ee)*fc.b1.iinertia}else{if(fc.radius!=0){eX=(fc.b2.angvel-fc.b1.angvel)*fc.rMass;fp=fc.rfric*fc.c1.jnAcc;eb=fc.jrAcc;fc.jrAcc-=eX;if(fc.jrAcc>fp){fc.jrAcc=fp}else{if(fc.jrAcc<-fp){fc.jrAcc=-fp}}eX=fc.jrAcc-eb;fc.b2.angvel+=eX*fc.b2.iinertia;fc.b1.angvel-=eX*fc.b1.iinertia}ga=fc.k1x+fc.b2.velx-fc.c1.r2y*fc.b2.angvel-(fc.b1.velx-fc.c1.r1y*fc.b1.angvel);fP=fc.k1y+fc.b2.vely+fc.c1.r2x*fc.b2.angvel-(fc.b1.vely+fc.c1.r1x*fc.b1.angvel);eX=(fc.c1.bounce+(fc.nx*ga+fc.ny*fP)+fc.surfacey)*fc.c1.nMass;eb=fc.c1.jnAcc;eC=eb-eX;if(eC<0){eC=0}eX=eC-eb;fc.c1.jnAcc=eC;eH=fc.nx*eX;eo=fc.ny*eX;fc.b2.velx+=eH*fc.b2.imass;fc.b2.vely+=eo*fc.b2.imass;fc.b1.velx-=eH*fc.b1.imass;fc.b1.vely-=eo*fc.b1.imass;fc.b2.angvel+=fc.rn1b*eX*fc.b2.iinertia;fc.b1.angvel-=fc.rn1a*eX*fc.b1.iinertia}ea.sweep_angvel=ea.angvel%eQ;gt.sweep_angvel=gt.angvel%eQ}}}if(ey!=null&&(ey.active&&(ey.immState&1)!=0)&&ey.type==j.COL){if(!ea.sweepFrozen&&ea.type!=3){ea.sweepFrozen=true;if(gw.failed){ea.angvel=ea.sweep_angvel=0}else{if(gw.slipped){ea.angvel=ea.sweep_angvel*=P.angularCCDSlipScale}else{ea.angvel=ea.sweep_angvel}}}if(!gt.sweepFrozen&>.type!=3){gt.sweepFrozen=true;if(gw.failed){gt.angvel=gt.sweep_angvel=0}else{if(gw.slipped){gt.angvel=gt.sweep_angvel*=P.angularCCDSlipScale}else{gt.angvel=gt.sweep_angvel}}}}var fW=gw;fW.next=ct.zpp_pool;ct.zpp_pool=fW}while(this.toiEvents.head!=null){var gD=this.toiEvents.pop_unsafe();gD.next=ct.zpp_pool;ct.zpp_pool=gD}var eV=this.kinematics.head;while(eV!=null){var gm=eV.elt;var fD=fG-gm.sweepTime;if(fD!=0){gm.sweepTime=fG;gm.posx+=gm.velx*fD;gm.posy+=gm.vely*fD;if(gm.angvel!=0){var f1=gm.sweep_angvel*fD;gm.rot+=f1;if(f1*f1>0.0001){gm.axisx=Math.sin(gm.rot);gm.axisy=Math.cos(gm.rot)}else{var gr=f1*f1;var gf=1-0.5*gr;var ei=1-gr*gr/8;var eD=(gf*gm.axisx+f1*gm.axisy)*ei;gm.axisy=(gf*gm.axisy-f1*gm.axisx)*ei;gm.axisx=eD}}}gm.sweepTime=0;eV=eV.next}var eU=this.live.head;while(eU!=null){var fl=eU.elt;if(!fl.sweepFrozen){var fB=fG-fl.sweepTime;if(fB!=0){fl.sweepTime=fG;fl.posx+=fl.velx*fB;fl.posy+=fl.vely*fB;if(fl.angvel!=0){var f0=fl.sweep_angvel*fB;fl.rot+=f0;if(f0*f0>0.0001){fl.axisx=Math.sin(fl.rot);fl.axisy=Math.cos(fl.rot)}else{var gq=f0*f0;var ge=1-0.5*gq;var eg=1-gq*gq/8;var eB=(ge*fl.axisx+f0*fl.axisy)*eg;fl.axisy=(ge*fl.axisy-f0*fl.axisx)*eg;fl.axisx=eB}}}}fl.sweepTime=0;eU=eU.next}};a3.prototype.continuousEvent=function(ed,ec,eE,ei,eH){if(ed.body.sweepFrozen&&ec.body.sweepFrozen){return ei}if(ed.body.disableCCD||ec.body.disableCCD){return ei}var eF;if(!(ei!=null&&ei.colarb==null)){var ek=ed.body;var ej=ec.body;var eb;eb=false;var ew=ek.constraints.head;while(ew!=null){var eg=ew.elt;if(eg.ignore&&eg.pair_exists(ek.id,ej.id)){eb=true;break}ew=ew.next}var ev;var eu;if(!eb){var ee=ed;while(ee!=null&&ee.group==null){if(ee.ishape!=null){ee=ee.ishape.body}else{if(ee.icompound!=null){ee=ee.icompound.compound}else{ee=ee.ibody.compound}}}var ea=ee==null?null:ee.group;var es;if(ea==null){es=false}else{var eh=ec;while(eh!=null&&eh.group==null){if(eh.ishape!=null){eh=eh.ishape.body}else{if(eh.icompound!=null){eh=eh.icompound.compound}else{eh=eh.ibody.compound}}}var eI=eh==null?null:eh.group;if(eI==null){es=false}else{var eG=false;while(ea!=null&&eI!=null){if(ea==eI){eG=ea.ignore;break}if(ea.depth=this.stamp&&(ej.immState&1)!=0){if(ej.b1.type==2&&ej.b1.component.sleeping){var eo=ej.b1;if(!eo.world){eo.component.waket=this.stamp+(this.midstep?0:1);if(eo.type==3){eo.kinematicDelaySleep=true}if(eo.component.sleeping){this.really_wake(eo,false)}}}if(ej.b2.type==2&&ej.b2.component.sleeping){var en=ej.b2;if(!en.world){en.component.waket=this.stamp+(this.midstep?0:1);if(en.type==3){en.kinematicDelaySleep=true}if(en.component.sleeping){this.really_wake(en,false)}}}}el=el.next}if(!eb&&em.type==2){this.bodyCbWake(em)}if(!eb&&!this.bphase.is_sweep&&em.type!=1){var ek=em.shapes.head;while(ek!=null){var ea=ek.elt;if(ea.node!=null){this.bphase.sync(ea)}ek=ek.next}}}else{this.wakeIsland(em.component.island)}};a3.prototype.wake_constraint=function(ea,ec){if(ec==null){ec=false}if(ea.active){ea.component.waket=this.stamp+(this.midstep?0:1);if(ea.component.sleeping){if(ea.component.island==null){ea.component.sleeping=false;var ee=this.live_constraints;var ed;if(cx.zpp_pool==null){ed=new cx()}else{ed=cx.zpp_pool;cx.zpp_pool=ed.next;ed.next=null}ed.elt=ea;var eb=ed;eb.next=ee.head;ee.head=eb;ee.modified=true;ee.length++;ea.wake_connected();if(!ec){this.constraintCbWake(ea)}}else{this.wakeIsland(ea.component.island)}return true}else{return false}}else{return false}};a3.prototype.doForests=function(em){var eo=this.c_arbiters_false.head;while(eo!=null){var eJ=eo.elt;if(!eJ.cleared&&eJ.up_stamp==this.stamp&&(eJ.immState&1)!=0){if(eJ.b1.type==2&&eJ.b2.type==2){var eL;if(eJ.b1.component==eJ.b1.component.parent){eL=eJ.b1.component}else{var ed=eJ.b1.component;var eD=null;while(ed!=ed.parent){var fa=ed.parent;ed.parent=eD;eD=ed;ed=fa}while(eD!=null){var fc=eD.parent;eD.parent=ed;eD=fc}eL=ed}var eu;if(eJ.b2.component==eJ.b2.component.parent){eu=eJ.b2.component}else{var ej=eJ.b2.component;var eI=null;while(ej!=ej.parent){var fb=ej.parent;ej.parent=eI;eI=ej;ej=fb}while(eI!=null){var e9=eI.parent;eI.parent=ej;eI=e9}eu=ej}if(eL!=eu){if(eL.rankeu.rank){eu.parent=eL}else{eu.parent=eL;eL.rank++}}}}}eo=eo.next}var eA=this.f_arbiters.head;while(eA!=null){var ek=eA.elt;if(!ek.cleared&&ek.up_stamp==this.stamp&&(ek.immState&1)!=0){if(ek.b1.type==2&&ek.b2.type==2){var eB;if(ek.b1.component==ek.b1.component.parent){eB=ek.b1.component}else{var eh=ek.b1.component;var eH=null;while(eh!=eh.parent){var e8=eh.parent;eh.parent=eH;eH=eh;eh=e8}while(eH!=null){var e7=eH.parent;eH.parent=eh;eH=e7}eB=eh}var et;if(ek.b2.component==ek.b2.component.parent){et=ek.b2.component}else{var eg=ek.b2.component;var eG=null;while(eg!=eg.parent){var e6=eg.parent;eg.parent=eG;eG=eg;eg=e6}while(eG!=null){var e5=eG.parent;eG.parent=eg;eG=e5}et=eg}if(eB!=et){if(eB.ranket.rank){et.parent=eB}else{et.parent=eB;eB.rank++}}}}}eA=eA.next}var ez=this.live_constraints.head;while(ez!=null){ez.elt.forest();ez=ez.next}while(this.live.head!=null){var ei=this.live;var eK=ei.head.elt;ei.pop();var eX=eK.component;var eF;if(eX==eX.parent){eF=eX}else{var ef=eX;var eE=null;while(ef!=ef.parent){var e3=ef.parent;ef.parent=eE;eE=ef;ef=e3}while(eE!=null){var e2=eE.parent;eE.parent=ef;eE=e2}eF=ef}if(eF.island==null){if(cW.zpp_pool==null){eF.island=new cW()}else{eF.island=cW.zpp_pool;cW.zpp_pool=eF.island.next;eF.island.next=null}eF.island.waket=0;var e1=this.islands;var e4=eF.island;e4._inuse=true;e4.next=e1.next;e1.next=e4;e1.modified=true;e1.length++;eF.island.sleep=true}eX.island=eF.island;var e0=eX.island.comps;var eW;if(dv.zpp_pool==null){eW=new dv()}else{eW=dv.zpp_pool;dv.zpp_pool=eW.next;eW.next=null}eW.elt=eX;var en=eW;en.next=e0.head;e0.head=en;e0.modified=true;e0.length++;var ey=eK.atRest(em);eX.island.sleep=eX.island.sleep&&ey;if(eX.waket>eX.island.waket){eX.island.waket=eX.waket}}while(this.live_constraints.head!=null){var eZ=this.live_constraints;var eU=eZ.head.elt;eZ.pop();var ev=eU.component;var el;if(ev==ev.parent){el=ev}else{var ee=ev;var eC=null;while(ee!=ee.parent){var eq=ee.parent;ee.parent=eC;eC=ee;ee=eq}while(eC!=null){var ep=eC.parent;eC.parent=ee;eC=ep}el=ee}ev.island=el.island;var eY=ev.island.comps;var eS;if(dv.zpp_pool==null){eS=new dv()}else{eS=dv.zpp_pool;dv.zpp_pool=eS.next;eS.next=null}eS.elt=ev;var ec=eS;ec.next=eY.head;eY.head=ec;eY.modified=true;eY.length++;if(ev.waket>ev.island.waket){ev.island.waket=ev.waket}}while(this.islands.next!=null){var eV=this.islands;var eQ=eV.next;eV.pop();if(eQ.sleep){var ex=eQ.comps.head;while(ex!=null){var fd=ex.elt;if(fd.isBody){var fe=fd.body;fe.velx=0;fe.vely=0;fe.angvel=0;fd.sleeping=true;var ew=fe.shapes.head;while(ew!=null){this.bphase.sync(ew.elt);ew=ew.next}this.bodyCbSleep(fe)}else{this.constraintCbSleep(fd.constraint);fd.sleeping=true}ex=ex.next}}else{while(eQ.comps.head!=null){var eT=eQ.comps;var eO=eT.head.elt;eT.pop();eO.waket=eQ.waket;if(eO.isBody){var eR=this.live;var es=eO.body;var eN;if(bE.zpp_pool==null){eN=new bE()}else{eN=bE.zpp_pool;bE.zpp_pool=eN.next;eN.next=null}eN.elt=es;var eb=eN;eb.next=eR.head;eR.head=eb;eR.modified=true;eR.length++}else{var eP=this.live_constraints;var er=eO.constraint;var eM;if(cx.zpp_pool==null){eM=new cx()}else{eM=cx.zpp_pool;cx.zpp_pool=eM.next;eM.next=null}eM.elt=er;var ea=eM;ea.next=eP.head;eP.head=ea;eP.modified=true;eP.length++}eO.sleeping=false;eO.island=null;eO.parent=eO;eO.rank=0}eQ.next=cW.zpp_pool;cW.zpp_pool=eQ}}};a3.prototype.sleepArbiters=function(){var ep=null;var eo=this.c_arbiters_true;var eg=eo.head;var ed=this.c_arbiters_false!=null;if(ed&&eg==null){ed=false;eg=this.c_arbiters_false.head;eo=this.c_arbiters_false;ep=null}while(eg!=null){var en=eg.elt;if(en.b1.component.sleeping&&en.b2.component.sleeping){en.sleep_stamp=this.stamp;en.sleeping=true;var ea;var ev;if(ep==null){ea=eo.head;ev=ea.next;eo.head=ev;if(eo.head==null){eo.pushmod=true}}else{ea=ep.next;ev=ea.next;ep.next=ev;if(ev==null){eo.pushmod=true}}var eq=ea;eq.elt=null;eq.next=bi.zpp_pool;bi.zpp_pool=eq;eo.modified=true;eo.length--;eo.pushmod=true;eg=ev;if(ed&&eg==null){ed=false;eg=this.c_arbiters_false.head;eo=this.c_arbiters_false;ep=null}continue}ep=eg;eg=eg.next;if(ed&&eg==null){ed=false;eg=this.c_arbiters_false.head;eo=this.c_arbiters_false;ep=null}}var ec=null;var ef=this.f_arbiters;var em=ef.head;while(em!=null){var eu=em.elt;if(eu.b1.component.sleeping&&eu.b2.component.sleeping){eu.sleep_stamp=this.stamp;eu.sleeping=true;var ej;var ek;if(ec==null){ej=ef.head;ek=ej.next;ef.head=ek;if(ef.head==null){ef.pushmod=true}}else{ej=ec.next;ek=ej.next;ec.next=ek;if(ek==null){ef.pushmod=true}}var es=ej;es.elt=null;es.next=bb.zpp_pool;bb.zpp_pool=es;ef.modified=true;ef.length--;ef.pushmod=true;em=ek;continue}ec=em;em=em.next}var eb=null;var ee=this.s_arbiters;var el=ee.head;while(el!=null){var et=el.elt;if(et.b1.component.sleeping&&et.b2.component.sleeping){et.sleep_stamp=this.stamp;et.sleeping=true;var eh;var ei;if(eb==null){eh=ee.head;ei=eh.next;ee.head=ei;if(ee.head==null){ee.pushmod=true}}else{eh=eb.next;ei=eh.next;eb.next=ei;if(ei==null){ee.pushmod=true}}var er=eh;er.elt=null;er.next=L.zpp_pool;L.zpp_pool=er;ee.modified=true;ee.length--;ee.pushmod=true;el=ei;continue}eb=el;el=el.next}};a3.prototype.static_validation=function(ek){if(ek.shapes.head!=null){if(ek.zip_aabb){ek.zip_aabb=false;ek.aabb.minx=Infinity;ek.aabb.miny=Infinity;ek.aabb.maxx=-Infinity;ek.aabb.maxy=-Infinity;var eb=ek.shapes.head;while(eb!=null){var eK=eb.elt;if(eK.zip_aabb){if(eK.body!=null){eK.zip_aabb=false;if(eK.type==0){var ea=eK.circle;if(ea.zip_worldCOM){if(ea.body!=null){ea.zip_worldCOM=false;if(ea.zip_localCOM){ea.zip_localCOM=false;if(ea.type==1){var eI=ea.polygon;if(eI.lverts.next.next==null){eI.localCOMx=eI.lverts.next.x;eI.localCOMy=eI.lverts.next.y}else{if(eI.lverts.next.next.next==null){eI.localCOMx=eI.lverts.next.x;eI.localCOMy=eI.lverts.next.y;eI.localCOMx+=eI.lverts.next.next.x;eI.localCOMy+=eI.lverts.next.next.y;eI.localCOMx*=0.5;eI.localCOMy*=0.5}else{eI.localCOMx=0;eI.localCOMy=0;var ep=0;var ej=eI.lverts.next;var eH=ej;ej=ej.next;var eF=ej;ej=ej.next;while(ej!=null){var eD=ej;ep+=eF.x*(eD.y-eH.y);var eo=eD.y*eF.x-eD.x*eF.y;eI.localCOMx+=(eF.x+eD.x)*eo;eI.localCOMy+=(eF.y+eD.y)*eo;eH=eF;eF=eD;ej=ej.next}ej=eI.lverts.next;var es=ej;ep+=eF.x*(es.y-eH.y);var eA=es.y*eF.x-es.x*eF.y;eI.localCOMx+=(eF.x+es.x)*eA;eI.localCOMy+=(eF.y+es.y)*eA;eH=eF;ej=ej.next;var eq=ej;ep+=es.x*(eq.y-eH.y);var ey=eq.y*es.x-eq.x*es.y;eI.localCOMx+=(es.x+eq.x)*ey;eI.localCOMy+=(es.y+eq.y)*ey;ep=1/(3*ep);var eJ=ep;eI.localCOMx*=eJ;eI.localCOMy*=eJ}}}if(ea.wrap_localCOM!=null){ea.wrap_localCOM.zpp_inner.x=ea.localCOMx;ea.wrap_localCOM.zpp_inner.y=ea.localCOMy}}var eG=ea.body;if(eG.zip_axis){eG.zip_axis=false;eG.axisx=Math.sin(eG.rot);eG.axisy=Math.cos(eG.rot)}ea.worldCOMx=ea.body.posx+(ea.body.axisy*ea.localCOMx-ea.body.axisx*ea.localCOMy);ea.worldCOMy=ea.body.posy+(ea.localCOMx*ea.body.axisx+ea.localCOMy*ea.body.axisy)}}var en=ea.radius;var em=ea.radius;ea.aabb.minx=ea.worldCOMx-en;ea.aabb.miny=ea.worldCOMy-em;ea.aabb.maxx=ea.worldCOMx+en;ea.aabb.maxy=ea.worldCOMy+em}else{var eE=eK.polygon;if(eE.zip_gverts){if(eE.body!=null){eE.zip_gverts=false;eE.validate_lverts();var eC=eE.body;if(eC.zip_axis){eC.zip_axis=false;eC.axisx=Math.sin(eC.rot);eC.axisy=Math.cos(eC.rot)}var er=eE.lverts.next;var ei=eE.gverts.next;while(ei!=null){var eO=ei;var eM=er;er=er.next;eO.x=eE.body.posx+(eE.body.axisy*eM.x-eE.body.axisx*eM.y);eO.y=eE.body.posy+(eM.x*eE.body.axisx+eM.y*eE.body.axisy);ei=ei.next}}}var eR=eE.gverts.next;eE.aabb.minx=eR.x;eE.aabb.miny=eR.y;eE.aabb.maxx=eR.x;eE.aabb.maxy=eR.y;var eh=eE.gverts.next.next;while(eh!=null){var eL=eh;if(eL.xeE.aabb.maxx){eE.aabb.maxx=eL.x}if(eL.yeE.aabb.maxy){eE.aabb.maxy=eL.y}eh=eh.next}}}}var ez=ek.aabb;var eB=eK.aabb;if(eB.minxez.maxx){ez.maxx=eB.maxx}if(eB.minyez.maxy){ez.maxy=eB.maxy}eb=eb.next}}}ek.validate_mass();ek.validate_inertia();var eg=ek.shapes.head;while(eg!=null){var eS=eg.elt;if(eS.type==1){var ex=eS.polygon;if(ex.zip_sanitation){ex.zip_sanitation=false;ex.splice_collinear_real()}var ew=eS.polygon;if(ew.zip_gaxi){if(ew.body!=null){ew.zip_gaxi=false;ew.validate_laxi();var eu=ew.body;if(eu.zip_axis){eu.zip_axis=false;eu.axisx=Math.sin(eu.rot);eu.axisy=Math.cos(eu.rot)}if(ew.zip_gverts){if(ew.body!=null){ew.zip_gverts=false;ew.validate_lverts();var et=ew.body;if(et.zip_axis){et.zip_axis=false;et.axisx=Math.sin(et.rot);et.axisy=Math.cos(et.rot)}var ev=ew.lverts.next;var ef=ew.gverts.next;while(ef!=null){var eN=ef;var ec=ev;ev=ev.next;eN.x=ew.body.posx+(ew.body.axisy*ec.x-ew.body.axisx*ec.y);eN.y=ew.body.posy+(ec.x*ew.body.axisx+ec.y*ew.body.axisy);ef=ef.next}}}var eP=ew.edges.head;var ee=ew.gverts.next;var ed=ee;ee=ee.next;while(ee!=null){var eT=ee;var eQ=eP.elt;eP=eP.next;eQ.gp0=ed;eQ.gp1=eT;eQ.gnormx=ew.body.axisy*eQ.lnormx-ew.body.axisx*eQ.lnormy;eQ.gnormy=eQ.lnormx*ew.body.axisx+eQ.lnormy*ew.body.axisy;eQ.gprojection=ew.body.posx*eQ.gnormx+ew.body.posy*eQ.gnormy+eQ.lprojection;if(eQ.wrap_gnorm!=null){eQ.wrap_gnorm.zpp_inner.x=eQ.gnormx;eQ.wrap_gnorm.zpp_inner.y=eQ.gnormy}eQ.tp0=eQ.gp0.y*eQ.gnormx-eQ.gp0.x*eQ.gnormy;eQ.tp1=eQ.gp1.y*eQ.gnormx-eQ.gp1.x*eQ.gnormy;ed=eT;ee=ee.next}var el=eP.elt;el.gp0=ed;el.gp1=ew.gverts.next;el.gnormx=ew.body.axisy*el.lnormx-ew.body.axisx*el.lnormy;el.gnormy=el.lnormx*ew.body.axisx+el.lnormy*ew.body.axisy;el.gprojection=ew.body.posx*el.gnormx+ew.body.posy*el.gnormy+el.lprojection;if(el.wrap_gnorm!=null){el.wrap_gnorm.zpp_inner.x=el.gnormx;el.wrap_gnorm.zpp_inner.y=el.gnormy}el.tp0=el.gp0.y*el.gnormx-el.gp0.x*el.gnormy;el.tp1=el.gp1.y*el.gnormx-el.gp1.x*el.gnormy}}}eg=eg.next}ek.sweepFrozen=true};a3.prototype.validation=function(){var eq=this.cbsets;if(!eq.cbsets.empty()){var er=eq.cbsets.parent;while(er.prev!=null){er=er.prev}while(er!=null){er.data.validate();if(er.next!=null){er=er.next;while(er.prev!=null){er=er.prev}}else{while(er.parent!=null&&er==er.parent.next){er=er.parent}er=er.parent}}}var fK=this.live.head;while(fK!=null){var ex=fK.elt;ex.sweepRadius=0;var fJ=ex.shapes.head;while(fJ!=null){var eJ=fJ.elt;if(eJ.type==1){var fc=eJ.polygon;if(fc.zip_sanitation){fc.zip_sanitation=false;fc.splice_collinear_real()}var fa=eJ.polygon;if(fa.zip_gaxi){if(fa.body!=null){fa.zip_gaxi=false;fa.validate_laxi();var e9=fa.body;if(e9.zip_axis){e9.zip_axis=false;e9.axisx=Math.sin(e9.rot);e9.axisy=Math.cos(e9.rot)}if(fa.zip_gverts){if(fa.body!=null){fa.zip_gverts=false;fa.validate_lverts();var e4=fa.body;if(e4.zip_axis){e4.zip_axis=false;e4.axisx=Math.sin(e4.rot);e4.axisy=Math.cos(e4.rot)}var fU=fa.lverts.next;var fI=fa.gverts.next;while(fI!=null){var fj=fI;var e8=fU;fU=fU.next;fj.x=fa.body.posx+(fa.body.axisy*e8.x-fa.body.axisx*e8.y);fj.y=fa.body.posy+(e8.x*fa.body.axisx+e8.y*fa.body.axisy);fI=fI.next}}}var eB=fa.edges.head;var fH=fa.gverts.next;var eH=fH;fH=fH.next;while(fH!=null){var eG=fH;var fm=eB.elt;eB=eB.next;fm.gp0=eH;fm.gp1=eG;fm.gnormx=fa.body.axisy*fm.lnormx-fa.body.axisx*fm.lnormy;fm.gnormy=fm.lnormx*fa.body.axisx+fm.lnormy*fa.body.axisy;fm.gprojection=fa.body.posx*fm.gnormx+fa.body.posy*fm.gnormy+fm.lprojection;if(fm.wrap_gnorm!=null){fm.wrap_gnorm.zpp_inner.x=fm.gnormx;fm.wrap_gnorm.zpp_inner.y=fm.gnormy}fm.tp0=fm.gp0.y*fm.gnormx-fm.gp0.x*fm.gnormy;fm.tp1=fm.gp1.y*fm.gnormx-fm.gp1.x*fm.gnormy;eH=eG;fH=fH.next}var eD=eB.elt;eD.gp0=eH;eD.gp1=fa.gverts.next;eD.gnormx=fa.body.axisy*eD.lnormx-fa.body.axisx*eD.lnormy;eD.gnormy=eD.lnormx*fa.body.axisx+eD.lnormy*fa.body.axisy;eD.gprojection=fa.body.posx*eD.gnormx+fa.body.posy*eD.gnormy+eD.lprojection;if(eD.wrap_gnorm!=null){eD.wrap_gnorm.zpp_inner.x=eD.gnormx;eD.wrap_gnorm.zpp_inner.y=eD.gnormy}eD.tp0=eD.gp0.y*eD.gnormx-eD.gp0.x*eD.gnormy;eD.tp1=eD.gp1.y*eD.gnormx-eD.gp1.x*eD.gnormy}}}eJ.validate_sweepRadius();if(eJ.sweepRadius>ex.sweepRadius){ex.sweepRadius=eJ.sweepRadius}fJ=fJ.next}ex.validate_mass();ex.validate_inertia();if(ex.shapes.head!=null){if(ex.zip_aabb){ex.zip_aabb=false;ex.aabb.minx=Infinity;ex.aabb.miny=Infinity;ex.aabb.maxx=-Infinity;ex.aabb.maxy=-Infinity;var fF=ex.shapes.head;while(fF!=null){var ek=fF.elt;if(ek.zip_aabb){if(ek.body!=null){ek.zip_aabb=false;if(ek.type==0){var eY=ek.circle;if(eY.zip_worldCOM){if(eY.body!=null){eY.zip_worldCOM=false;if(eY.zip_localCOM){eY.zip_localCOM=false;if(eY.type==1){var eV=eY.polygon;if(eV.lverts.next.next==null){eV.localCOMx=eV.lverts.next.x;eV.localCOMy=eV.lverts.next.y}else{if(eV.lverts.next.next.next==null){eV.localCOMx=eV.lverts.next.x;eV.localCOMy=eV.lverts.next.y;eV.localCOMx+=eV.lverts.next.next.x;eV.localCOMy+=eV.lverts.next.next.y;eV.localCOMx*=0.5;eV.localCOMy*=0.5}else{eV.localCOMx=0;eV.localCOMy=0;var ee=0;var fD=eV.lverts.next;var fQ=fD;fD=fD.next;var fG=fD;fD=fD.next;while(fD!=null){var eF=fD;ee+=fG.x*(eF.y-fQ.y);var eK=eF.y*fG.x-eF.x*fG.y;eV.localCOMx+=(fG.x+eF.x)*eK;eV.localCOMy+=(fG.y+eF.y)*eK;fQ=fG;fG=eF;fD=fD.next}fD=eV.lverts.next;var e5=fD;ee+=fG.x*(e5.y-fQ.y);var el=e5.y*fG.x-e5.x*fG.y;eV.localCOMx+=(fG.x+e5.x)*el;eV.localCOMy+=(fG.y+e5.y)*el;fQ=fG;fD=fD.next;var eZ=fD;ee+=e5.x*(eZ.y-fQ.y);var ej=eZ.y*e5.x-eZ.x*e5.y;eV.localCOMx+=(e5.x+eZ.x)*ej;eV.localCOMy+=(e5.y+eZ.y)*ej;ee=1/(3*ee);var eI=ee;eV.localCOMx*=eI;eV.localCOMy*=eI}}}if(eY.wrap_localCOM!=null){eY.wrap_localCOM.zpp_inner.x=eY.localCOMx;eY.wrap_localCOM.zpp_inner.y=eY.localCOMy}}var eS=eY.body;if(eS.zip_axis){eS.zip_axis=false;eS.axisx=Math.sin(eS.rot);eS.axisy=Math.cos(eS.rot)}eY.worldCOMx=eY.body.posx+(eY.body.axisy*eY.localCOMx-eY.body.axisx*eY.localCOMy);eY.worldCOMy=eY.body.posy+(eY.localCOMx*eY.body.axisx+eY.localCOMy*eY.body.axisy)}}var fS=eY.radius;var fR=eY.radius;eY.aabb.minx=eY.worldCOMx-fS;eY.aabb.miny=eY.worldCOMy-fR;eY.aabb.maxx=eY.worldCOMx+fS;eY.aabb.maxy=eY.worldCOMy+fR}else{var eO=ek.polygon;if(eO.zip_gverts){if(eO.body!=null){eO.zip_gverts=false;eO.validate_lverts();var eL=eO.body;if(eL.zip_axis){eL.zip_axis=false;eL.axisx=Math.sin(eL.rot);eL.axisy=Math.cos(eL.rot)}var ey=eO.lverts.next;var fB=eO.gverts.next;while(fB!=null){var ec=fB;var ep=ey;ey=ey.next;ec.x=eO.body.posx+(eO.body.axisy*ep.x-eO.body.axisx*ep.y);ec.y=eO.body.posy+(ep.x*eO.body.axisx+ep.y*eO.body.axisy);fB=fB.next}}}var fz=eO.gverts.next;eO.aabb.minx=fz.x;eO.aabb.miny=fz.y;eO.aabb.maxx=fz.x;eO.aabb.maxy=fz.y;var fA=eO.gverts.next.next;while(fA!=null){var eR=fA;if(eR.xeO.aabb.maxx){eO.aabb.maxx=eR.x}if(eR.yeO.aabb.maxy){eO.aabb.maxy=eR.y}fA=fA.next}}}}var ft=ex.aabb;var eE=ek.aabb;if(eE.minxft.maxx){ft.maxx=eE.maxx}if(eE.minyft.maxy){ft.maxy=eE.maxy}fF=fF.next}}ex.validate_worldCOM()}ex.validate_gravMass();if(ex.zip_axis){ex.zip_axis=false;ex.axisx=Math.sin(ex.rot);ex.axisy=Math.cos(ex.rot)}if(ex.component.woken&&ex.cbSet!=null){var fy=ex.cbSet.bodylisteners.head;while(fy!=null){var fe=fy.elt;if(fe.event!=2){fy=fy.next;continue}var eW=this.push_callback(fe);eW.event=2;eW.body=ex;fy=fy.next}}ex.component.woken=false;var fw=ex.shapes.head;while(fw!=null){this.bphase.sync(fw.elt);fw=fw.next}fK=fK.next}var fg=this.kinematics.head;while(fg!=null){var em=fg.elt;em.sweepRadius=0;var ff=em.shapes.head;while(ff!=null){var ei=ff.elt;if(ei.type==1){var fs=ei.polygon;if(fs.zip_sanitation){fs.zip_sanitation=false;fs.splice_collinear_real()}var fr=ei.polygon;if(fr.zip_gaxi){if(fr.body!=null){fr.zip_gaxi=false;fr.validate_laxi();var fq=fr.body;if(fq.zip_axis){fq.zip_axis=false;fq.axisx=Math.sin(fq.rot);fq.axisy=Math.cos(fq.rot)}if(fr.zip_gverts){if(fr.body!=null){fr.zip_gverts=false;fr.validate_lverts();var fp=fr.body;if(fp.zip_axis){fp.zip_axis=false;fp.axisx=Math.sin(fp.rot);fp.axisy=Math.cos(fp.rot)}var ew=fr.lverts.next;var fd=fr.gverts.next;while(fd!=null){var eb=fd;var eo=ew;ew=ew.next;eb.x=fr.body.posx+(fr.body.axisy*eo.x-fr.body.axisx*eo.y);eb.y=fr.body.posy+(eo.x*fr.body.axisx+eo.y*fr.body.axisy);fd=fd.next}}}var fh=fr.edges.head;var fb=fr.gverts.next;var fP=fb;fb=fb.next;while(fb!=null){var fE=fb;var eC=fh.elt;fh=fh.next;eC.gp0=fP;eC.gp1=fE;eC.gnormx=fr.body.axisy*eC.lnormx-fr.body.axisx*eC.lnormy;eC.gnormy=eC.lnormx*fr.body.axisx+eC.lnormy*fr.body.axisy;eC.gprojection=fr.body.posx*eC.gnormx+fr.body.posy*eC.gnormy+eC.lprojection;if(eC.wrap_gnorm!=null){eC.wrap_gnorm.zpp_inner.x=eC.gnormx;eC.wrap_gnorm.zpp_inner.y=eC.gnormy}eC.tp0=eC.gp0.y*eC.gnormx-eC.gp0.x*eC.gnormy;eC.tp1=eC.gp1.y*eC.gnormx-eC.gp1.x*eC.gnormy;fP=fE;fb=fb.next}var ez=fh.elt;ez.gp0=fP;ez.gp1=fr.gverts.next;ez.gnormx=fr.body.axisy*ez.lnormx-fr.body.axisx*ez.lnormy;ez.gnormy=ez.lnormx*fr.body.axisx+ez.lnormy*fr.body.axisy;ez.gprojection=fr.body.posx*ez.gnormx+fr.body.posy*ez.gnormy+ez.lprojection;if(ez.wrap_gnorm!=null){ez.wrap_gnorm.zpp_inner.x=ez.gnormx;ez.wrap_gnorm.zpp_inner.y=ez.gnormy}ez.tp0=ez.gp0.y*ez.gnormx-ez.gp0.x*ez.gnormy;ez.tp1=ez.gp1.y*ez.gnormx-ez.gp1.x*ez.gnormy}}}ei.validate_sweepRadius();if(ei.sweepRadius>em.sweepRadius){em.sweepRadius=ei.sweepRadius}ff=ff.next}em.validate_mass();em.validate_inertia();if(em.shapes.head!=null){if(em.zip_aabb){em.zip_aabb=false;em.aabb.minx=Infinity;em.aabb.miny=Infinity;em.aabb.maxx=-Infinity;em.aabb.maxy=-Infinity;var e7=em.shapes.head;while(e7!=null){var eh=e7.elt;if(eh.zip_aabb){if(eh.body!=null){eh.zip_aabb=false;if(eh.type==0){var fo=eh.circle;if(fo.zip_worldCOM){if(fo.body!=null){fo.zip_worldCOM=false;if(fo.zip_localCOM){fo.zip_localCOM=false;if(fo.type==1){var fn=fo.polygon;if(fn.lverts.next.next==null){fn.localCOMx=fn.lverts.next.x;fn.localCOMy=fn.lverts.next.y}else{if(fn.lverts.next.next.next==null){fn.localCOMx=fn.lverts.next.x;fn.localCOMy=fn.lverts.next.y;fn.localCOMx+=fn.lverts.next.next.x;fn.localCOMy+=fn.lverts.next.next.y;fn.localCOMx*=0.5;fn.localCOMy*=0.5}else{fn.localCOMx=0;fn.localCOMy=0;var fv=0;var e0=fn.lverts.next;var fO=e0;e0=e0.next;var fC=e0;e0=e0.next;while(e0!=null){var eU=e0;fv+=fC.x*(eU.y-fO.y);var eg=eU.y*fC.x-eU.x*fC.y;fn.localCOMx+=(fC.x+eU.x)*eg;fn.localCOMy+=(fC.y+eU.y)*eg;fO=fC;fC=eU;e0=e0.next}e0=fn.lverts.next;var eQ=e0;fv+=fC.x*(eQ.y-fO.y);var ef=eQ.y*fC.x-eQ.x*fC.y;fn.localCOMx+=(fC.x+eQ.x)*ef;fn.localCOMy+=(fC.y+eQ.y)*ef;fO=fC;e0=e0.next;var eN=e0;fv+=eQ.x*(eN.y-fO.y);var ed=eN.y*eQ.x-eN.x*eQ.y;fn.localCOMx+=(eQ.x+eN.x)*ed;fn.localCOMy+=(eQ.y+eN.y)*ed;fv=1/(3*fv);var fT=fv;fn.localCOMx*=fT;fn.localCOMy*=fT}}}if(fo.wrap_localCOM!=null){fo.wrap_localCOM.zpp_inner.x=fo.localCOMx;fo.wrap_localCOM.zpp_inner.y=fo.localCOMy}}var fl=fo.body;if(fl.zip_axis){fl.zip_axis=false;fl.axisx=Math.sin(fl.rot);fl.axisy=Math.cos(fl.rot)}fo.worldCOMx=fo.body.posx+(fo.body.axisy*fo.localCOMx-fo.body.axisx*fo.localCOMy);fo.worldCOMy=fo.body.posy+(fo.localCOMx*fo.body.axisx+fo.localCOMy*fo.body.axisy)}}var fL=fo.radius;var fu=fo.radius;fo.aabb.minx=fo.worldCOMx-fL;fo.aabb.miny=fo.worldCOMy-fu;fo.aabb.maxx=fo.worldCOMx+fL;fo.aabb.maxy=fo.worldCOMy+fu}else{var fk=eh.polygon;if(fk.zip_gverts){if(fk.body!=null){fk.zip_gverts=false;fk.validate_lverts();var fi=fk.body;if(fi.zip_axis){fi.zip_axis=false;fi.axisx=Math.sin(fi.rot);fi.axisy=Math.cos(fi.rot)}var ev=fk.lverts.next;var eX=fk.gverts.next;while(eX!=null){var ea=eX;var en=ev;ev=ev.next;ea.x=fk.body.posx+(fk.body.axisy*en.x-fk.body.axisx*en.y);ea.y=fk.body.posy+(en.x*fk.body.axisx+en.y*fk.body.axisy);eX=eX.next}}}var e6=fk.gverts.next;fk.aabb.minx=e6.x;fk.aabb.miny=e6.y;fk.aabb.maxx=e6.x;fk.aabb.maxy=e6.y;var eT=fk.gverts.next.next;while(eT!=null){var fx=eT;if(fx.xfk.aabb.maxx){fk.aabb.maxx=fx.x}if(fx.yfk.aabb.maxy){fk.aabb.maxy=fx.y}eT=eT.next}}}}var eA=em.aabb;var es=eh.aabb;if(es.minxeA.maxx){eA.maxx=es.maxx}if(es.minyeA.maxy){eA.maxy=es.maxy}e7=e7.next}}em.validate_worldCOM()}em.validate_gravMass();if(em.zip_axis){em.zip_axis=false;em.axisx=Math.sin(em.rot);em.axisy=Math.cos(em.rot)}var eP=em.shapes.head;while(eP!=null){this.bphase.sync(eP.elt);eP=eP.next}fg=fg.next}var eM=this.live_constraints.head;while(eM!=null){var eu=eM.elt;if(eu.active){if(eu.component.woken&&eu.cbSet!=null){var et=eu.cbSet.conlisteners.head;while(et!=null){var fM=et.elt;if(fM.event!=2){et=et.next;continue}var fN=this.push_callback(fM);fN.event=2;fN.constraint=eu;et=et.next}}eu.component.woken=false}eM=eM.next}};a3.prototype.updateVel=function(ed){var ee=1-ed*this.global_lin_drag;var ec=1-ed*this.global_ang_drag;var eb=this.live.head;while(eb!=null){var eg=eb.elt;if(eg.smass!=0){var ef=ed*eg.imass;eg.velx=ee*eg.velx+(eg.forcex+this.gravityx*eg.gravMass)*ef;eg.vely=ee*eg.vely+(eg.forcey+this.gravityy*eg.gravMass)*ef}if(eg.sinertia!=0){var ea=0;var eh=0;ea=eg.worldCOMx-eg.posx;eh=eg.worldCOMy-eg.posy;eg.angvel=ec*eg.angvel+(eg.torque+(this.gravityy*ea-this.gravityx*eh)*eg.gravMass)*ed*eg.iinertia}eb=eb.next}};a3.prototype.updatePos=function(ez){var el=2*Math.PI/ez;var fy=this.live.head;while(fy!=null){var eL=fy.elt;eL.pre_posx=eL.posx;eL.pre_posy=eL.posy;eL.pre_rot=eL.rot;eL.sweepTime=0;eL.sweep_angvel=eL.angvel%el;var en=ez-eL.sweepTime;if(en!=0){eL.sweepTime=ez;eL.posx+=eL.velx*en;eL.posy+=eL.vely*en;if(eL.angvel!=0){var eA=eL.sweep_angvel*en;eL.rot+=eA;if(eA*eA>0.0001){eL.axisx=Math.sin(eL.rot);eL.axisy=Math.cos(eL.rot)}else{var fd=eA*eA;var eT=1-0.5*fd;var e1=1-fd*fd/8;var fe=(eT*eL.axisx+eA*eL.axisy)*e1;eL.axisy=(eT*eL.axisy-eA*eL.axisx)*e1;eL.axisx=fe}}}if(!eL.disableCCD){var eN=P.staticCCDLinearThreshold*eL.sweepRadius;var fV=P.staticCCDAngularThreshold;if((eL.velx*eL.velx+eL.vely*eL.vely)*ez*ez>eN*eN||eL.angvel*eL.angvel*ez*ez>fV*fV||eL.type==3){var eW=eL.sweep_angvel;if(eW<0){eW=-eW}var fD=1/eW;var fw=eL.shapes.head;while(fw!=null){var eQ=fw.elt;var ep=eQ.aabb;var eq=ep.minx;var eo=ep.miny;var fA=ep.maxx;var fz=ep.maxy;var ex=eW*ez*eQ.sweepCoef*0.008333333333333333|0;if(ex>8){ex=8}var eU=eW*ez/ex;var fG=ez-eL.sweepTime;if(fG!=0){eL.sweepTime=ez;eL.posx+=eL.velx*fG;eL.posy+=eL.vely*fG;if(eL.angvel!=0){var ew=eL.sweep_angvel*fG;eL.rot+=ew;if(ew*ew>0.0001){eL.axisx=Math.sin(eL.rot);eL.axisy=Math.cos(eL.rot)}else{var fb=ew*ew;var fn=1-0.5*fb;var em=1-fb*fb/8;var fO=(fn*eL.axisx+ew*eL.axisy)*em;eL.axisy=(fn*eL.axisy-ew*eL.axisx)*em;eL.axisx=fO}}}if(eQ.type==0){var eI=eQ.circle;eI.worldCOMx=eI.body.posx+(eI.body.axisy*eI.localCOMx-eI.body.axisx*eI.localCOMy);eI.worldCOMy=eI.body.posy+(eI.localCOMx*eI.body.axisx+eI.localCOMy*eI.body.axisy);eI.aabb.minx=eI.worldCOMx-eI.radius;eI.aabb.miny=eI.worldCOMy-eI.radius;eI.aabb.maxx=eI.worldCOMx+eI.radius;eI.aabb.maxy=eI.worldCOMy+eI.radius}else{var e6=eQ.polygon;var fU=e6.lverts.next;var fp=e6.gverts.next;var e2=fU;fU=fU.next;fp.x=e6.body.posx+(e6.body.axisy*e2.x-e6.body.axisx*e2.y);fp.y=e6.body.posy+(e2.x*e6.body.axisx+e2.y*e6.body.axisy);e6.aabb.minx=fp.x;e6.aabb.miny=fp.y;e6.aabb.maxx=fp.x;e6.aabb.maxy=fp.y;var fv=e6.gverts.next.next;while(fv!=null){var fm=fv;var eH=fU;fU=fU.next;fm.x=e6.body.posx+(e6.body.axisy*eH.x-e6.body.axisx*eH.y);fm.y=e6.body.posy+(eH.x*e6.body.axisx+eH.y*e6.body.axisy);if(fm.xe6.aabb.maxx){e6.aabb.maxx=fm.x}if(fm.ye6.aabb.maxy){e6.aabb.maxy=fm.y}fv=fv.next}}if(eqep.maxx){ep.maxx=fA}else{fA=ep.maxx}if(fz>ep.maxy){ep.maxy=fz}else{fz=ep.maxy}var ej=1;var eh=ex;while(ej0.0001){eL.axisx=Math.sin(eL.rot);eL.axisy=Math.cos(eL.rot)}else{var fa=ev*ev;var fl=1-0.5*fa;var ek=1-fa*fa/8;var fN=(fl*eL.axisx+ev*eL.axisy)*ek;eL.axisy=(fl*eL.axisy-ev*eL.axisx)*ek;eL.axisx=fN}}}if(eQ.type==0){var e5=eQ.circle;e5.worldCOMx=e5.body.posx+(e5.body.axisy*e5.localCOMx-e5.body.axisx*e5.localCOMy);e5.worldCOMy=e5.body.posy+(e5.localCOMx*e5.body.axisx+e5.localCOMy*e5.body.axisy);e5.aabb.minx=e5.worldCOMx-e5.radius;e5.aabb.miny=e5.worldCOMy-e5.radius;e5.aabb.maxx=e5.worldCOMx+e5.radius;e5.aabb.maxy=e5.worldCOMy+e5.radius}else{var e4=eQ.polygon;var eM=e4.lverts.next;var e3=e4.gverts.next;var eG=eM;eM=eM.next;e3.x=e4.body.posx+(e4.body.axisy*eG.x-e4.body.axisx*eG.y);e3.y=e4.body.posy+(eG.x*e4.body.axisx+eG.y*e4.body.axisy);e4.aabb.minx=e3.x;e4.aabb.miny=e3.y;e4.aabb.maxx=e3.x;e4.aabb.maxy=e3.y;var fu=e4.gverts.next.next;while(fu!=null){var fk=fu;var eF=eM;eM=eM.next;fk.x=e4.body.posx+(e4.body.axisy*eF.x-e4.body.axisx*eF.y);fk.y=e4.body.posy+(eF.x*e4.body.axisx+eF.y*e4.body.axisy);if(fk.xe4.aabb.maxx){e4.aabb.maxx=fk.x}if(fk.ye4.aabb.maxy){e4.aabb.maxy=fk.y}fu=fu.next}}if(eqep.maxx){ep.maxx=fA}else{fA=ep.maxx}if(fz>ep.maxy){ep.maxy=fz}else{fz=ep.maxy}}this.bphase.sync(eQ);fw=fw.next}eL.sweepFrozen=false;if(eL.type==2&&eL.bulletEnabled){var fS=P.bulletCCDLinearThreshold*eL.sweepRadius;var fP=P.bulletCCDAngularThreshold;if((eL.velx*eL.velx+eL.vely*eL.vely)*ez*ez>fS*fS||eL.angvel*eL.angvel*ez*ez>fP*fP){eL.bullet=true}}}else{eL.sweepFrozen=true;eL.bullet=false}}else{eL.sweepFrozen=true;eL.bullet=false}fy=fy.next}var ft=this.kinematics.head;while(ft!=null){var ey=ft.elt;ey.pre_posx=ey.posx;ey.pre_posy=ey.posy;ey.pre_rot=ey.rot;ey.sweepTime=0;ey.sweep_angvel=ey.angvel%el;var fE=ez-ey.sweepTime;if(fE!=0){ey.sweepTime=ez;ey.posx+=ey.velx*fE;ey.posy+=ey.vely*fE;if(ey.angvel!=0){var eu=ey.sweep_angvel*fE;ey.rot+=eu;if(eu*eu>0.0001){ey.axisx=Math.sin(ey.rot);ey.axisy=Math.cos(ey.rot)}else{var e9=eu*eu;var fj=1-0.5*e9;var ei=1-e9*e9/8;var fM=(fj*ey.axisx+eu*ey.axisy)*ei;ey.axisy=(fj*ey.axisy-eu*ey.axisx)*ei;ey.axisx=fM}}}if(!ey.disableCCD){var fT=P.staticCCDLinearThreshold*ey.sweepRadius;var fQ=P.staticCCDAngularThreshold;if((ey.velx*ey.velx+ey.vely*ey.vely)*ez*ez>fT*fT||ey.angvel*ey.angvel*ez*ez>fQ*fQ||ey.type==3){var fr=ey.sweep_angvel;if(fr<0){fr=-fr}var fx=1/fr;var fs=ey.shapes.head;while(fs!=null){var es=fs.elt;var eb=es.aabb;var ea=eb.minx;var fR=eb.miny;var fc=eb.maxx;var eO=eb.maxy;var ef=fr*ez*es.sweepCoef*0.008333333333333333|0;if(ef>8){ef=8}var eS=fr*ez/ef;var fC=ez-ey.sweepTime;if(fC!=0){ey.sweepTime=ez;ey.posx+=ey.velx*fC;ey.posy+=ey.vely*fC;if(ey.angvel!=0){var et=ey.sweep_angvel*fC;ey.rot+=et;if(et*et>0.0001){ey.axisx=Math.sin(ey.rot);ey.axisy=Math.cos(ey.rot)}else{var e8=et*et;var fi=1-0.5*e8;var ee=1-e8*e8/8;var fL=(fi*ey.axisx+et*ey.axisy)*ee;ey.axisy=(fi*ey.axisy-et*ey.axisx)*ee;ey.axisx=fL}}}if(es.type==0){var e0=es.circle;e0.worldCOMx=e0.body.posx+(e0.body.axisy*e0.localCOMx-e0.body.axisx*e0.localCOMy);e0.worldCOMy=e0.body.posy+(e0.localCOMx*e0.body.axisx+e0.localCOMy*e0.body.axisy);e0.aabb.minx=e0.worldCOMx-e0.radius;e0.aabb.miny=e0.worldCOMy-e0.radius;e0.aabb.maxx=e0.worldCOMx+e0.radius;e0.aabb.maxy=e0.worldCOMy+e0.radius}else{var eY=es.polygon;var eK=eY.lverts.next;var eZ=eY.gverts.next;var eE=eK;eK=eK.next;eZ.x=eY.body.posx+(eY.body.axisy*eE.x-eY.body.axisx*eE.y);eZ.y=eY.body.posy+(eE.x*eY.body.axisx+eE.y*eY.body.axisy);eY.aabb.minx=eZ.x;eY.aabb.miny=eZ.y;eY.aabb.maxx=eZ.x;eY.aabb.maxy=eZ.y;var fq=eY.gverts.next.next;while(fq!=null){var fh=fq;var eD=eK;eK=eK.next;fh.x=eY.body.posx+(eY.body.axisy*eD.x-eY.body.axisx*eD.y);fh.y=eY.body.posy+(eD.x*eY.body.axisx+eD.y*eY.body.axisy);if(fh.xeY.aabb.maxx){eY.aabb.maxx=fh.x}if(fh.yeY.aabb.maxy){eY.aabb.maxy=fh.y}fq=fq.next}}if(eaeb.maxx){eb.maxx=fc}else{fc=eb.maxx}if(eO>eb.maxy){eb.maxy=eO}else{eO=eb.maxy}var eg=1;var ed=ef;while(eg0.0001){ey.axisx=Math.sin(ey.rot);ey.axisy=Math.cos(ey.rot)}else{var e7=er*er;var fg=1-0.5*e7;var ec=1-e7*e7/8;var fK=(fg*ey.axisx+er*ey.axisy)*ec;ey.axisy=(fg*ey.axisy-er*ey.axisx)*ec;ey.axisx=fK}}}if(es.type==0){var eV=es.circle;eV.worldCOMx=eV.body.posx+(eV.body.axisy*eV.localCOMx-eV.body.axisx*eV.localCOMy);eV.worldCOMy=eV.body.posy+(eV.localCOMx*eV.body.axisx+eV.localCOMy*eV.body.axisy);eV.aabb.minx=eV.worldCOMx-eV.radius;eV.aabb.miny=eV.worldCOMy-eV.radius;eV.aabb.maxx=eV.worldCOMx+eV.radius;eV.aabb.maxy=eV.worldCOMy+eV.radius}else{var eR=es.polygon;var eJ=eR.lverts.next;var eX=eR.gverts.next;var eC=eJ;eJ=eJ.next;eX.x=eR.body.posx+(eR.body.axisy*eC.x-eR.body.axisx*eC.y);eX.y=eR.body.posy+(eC.x*eR.body.axisx+eC.y*eR.body.axisy);eR.aabb.minx=eX.x;eR.aabb.miny=eX.y;eR.aabb.maxx=eX.x;eR.aabb.maxy=eX.y;var fo=eR.gverts.next.next;while(fo!=null){var ff=fo;var eB=eJ;eJ=eJ.next;ff.x=eR.body.posx+(eR.body.axisy*eB.x-eR.body.axisx*eB.y);ff.y=eR.body.posy+(eB.x*eR.body.axisx+eB.y*eR.body.axisy);if(ff.xeR.aabb.maxx){eR.aabb.maxx=ff.x}if(ff.yeR.aabb.maxy){eR.aabb.maxy=ff.y}fo=fo.next}}if(eaeb.maxx){eb.maxx=fc}else{fc=eb.maxx}if(eO>eb.maxy){eb.maxy=eO}else{eO=eb.maxy}}this.bphase.sync(es);fs=fs.next}ey.sweepFrozen=false;if(ey.type==2&&ey.bulletEnabled){var eP=P.bulletCCDLinearThreshold*ey.sweepRadius;var fJ=P.bulletCCDAngularThreshold;if((ey.velx*ey.velx+ey.vely*ey.vely)*ez*ez>eP*eP||ey.angvel*ey.angvel*ez*ez>fJ*fJ){ey.bullet=true}}}else{ey.sweepFrozen=true;ey.bullet=false}}else{ey.sweepFrozen=true;ey.bullet=false}ft=ft.next}};a3.prototype.continuous=null;a3.prototype.presteparb=function(el,gI,g3){if(g3==null){g3=false}var hn=this;if(!el.cleared&&(el.b1.component.sleeping&&el.b2.component.sleeping)){el.sleep_stamp=this.stamp;el.sleeping=true;return true}if(!el.cleared||el.present!=0||el.intchange){var ev=!g3&&el.up_stamp==this.stamp-1&&!el.cleared&&!el.intchange;var gf=el.fresh&&!el.cleared&&!el.intchange;if(ev){el.endGenerated=this.stamp}if(gf||ev||el.cleared||el.intchange){var gs=el.ws1;var gp=el.ws2;var gH=this.mrca1;while(gH.head!=null){var fK=gH.head;gH.head=fK.next;fK.elt=null;fK.next=g.zpp_pool;g.zpp_pool=fK;if(gH.head==null){gH.pushmod=true}gH.modified=true;gH.length--}gH.pushmod=true;var fg=this.mrca2;while(fg.head!=null){var hg=fg.head;fg.head=hg.next;hg.elt=null;hg.next=g.zpp_pool;g.zpp_pool=hg;if(fg.head==null){fg.pushmod=true}fg.modified=true;fg.length--}fg.pushmod=true;if(gs.cbSet!=null){var fd=this.mrca1;var hf;if(g.zpp_pool==null){hf=new g()}else{hf=g.zpp_pool;g.zpp_pool=hf.next;hf.next=null}hf.elt=gs;var gG=hf;gG.next=fd.head;fd.head=gG;fd.modified=true;fd.length++}if(gs.body.cbSet!=null){var fc=this.mrca1;var gW=gs.body;var he;if(g.zpp_pool==null){he=new g()}else{he=g.zpp_pool;g.zpp_pool=he.next;he.next=null}he.elt=gW;var fS=he;fS.next=fc.head;fc.head=fS;fc.modified=true;fc.length++}if(gp.cbSet!=null){var fb=this.mrca2;var hd;if(g.zpp_pool==null){hd=new g()}else{hd=g.zpp_pool;g.zpp_pool=hd.next;hd.next=null}hd.elt=gp;var fQ=hd;fQ.next=fb.head;fb.head=fQ;fb.modified=true;fb.length++}if(gp.body.cbSet!=null){var e9=this.mrca2;var hJ=gp.body;var hc;if(g.zpp_pool==null){hc=new g()}else{hc=g.zpp_pool;g.zpp_pool=hc.next;hc.next=null}hc.elt=hJ;var fN=hc;fN.next=e9.head;e9.head=fN;e9.modified=true;e9.length++}var hB=gs.body.compound;var hA=gp.body.compound;while(hB!=hA){if((hB==null?0:hB.depth)<(hA==null?0:hA.depth)){if(hA.cbSet!=null){var e7=this.mrca2;var hb;if(g.zpp_pool==null){hb=new g()}else{hb=g.zpp_pool;g.zpp_pool=hb.next;hb.next=null}hb.elt=hA;var fJ=hb;fJ.next=e7.head;e7.head=fJ;e7.modified=true;e7.length++}hA=hA.compound}else{if(hB.cbSet!=null){var e6=this.mrca1;var ha;if(g.zpp_pool==null){ha=new g()}else{ha=g.zpp_pool;g.zpp_pool=ha.next;ha.next=null}ha.elt=hB;var fG=ha;fG.next=e6.head;e6.head=fG;e6.modified=true;e6.length++}hB=hB.compound}}var en=this.mrca1.head;while(en!=null){var e1=en.elt;var eO=this.mrca2.head;while(eO!=null){var e0=eO.elt;var gc=e1.cbSet;var gb=e0.cbSet;var g8=null;var eM=(gc.cbpairs.length=Infinity||fA.s2.material.elasticity>=Infinity){fA.restitution=1}else{fA.restitution=(fA.s1.material.elasticity+fA.s2.material.elasticity)/2}}if(fA.restitution<0){fA.restitution=0}if(fA.restitution>1){fA.restitution=1}}if(!fA.userdef_dyn_fric){fA.dyn_fric=Math.sqrt(fA.s1.material.dynamicFriction*fA.s2.material.dynamicFriction)}if(!fA.userdef_stat_fric){fA.stat_fric=Math.sqrt(fA.s1.material.staticFriction*fA.s2.material.staticFriction)}if(!fA.userdef_rfric){fA.rfric=Math.sqrt(fA.s1.material.rollingFriction*fA.s2.material.rollingFriction)}}if(fA.pre_dt==-1){fA.pre_dt=gI}var gS=gI/fA.pre_dt;fA.pre_dt=gI;var ef=fA.b1.smass+fA.b2.smass;fA.hc2=false;var fm=true;fA.biasCoef=fA.b1.type!=2||fA.b2.type!=2?fA.continuous?P.contactContinuousStaticBiasCoef:P.contactStaticBiasCoef:fA.continuous?P.contactContinuousBiasCoef:P.contactBiasCoef;fA.continuous=false;var hL=null;var hj=null;var ep=fA.innards.next;var eE=fA.contacts.next;while(eE!=null){var g6=eE;if(g6.stamp+P.arbiterExpirationDelay-P.elasticThreshold){gY.bounce=0}eZ=e2*fA.nx-e3*fA.ny;var ez=P.staticFrictionThreshold;if(eZ*eZ>ez*ez){gY.friction=fA.dyn_fric}else{gY.friction=fA.stat_fric}gY.jnAcc*=gS;gY.jtAcc*=gS}if(f4!=g6.active){fA.contacts.modified=true}hL=eE;hj=ep;ep=ep.next;eE=eE.next}if(fA.hc2){fA.hpc2=true;if(fA.oc1.posOnly){var fj=fA.c1;fA.c1=fA.c2;fA.c2=fj;var gX=fA.oc1;fA.oc1=fA.oc2;fA.oc2=gX;fA.hc2=false}else{if(fA.oc2.posOnly){fA.hc2=false}}if(fA.oc1.posOnly){fm=true}}else{fA.hpc2=false}fA.jrAcc*=gS;if(!fm){fA.rn1a=fA.ny*fA.c1.r1x-fA.nx*fA.c1.r1y;fA.rt1a=fA.c1.r1x*fA.nx+fA.c1.r1y*fA.ny;fA.rn1b=fA.ny*fA.c1.r2x-fA.nx*fA.c1.r2y;fA.rt1b=fA.c1.r2x*fA.nx+fA.c1.r2y*fA.ny;fA.k1x=fA.b2.kinvelx-fA.c1.r2y*fA.b2.kinangvel-(fA.b1.kinvelx-fA.c1.r1y*fA.b1.kinangvel);fA.k1y=fA.b2.kinvely+fA.c1.r2x*fA.b2.kinangvel-(fA.b1.kinvely+fA.c1.r1x*fA.b1.kinangvel)}if(fA.hc2){fA.rn2a=fA.ny*fA.c2.r1x-fA.nx*fA.c2.r1y;fA.rt2a=fA.c2.r1x*fA.nx+fA.c2.r1y*fA.ny;fA.rn2b=fA.ny*fA.c2.r2x-fA.nx*fA.c2.r2y;fA.rt2b=fA.c2.r2x*fA.nx+fA.c2.r2y*fA.ny;fA.k2x=fA.b2.kinvelx-fA.c2.r2y*fA.b2.kinangvel-(fA.b1.kinvelx-fA.c2.r1y*fA.b1.kinangvel);fA.k2y=fA.b2.kinvely+fA.c2.r2x*fA.b2.kinangvel-(fA.b1.kinvely+fA.c2.r1x*fA.b1.kinangvel);fA.kMassa=ef+fA.b1.sinertia*fA.rn1a*fA.rn1a+fA.b2.sinertia*fA.rn1b*fA.rn1b;fA.kMassb=ef+fA.b1.sinertia*fA.rn1a*fA.rn2a+fA.b2.sinertia*fA.rn1b*fA.rn2b;fA.kMassc=ef+fA.b1.sinertia*fA.rn2a*fA.rn2a+fA.b2.sinertia*fA.rn2b*fA.rn2b;if(fA.kMassa*fA.kMassa+2*fA.kMassb*fA.kMassb+fA.kMassc*fA.kMassceN){var fI=eP+eN;ek-=eF*fI;ej-=eD*fI}else{if(ePfs.ws2.worldCOMx*eY+fs.ws2.worldCOMy*eX){var fC=eP+eN;ek-=eY*fC;ej-=eX*fC}else{var fz=eP+eN;ek+=eY*fz;ej+=eX*fz}}}}else{if(fs.ws1.fluidEnabled){var gL=fs.overlap*fs.ws1.fluidProperties.density;ek-=eF*gL;ej-=eD*gL}else{if(fs.ws2.fluidEnabled){var eL=fs.overlap*fs.ws2.fluidProperties.density;ek+=ey*eL;ej+=ew*eL}}}ek*=gI;ej*=gI;fs.buoyx=ek;fs.buoyy=ej;if(fs.b1.type==2){var fx=fs.b1.imass;fs.b1.velx-=ek*fx;fs.b1.vely-=ej*fx;fs.b1.angvel-=(ej*fs.r1x-ek*fs.r1y)*fs.b1.iinertia}if(fs.b2.type==2){var fu=fs.b2.imass;fs.b2.velx+=ek*fu;fs.b2.vely+=ej*fu;fs.b2.angvel+=(ej*fs.r2x-ek*fs.r2y)*fs.b2.iinertia}if((!fs.ws1.fluidEnabled||fs.ws1.fluidProperties.viscosity==0)&&(!fs.ws2.fluidEnabled||fs.ws2.fluidProperties.viscosity==0)){fs.nodrag=true;fs.dampx=0;fs.dampy=0;fs.adamp=0}else{fs.nodrag=false;var fr=0;if(fs.ws1.fluidEnabled){fs.ws2.validate_angDrag();fr=fs.ws1.fluidProperties.viscosity*fs.ws2.angDrag*fs.overlap/fs.ws2.area}if(fs.ws2.fluidEnabled){fs.ws1.validate_angDrag();fr+=fs.ws2.fluidProperties.viscosity*fs.ws1.angDrag*fs.overlap/fs.ws1.area}if(fr!=0){var g5=fs.b1.sinertia+fs.b2.sinertia;if(g5!=0){fs.wMass=1/g5}else{fs.wMass=0}fr*=0.0004;var eQ=2*Math.PI*fr;fs.agamma=1/(gI*eQ*(2+eQ*gI));var eA=1/(1+fs.agamma);fs.agamma*=eA;fs.wMass*=eA}else{fs.wMass=0;fs.agamma=0}var eT=fs.b2.velx+fs.b2.kinvelx-fs.r2y*(fs.b2.angvel+fs.b2.kinangvel)-(fs.b1.velx+fs.b1.kinvelx-fs.r1y*(fs.b2.angvel+fs.b2.kinangvel));var eR=fs.b2.vely+fs.b2.kinvely+fs.r2x*(fs.b2.angvel+fs.b2.kinangvel)-(fs.b1.vely+fs.b1.kinvely+fs.r1x*(fs.b1.angvel+fs.b1.kinangvel));if(!(eT*eT+eR*eR0){ff*=-P.fluidVacuumDrag;ff=ff}eW-=ff*0.5*P.fluidLinearDrag;eC=eC.next}eb=eW/eB}}if(fs.ws2.fluidEnabled){var gK=-fs.ws2.fluidProperties.viscosity*fs.overlap/fs.ws1.area;if(fs.ws1.type==0){eb-=gK*fs.ws1.circle.radius*P.fluidLinearDrag/(2*fs.ws1.circle.radius*Math.PI)}else{var gq=fs.ws1.polygon;var es=0;var fB=0;var gl=gq.edges.head;while(gl!=null){var g4=gl.elt;es+=g4.length;var eV=gK*g4.length*(g4.gnormx*fs.nx+g4.gnormy*fs.ny);if(eV>0){eV*=-P.fluidVacuumDrag;eV=eV}fB-=eV*0.5*P.fluidLinearDrag;gl=gl.next}eb+=fB/es}}if(eb!=0){var gZ=fs.b1.smass+fs.b2.smass;var gP=0;var gO=0;var gN=0;gP=gZ;gO=0;gN=gZ;if(fs.b1.sinertia!=0){var hi=fs.r1x*fs.b1.sinertia;var hh=fs.r1y*fs.b1.sinertia;gP=gZ+hh*fs.r1y;gO+=-hh*fs.r1x;gN=gZ+hi*fs.r1x}if(fs.b2.sinertia!=0){var g9=fs.r2x*fs.b2.sinertia;var gM=fs.r2y*fs.b2.sinertia;gP+=gM*fs.r2y;gO+=-gM*fs.r2x;gN+=g9*fs.r2x}var g0=gP*gN-gO*gO;if(g0!=g0){gN=0;gO=gN;gP=gO}else{if(g0==0){if(gP!=0){gP=1/gP}else{gP=0}if(gN!=0){gN=1/gN}else{gN=0}gO=0}else{g0=1/g0;var fq=gN*g0;gN=gP*g0;gP=fq;gO*=-g0}}fs.vMassa=gP;fs.vMassb=gO;fs.vMassc=gN;var eU=2*Math.PI*eb;fs.lgamma=1/(gI*eU*(2+eU*gI));var ei=1/(1+fs.lgamma);fs.lgamma*=ei;fs.vMassa*=ei;fs.vMassb*=ei;fs.vMassc*=ei}else{fs.vMassa=0;fs.vMassb=0;fs.vMassc=0;fs.lgamma=0}}fs.dampx*=eg;fs.dampy*=eg;fs.adamp*=eg}}}else{if(el.colarb!=null){var fo=el.colarb;var ed=true;var hK=null;var eh=null;var ea=fo.innards.next;fo.hc2=false;var gj=fo.contacts.next;while(gj!=null){var hz=gj;if(hz.stamp+P.arbiterExpirationDelayeH){ej=eH}else{if(ej<-eH){ej=-eH}}eE=ej-eb;eG.c1.jtAcc=ej;em=-eG.ny*eE;eF=eG.nx*eE;eG.b2.velx+=em*eG.b2.imass;eG.b2.vely+=eF*eG.b2.imass;eG.b1.velx-=em*eG.b1.imass;eG.b1.vely-=eF*eG.b1.imass;eG.b2.angvel+=eG.rt1b*eE*eG.b2.iinertia;eG.b1.angvel-=eG.rt1a*eE*eG.b1.iinertia;if(eG.hc2){var eD=eG.k2x+eG.b2.velx-eG.c2.r2y*eG.b2.angvel-(eG.b1.velx-eG.c2.r1y*eG.b1.angvel);var eC=eG.k2y+eG.b2.vely+eG.c2.r2x*eG.b2.angvel-(eG.b1.vely+eG.c2.r1x*eG.b1.angvel);eE=(eC*eG.nx-eD*eG.ny+eG.surfacex)*eG.c2.tMass;eH=eG.c2.friction*eG.c2.jnAcc;eb=eG.c2.jtAcc;ej=eb-eE;if(ej>eH){ej=eH}else{if(ej<-eH){ej=-eH}}eE=ej-eb;eG.c2.jtAcc=ej;em=-eG.ny*eE;eF=eG.nx*eE;eG.b2.velx+=em*eG.b2.imass;eG.b2.vely+=eF*eG.b2.imass;eG.b1.velx-=em*eG.b1.imass;eG.b1.vely-=eF*eG.b1.imass;eG.b2.angvel+=eG.rt2b*eE*eG.b2.iinertia;eG.b1.angvel-=eG.rt2a*eE*eG.b1.iinertia;eh=eG.k1x+eG.b2.velx-eG.c1.r2y*eG.b2.angvel-(eG.b1.velx-eG.c1.r1y*eG.b1.angvel);ef=eG.k1y+eG.b2.vely+eG.c1.r2x*eG.b2.angvel-(eG.b1.vely+eG.c1.r1x*eG.b1.angvel);eD=eG.k2x+eG.b2.velx-eG.c2.r2y*eG.b2.angvel-(eG.b1.velx-eG.c2.r1y*eG.b1.angvel);eC=eG.k2y+eG.b2.vely+eG.c2.r2x*eG.b2.angvel-(eG.b1.vely+eG.c2.r1x*eG.b1.angvel);var eq=eG.c1.jnAcc;var el=eG.c2.jnAcc;var eu=eh*eG.nx+ef*eG.ny+eG.surfacey+eG.c1.bounce-(eG.Ka*eq+eG.Kb*el);var es=eD*eG.nx+eC*eG.ny+eG.surfacey+eG.c2.bounce-(eG.Kb*eq+eG.Kc*el);var ee=-(eG.kMassa*eu+eG.kMassb*es);var ed=-(eG.kMassb*eu+eG.kMassc*es);if(ee>=0&&ed>=0){eu=ee-eq;es=ed-el;eG.c1.jnAcc=ee;eG.c2.jnAcc=ed}else{ee=-eG.c1.nMass*eu;if(ee>=0&&eG.Kb*ee+es>=0){eu=ee-eq;es=-el;eG.c1.jnAcc=ee;eG.c2.jnAcc=0}else{ed=-eG.c2.nMass*es;if(ed>=0&&eG.Kb*ed+eu>=0){eu=-eq;es=ed-el;eG.c1.jnAcc=0;eG.c2.jnAcc=ed}else{if(eu>=0&&es>=0){eu=-eq;es=-el;eG.c1.jnAcc=eG.c2.jnAcc=0}else{eu=0;es=0}}}}eE=eu+es;em=eG.nx*eE;eF=eG.ny*eE;eG.b2.velx+=em*eG.b2.imass;eG.b2.vely+=eF*eG.b2.imass;eG.b1.velx-=em*eG.b1.imass;eG.b1.vely-=eF*eG.b1.imass;eG.b2.angvel+=(eG.rn1b*eu+eG.rn2b*es)*eG.b2.iinertia;eG.b1.angvel-=(eG.rn1a*eu+eG.rn2a*es)*eG.b1.iinertia}else{if(eG.radius!=0){eE=(eG.b2.angvel-eG.b1.angvel)*eG.rMass;eH=eG.rfric*eG.c1.jnAcc;eb=eG.jrAcc;eG.jrAcc-=eE;if(eG.jrAcc>eH){eG.jrAcc=eH}else{if(eG.jrAcc<-eH){eG.jrAcc=-eH}}eE=eG.jrAcc-eb;eG.b2.angvel+=eE*eG.b2.iinertia;eG.b1.angvel-=eE*eG.b1.iinertia}eh=eG.k1x+eG.b2.velx-eG.c1.r2y*eG.b2.angvel-(eG.b1.velx-eG.c1.r1y*eG.b1.angvel);ef=eG.k1y+eG.b2.vely+eG.c1.r2x*eG.b2.angvel-(eG.b1.vely+eG.c1.r1x*eG.b1.angvel);eE=(eG.c1.bounce+(eG.nx*eh+eG.ny*ef)+eG.surfacey)*eG.c1.nMass;eb=eG.c1.jnAcc;ej=eb-eE;if(ej<0){ej=0}eE=ej-eb;eG.c1.jnAcc=ej;em=eG.nx*eE;eF=eG.ny*eE;eG.b2.velx+=em*eG.b2.imass;eG.b2.vely+=eF*eG.b2.imass;eG.b1.velx-=em*eG.b1.imass;eG.b1.vely-=eF*eG.b1.imass;eG.b2.angvel+=eG.rn1b*eE*eG.b2.iinertia;eG.b1.angvel-=eG.rn1a*eE*eG.b1.iinertia}}eA=eA.next;if(ea&&eA==null){eA=this.c_arbiters_true.head;ea=false}}}};a3.prototype.iteratePos=function(fo){var eh=0;while(eh0.0001){eI.axisx=Math.sin(eI.rot);eI.axisy=Math.cos(eI.rot)}else{var fx=eB*eB;var e6=1-0.5*fx;var fa=1-fx*fx/8;var fz=(e6*eI.axisx+eB*eI.axisy)*fa;eI.axisy=(e6*eI.axisy-eB*eI.axisx)*fa;eI.axisx=fz}var gj=gl.b2.imass;gl.b2.posx+=eZ*gj;gl.b2.posy+=eY*gj;var fe=gl.b2;var ev=eO*gl.b2.iinertia*eH;fe.rot+=ev;if(ev*ev>0.0001){fe.axisx=Math.sin(fe.rot);fe.axisy=Math.cos(fe.rot)}else{var fv=ev*ev;var fL=1-0.5*fv;var ej=1-fv*fv/8;var f4=(fL*fe.axisx+ev*fe.axisy)*ej;fe.axisy=(fL*fe.axisy-ev*fe.axisx)*ej;fe.axisx=f4}}}}}else{var eX=0;var eW=0;var e0;var fU=0;var fS=0;var fM=0;var fK=0;if(gl.ptype==0){eX=gl.b1.axisy*gl.lnormx-gl.b1.axisx*gl.lnormy;eW=gl.lnormx*gl.b1.axisx+gl.lnormy*gl.b1.axisy;e0=gl.lproj+(eX*gl.b1.posx+eW*gl.b1.posy);fU=gl.b2.axisy*gl.c1.lr1x-gl.b2.axisx*gl.c1.lr1y;fS=gl.c1.lr1x*gl.b2.axisx+gl.c1.lr1y*gl.b2.axisy;fU+=gl.b2.posx;fS+=gl.b2.posy;if(gl.hpc2){fM=gl.b2.axisy*gl.c2.lr1x-gl.b2.axisx*gl.c2.lr1y;fK=gl.c2.lr1x*gl.b2.axisx+gl.c2.lr1y*gl.b2.axisy;fM+=gl.b2.posx;fK+=gl.b2.posy}}else{eX=gl.b2.axisy*gl.lnormx-gl.b2.axisx*gl.lnormy;eW=gl.lnormx*gl.b2.axisx+gl.lnormy*gl.b2.axisy;e0=gl.lproj+(eX*gl.b2.posx+eW*gl.b2.posy);fU=gl.b1.axisy*gl.c1.lr1x-gl.b1.axisx*gl.c1.lr1y;fS=gl.c1.lr1x*gl.b1.axisx+gl.c1.lr1y*gl.b1.axisy;fU+=gl.b1.posx;fS+=gl.b1.posy;if(gl.hpc2){fM=gl.b1.axisy*gl.c2.lr1x-gl.b1.axisx*gl.c2.lr1y;fK=gl.c2.lr1x*gl.b1.axisx+gl.c2.lr1y*gl.b1.axisy;fM+=gl.b1.posx;fK+=gl.b1.posy}}var eN=fU*eX+fS*eW-e0-gl.radius;eN+=P.collisionSlop;var eK=0;if(gl.hpc2){eK=fM*eX+fK*eW-e0-gl.radius;eK+=P.collisionSlop}if(eN<0||eK<0){if(gl.rev){eX=-eX;eW=-eW}var fl=0;var fi=0;fl=fU-gl.b1.posx;fi=fS-gl.b1.posy;var eL=0;var eJ=0;eL=fU-gl.b2.posx;eJ=fS-gl.b2.posy;var fu=0;var fs=0;var eV=0;var eT=0;if(gl.hpc2){fu=fM-gl.b1.posx;fs=fK-gl.b1.posy;eV=fM-gl.b2.posx;eT=fK-gl.b2.posy;var eo=eW*fl-eX*fi;var em=eW*eL-eX*eJ;var gi=eW*fu-eX*fs;var gg=eW*eV-eX*eT;var eu=gl.b1.smass+gl.b2.smass;gl.kMassa=eu+gl.b1.sinertia*eo*eo+gl.b2.sinertia*em*em;gl.kMassb=eu+gl.b1.sinertia*eo*gi+gl.b2.sinertia*em*gg;gl.kMassc=eu+gl.b1.sinertia*gi*gi+gl.b2.sinertia*gg*gg;var eU=0;var eR=0;var eP=0;eU=gl.kMassa;eR=gl.kMassb;eP=gl.kMassc;var fn=eN*gl.biasCoef;var fk=eK*gl.biasCoef;while(true){var ge=0;var gc=0;ge=fn;gc=fk;ge=-fn;gc=-fk;var f7=gl.kMassa*gl.kMassc-gl.kMassb*gl.kMassb;if(f7!=f7){gc=0;ge=gc}else{if(f7==0){if(gl.kMassa!=0){ge/=gl.kMassa}else{ge=0}if(gl.kMassc!=0){gc/=gl.kMassc}else{gc=0}}else{f7=1/f7;var gh=f7*(gl.kMassc*ge-gl.kMassb*gc);gc=f7*(gl.kMassa*gc-gl.kMassb*ge);ge=gh}}if(ge>=0&&gc>=0){var gf=(ge+gc)*gl.b1.imass;gl.b1.posx-=eX*gf;gl.b1.posy-=eW*gf;var fc=gl.b1;var et=-gl.b1.iinertia*(eo*ge+gi*gc);fc.rot+=et;if(et*et>0.0001){fc.axisx=Math.sin(fc.rot);fc.axisy=Math.cos(fc.rot)}else{var fr=et*et;var fJ=1-0.5*fr;var ei=1-fr*fr/8;var f3=(fJ*fc.axisx+et*fc.axisy)*ei;fc.axisy=(fJ*fc.axisy-et*fc.axisx)*ei;fc.axisx=f3}var gd=(ge+gc)*gl.b2.imass;gl.b2.posx+=eX*gd;gl.b2.posy+=eW*gd;var fb=gl.b2;var es=gl.b2.iinertia*(em*ge+gg*gc);fb.rot+=es;if(es*es>0.0001){fb.axisx=Math.sin(fb.rot);fb.axisy=Math.cos(fb.rot)}else{var fq=es*es;var fH=1-0.5*fq;var eg=1-fq*fq/8;var f2=(fH*fb.axisx+es*fb.axisy)*eg;fb.axisy=(fH*fb.axisy-es*fb.axisx)*eg;fb.axisx=f2}break}ge=-fn/eU;gc=0;var eC=eR*ge+fk;if(ge>=0&&eC>=0){var gb=(ge+gc)*gl.b1.imass;gl.b1.posx-=eX*gb;gl.b1.posy-=eW*gb;var e9=gl.b1;var er=-gl.b1.iinertia*(eo*ge+gi*gc);e9.rot+=er;if(er*er>0.0001){e9.axisx=Math.sin(e9.rot);e9.axisy=Math.cos(e9.rot)}else{var fp=er*er;var fG=1-0.5*fp;var ef=1-fp*fp/8;var f1=(fG*e9.axisx+er*e9.axisy)*ef;e9.axisy=(fG*e9.axisy-er*e9.axisx)*ef;e9.axisx=f1}var ga=(ge+gc)*gl.b2.imass;gl.b2.posx+=eX*ga;gl.b2.posy+=eW*ga;var e8=gl.b2;var eq=gl.b2.iinertia*(em*ge+gg*gc);e8.rot+=eq;if(eq*eq>0.0001){e8.axisx=Math.sin(e8.rot);e8.axisy=Math.cos(e8.rot)}else{var fm=eq*eq;var fF=1-0.5*fm;var ee=1-fm*fm/8;var f0=(fF*e8.axisx+eq*e8.axisy)*ee;e8.axisy=(fF*e8.axisy-eq*e8.axisx)*ee;e8.axisx=f0}break}ge=0;gc=-fk/eP;var eD=eR*gc+fn;if(gc>=0&&eD>=0){var f9=(ge+gc)*gl.b1.imass;gl.b1.posx-=eX*f9;gl.b1.posy-=eW*f9;var e7=gl.b1;var ep=-gl.b1.iinertia*(eo*ge+gi*gc);e7.rot+=ep;if(ep*ep>0.0001){e7.axisx=Math.sin(e7.rot);e7.axisy=Math.cos(e7.rot)}else{var fj=ep*ep;var fE=1-0.5*fj;var ed=1-fj*fj/8;var fZ=(fE*e7.axisx+ep*e7.axisy)*ed;e7.axisy=(fE*e7.axisy-ep*e7.axisx)*ed;e7.axisx=fZ}var f8=(ge+gc)*gl.b2.imass;gl.b2.posx+=eX*f8;gl.b2.posy+=eW*f8;var e5=gl.b2;var en=gl.b2.iinertia*(em*ge+gg*gc);e5.rot+=en;if(en*en>0.0001){e5.axisx=Math.sin(e5.rot);e5.axisy=Math.cos(e5.rot)}else{var fh=en*en;var fD=1-0.5*fh;var ec=1-fh*fh/8;var fY=(fD*e5.axisx+en*e5.axisy)*ec;e5.axisy=(fD*e5.axisy-en*e5.axisx)*ec;e5.axisx=fY}break}break}}else{var eS=eW*fl-eX*fi;var eA=eW*eL-eX*eJ;var fN=gl.b2.smass+eA*eA*gl.b2.sinertia+gl.b1.smass+eS*eS*gl.b1.sinertia;if(fN!=0){var fI=-gl.biasCoef*eN/fN;var gm=0;var fX=0;gm=eX*fI;fX=eW*fI;var ez=gl.b1.imass;gl.b1.posx-=gm*ez;gl.b1.posy-=fX*ez;var e4=gl.b1;var el=-eS*gl.b1.iinertia*fI;e4.rot+=el;if(el*el>0.0001){e4.axisx=Math.sin(e4.rot);e4.axisy=Math.cos(e4.rot)}else{var ff=el*el;var fC=1-0.5*ff;var eb=1-ff*ff/8;var fW=(fC*e4.axisx+el*e4.axisy)*eb;e4.axisy=(fC*e4.axisy-el*e4.axisx)*eb;e4.axisx=fW}var ey=gl.b2.imass;gl.b2.posx+=gm*ey;gl.b2.posy+=fX*ey;var e2=gl.b2;var ek=eA*gl.b2.iinertia*fI;e2.rot+=ek;if(ek*ek>0.0001){e2.axisx=Math.sin(e2.rot);e2.axisy=Math.cos(e2.rot)}else{var fd=ek*ek;var fA=1-0.5*fd;var ea=1-fd*fd/8;var fV=(fA*e2.axisx+ek*e2.axisy)*ea;e2.axisy=(fA*e2.axisy-ek*e2.axisx)*ea;e2.axisx=fV}}}}}}fw=fw.next;if(fB&&fw==null){fw=this.c_arbiters_true.head;fB=false}}}};a3.prototype.group_ignore=function(ee,ed){var eg=ee;while(eg!=null&&eg.group==null){if(eg.ishape!=null){eg=eg.ishape.body}else{if(eg.icompound!=null){eg=eg.icompound.compound}else{eg=eg.ibody.compound}}}var eb=eg==null?null:eg.group;if(eb==null){return false}else{var ef=ed;while(ef!=null&&ef.group==null){if(ef.ishape!=null){ef=ef.ishape.body}else{if(ef.icompound!=null){ef=ef.icompound.compound}else{ef=ef.ibody.compound}}}var ea=ef==null?null:ef.group;if(ea==null){return false}else{var ec=false;while(eb!=null&&ea!=null){if(eb==ea){ec=eb.ignore;break}if(eb.depthfc.type){eV=fc;eT=fe}else{if(fe.type==fc.type){if(fe.idgL.ws2.id?gL.ws2:gL.ws1;var jE=gL.ws1.id>gL.ws2.id?gL.ws1:gL.ws2;var ek=this.mrca1;while(ek.head!=null){var iy=ek.head;ek.head=iy.next;iy.elt=null;iy.next=g.zpp_pool;g.zpp_pool=iy;if(ek.head==null){ek.pushmod=true}ek.modified=true;ek.length--}ek.pushmod=true;var ej=this.mrca2;while(ej.head!=null){var ix=ej.head;ej.head=ix.next;ix.elt=null;ix.next=g.zpp_pool;g.zpp_pool=ix;if(ej.head==null){ej.pushmod=true}ej.modified=true;ej.length--}ej.pushmod=true;if(jH.cbSet!=null){var gz=this.mrca1;var iu;if(g.zpp_pool==null){iu=new g()}else{iu=g.zpp_pool;g.zpp_pool=iu.next;iu.next=null}iu.elt=jH;var jt=iu;jt.next=gz.head;gz.head=jt;gz.modified=true;gz.length++}if(jH.body.cbSet!=null){var gx=this.mrca1;var gl=jH.body;var ir;if(g.zpp_pool==null){ir=new g()}else{ir=g.zpp_pool;g.zpp_pool=ir.next;ir.next=null}ir.elt=gl;var jr=ir;jr.next=gx.head;gx.head=jr;gx.modified=true;gx.length++}if(jE.cbSet!=null){var gv=this.mrca2;var ip;if(g.zpp_pool==null){ip=new g()}else{ip=g.zpp_pool;g.zpp_pool=ip.next;ip.next=null}ip.elt=jE;var jq=ip;jq.next=gv.head;gv.head=jq;gv.modified=true;gv.length++}if(jE.body.cbSet!=null){var gt=this.mrca2;var gk=jE.body;var il;if(g.zpp_pool==null){il=new g()}else{il=g.zpp_pool;g.zpp_pool=il.next;il.next=null}il.elt=gk;var jp=il;jp.next=gt.head;gt.head=jp;gt.modified=true;gt.length++}var jQ=jH.body.compound;var jN=jE.body.compound;while(jQ!=jN){if((jQ==null?0:jQ.depth)<(jN==null?0:jN.depth)){if(jN.cbSet!=null){var gs=this.mrca2;var ij;if(g.zpp_pool==null){ij=new g()}else{ij=g.zpp_pool;g.zpp_pool=ij.next;ij.next=null}ij.elt=jN;var jn=ij;jn.next=gs.head;gs.head=jn;gs.modified=true;gs.length++}jN=jN.compound}else{if(jQ.cbSet!=null){var gr=this.mrca1;var ih;if(g.zpp_pool==null){ih=new g()}else{ih=g.zpp_pool;g.zpp_pool=ih.next;ih.next=null}ih.elt=jQ;var jl=ih;jl.next=gr.head;gr.head=jl;gr.modified=true;gr.length++}jQ=jQ.compound}}var eP=this.mrca1.head;while(eP!=null){var hs=eP.elt;var eO=this.mrca2.head;while(eO!=null){var hr=eO.elt;var jR=hs.cbSet;var jO=hr.cbSet;var ie=null;var eN=(jR.cbpairs.length=Infinity||gJ.s2.material.elasticity>=Infinity){gJ.restitution=1}else{gJ.restitution=(gJ.s1.material.elasticity+gJ.s2.material.elasticity)/2}}if(gJ.restitution<0){gJ.restitution=0}if(gJ.restitution>1){gJ.restitution=1}}if(!gJ.userdef_dyn_fric){gJ.dyn_fric=Math.sqrt(gJ.s1.material.dynamicFriction*gJ.s2.material.dynamicFriction)}if(!gJ.userdef_stat_fric){gJ.stat_fric=Math.sqrt(gJ.s1.material.staticFriction*gJ.s2.material.staticFriction)}if(!gJ.userdef_rfric){gJ.rfric=Math.sqrt(gJ.s1.material.rollingFriction*gJ.s2.material.rollingFriction)}var hK;if(bi.zpp_pool==null){hK=new bi()}else{hK=bi.zpp_pool;bi.zpp_pool=hK.next;hK.next=null}hK.elt=gJ;var ik=hK;ik.next=hc.head;hc.head=ik;hc.modified=true;hc.length++;gJ.fresh=!gG}else{gJ.fresh=gJ.up_stampgJ.ws2.id?gJ.ws2:gJ.ws1;var es=gJ.ws1.id>gJ.ws2.id?gJ.ws1:gJ.ws2;var f7=this.mrca1;while(f7.head!=null){var hF=f7.head;f7.head=hF.next;hF.elt=null;hF.next=g.zpp_pool;g.zpp_pool=hF;if(f7.head==null){f7.pushmod=true}f7.modified=true;f7.length--}f7.pushmod=true;var f6=this.mrca2;while(f6.head!=null){var hD=f6.head;f6.head=hD.next;hD.elt=null;hD.next=g.zpp_pool;g.zpp_pool=hD;if(f6.head==null){f6.pushmod=true}f6.modified=true;f6.length--}f6.pushmod=true;if(eF.cbSet!=null){var f5=this.mrca1;var hB;if(g.zpp_pool==null){hB=new g()}else{hB=g.zpp_pool;g.zpp_pool=hB.next;hB.next=null}hB.elt=eF;var ii=hB;ii.next=f5.head;f5.head=ii;f5.modified=true;f5.length++}if(eF.body.cbSet!=null){var f3=this.mrca1;var jj=eF.body;var hz;if(g.zpp_pool==null){hz=new g()}else{hz=g.zpp_pool;g.zpp_pool=hz.next;hz.next=null}hz.elt=jj;var ig=hz;ig.next=f3.head;f3.head=ig;f3.modified=true;f3.length++}if(es.cbSet!=null){var f2=this.mrca2;var hy;if(g.zpp_pool==null){hy=new g()}else{hy=g.zpp_pool;g.zpp_pool=hy.next;hy.next=null}hy.elt=es;var ic=hy;ic.next=f2.head;f2.head=ic;f2.modified=true;f2.length++}if(es.body.cbSet!=null){var fU=this.mrca2;var jh=es.body;var hx;if(g.zpp_pool==null){hx=new g()}else{hx=g.zpp_pool;g.zpp_pool=hx.next;hx.next=null}hx.elt=jh;var ia=hx;ia.next=fU.head;fU.head=ia;fU.modified=true;fU.length++}var jC=eF.body.compound;var jd=es.body.compound;while(jC!=jd){if((jC==null?0:jC.depth)<(jd==null?0:jd.depth)){if(jd.cbSet!=null){var fR=this.mrca2;var hw;if(g.zpp_pool==null){hw=new g()}else{hw=g.zpp_pool;g.zpp_pool=hw.next;hw.next=null}hw.elt=jd;var h8=hw;h8.next=fR.head;fR.head=h8;fR.modified=true;fR.length++}jd=jd.compound}else{if(jC.cbSet!=null){var fP=this.mrca1;var hv;if(g.zpp_pool==null){hv=new g()}else{hv=g.zpp_pool;g.zpp_pool=hv.next;hv.next=null}hv.elt=jC;var h6=hv;h6.next=fP.head;fP.head=h6;fP.modified=true;fP.length++}jC=jC.compound}}var eg=this.mrca1.head;while(eg!=null){var fT=eg.elt;var ef=this.mrca2.head;while(ef!=null){var fG=ef.elt;var jD=fT.cbSet;var je=fG.cbSet;var hu=null;var ee=(jD.cbpairs.lengthgH.ws2.id?gH.ws2:gH.ws1;var ep=gH.ws1.id>gH.ws2.id?gH.ws1:gH.ws2;var fz=this.mrca1;while(fz.head!=null){var g7=fz.head;fz.head=g7.next;g7.elt=null;g7.next=g.zpp_pool;g.zpp_pool=g7;if(fz.head==null){fz.pushmod=true}fz.modified=true;fz.length--}fz.pushmod=true;var fy=this.mrca2;while(fy.head!=null){var g6=fy.head;fy.head=g6.next;g6.elt=null;g6.next=g.zpp_pool;g.zpp_pool=g6;if(fy.head==null){fy.pushmod=true}fy.modified=true;fy.length--}fy.pushmod=true;if(eE.cbSet!=null){var fx=this.mrca1;var g4;if(g.zpp_pool==null){g4=new g()}else{g4=g.zpp_pool;g.zpp_pool=g4.next;g4.next=null}g4.elt=eE;var hR=g4;hR.next=fx.head;fx.head=hR;fx.modified=true;fx.length++}if(eE.body.cbSet!=null){var fw=this.mrca1;var iR=eE.body;var g3;if(g.zpp_pool==null){g3=new g()}else{g3=g.zpp_pool;g.zpp_pool=g3.next;g3.next=null}g3.elt=iR;var hP=g3;hP.next=fw.head;fw.head=hP;fw.modified=true;fw.length++}if(ep.cbSet!=null){var fv=this.mrca2;var g0;if(g.zpp_pool==null){g0=new g()}else{g0=g.zpp_pool;g.zpp_pool=g0.next;g0.next=null}g0.elt=ep;var hN=g0;hN.next=fv.head;fv.head=hN;fv.modified=true;fv.length++}if(ep.body.cbSet!=null){var fu=this.mrca2;var iO=ep.body;var gZ;if(g.zpp_pool==null){gZ=new g()}else{gZ=g.zpp_pool;g.zpp_pool=gZ.next;gZ.next=null}gZ.elt=iO;var hL=gZ;hL.next=fu.head;fu.head=hL;fu.modified=true;fu.length++}var jB=eE.body.compound;var jb=ep.body.compound;while(jB!=jb){if((jB==null?0:jB.depth)<(jb==null?0:jb.depth)){if(jb.cbSet!=null){var fo=this.mrca2;var gW;if(g.zpp_pool==null){gW=new g()}else{gW=g.zpp_pool;g.zpp_pool=gW.next;gW.next=null}gW.elt=jb;var hI=gW;hI.next=fo.head;fo.head=hI;fo.modified=true;fo.length++}jb=jb.compound}else{if(jB.cbSet!=null){var fn=this.mrca1;var gV;if(g.zpp_pool==null){gV=new g()}else{gV=g.zpp_pool;g.zpp_pool=gV.next;gV.next=null}gV.elt=jB;var hE=gV;hE.next=fn.head;fn.head=hE;fn.modified=true;fn.length++}jB=jB.compound}}var j4=this.mrca1.head;while(j4!=null){var fQ=j4.elt;var j3=this.mrca2.head;while(j3!=null){var fE=j3.elt;var jA=fQ.cbSet;var ja=fE.cbSet;var gU=null;var j2=(jA.cbpairs.lengthea.aabb.minx};f.prototype.__class__=f;var c6=zpp_nape.space.ZPP_SweepPhase=function(ea){this.failed=null;this.list=null;dB.call(this);this.space=ea;this.is_sweep=true;this.sweep=this};c6.__name__=["zpp_nape","space","ZPP_SweepPhase"];c6.__super__=dB;c6.prototype=Object.create(dB.prototype);c6.prototype.list=null;c6.prototype.__insert=function(ea){var eb;if(f.zpp_pool==null){eb=new f()}else{eb=f.zpp_pool;f.zpp_pool=eb.next;eb.next=null}ea.sweep=eb;eb.shape=ea;eb.aabb=ea.aabb;eb.next=this.list;if(this.list!=null){this.list.prev=eb}this.list=eb};c6.prototype.__remove=function(ea){var eb=ea.sweep;if(eb.prev==null){this.list=eb.next}else{eb.prev.next=eb.next}if(eb.next!=null){eb.next.prev=eb.prev}ea.sweep=null;eb.prev=null;eb.shape=null;eb.aabb=null;eb.next=f.zpp_pool;f.zpp_pool=eb};c6.prototype.__sync=function(ea){if(!this.space.continuous){if(ea.zip_aabb){if(ea.body!=null){ea.zip_aabb=false;if(ea.type==0){var et=ea.circle;if(et.zip_worldCOM){if(et.body!=null){et.zip_worldCOM=false;if(et.zip_localCOM){et.zip_localCOM=false;if(et.type==1){var ey=et.polygon;if(ey.lverts.next.next==null){ey.localCOMx=ey.lverts.next.x;ey.localCOMy=ey.lverts.next.y}else{if(ey.lverts.next.next.next==null){ey.localCOMx=ey.lverts.next.x;ey.localCOMy=ey.lverts.next.y;ey.localCOMx+=ey.lverts.next.next.x;ey.localCOMy+=ey.lverts.next.next.y;ey.localCOMx*=0.5;ey.localCOMy*=0.5}else{ey.localCOMx=0;ey.localCOMy=0;var ez=0;var es=ey.lverts.next;var ek=es;es=es.next;var ej=es;es=es.next;while(es!=null){var eh=es;ez+=ej.x*(eh.y-ek.y);var en=eh.y*ej.x-eh.x*ej.y;ey.localCOMx+=(ej.x+eh.x)*en;ey.localCOMy+=(ej.y+eh.y)*en;ek=ej;ej=eh;es=es.next}es=ey.lverts.next;var ei=es;ez+=ej.x*(ei.y-ek.y);var ef=ei.y*ej.x-ei.x*ej.y;ey.localCOMx+=(ej.x+ei.x)*ef;ey.localCOMy+=(ej.y+ei.y)*ef;ek=ej;es=es.next;var eg=es;ez+=ei.x*(eg.y-ek.y);var ee=eg.y*ei.x-eg.x*ei.y;ey.localCOMx+=(ei.x+eg.x)*ee;ey.localCOMy+=(ei.y+eg.y)*ee;ez=1/(3*ez);var em=ez;ey.localCOMx*=em;ey.localCOMy*=em}}}if(et.wrap_localCOM!=null){et.wrap_localCOM.zpp_inner.x=et.localCOMx;et.wrap_localCOM.zpp_inner.y=et.localCOMy}}var ex=et.body;if(ex.zip_axis){ex.zip_axis=false;ex.axisx=Math.sin(ex.rot);ex.axisy=Math.cos(ex.rot)}et.worldCOMx=et.body.posx+(et.body.axisy*et.localCOMx-et.body.axisx*et.localCOMy);et.worldCOMy=et.body.posy+(et.localCOMx*et.body.axisx+et.localCOMy*et.body.axisy)}}var ed=et.radius;var ec=et.radius;et.aabb.minx=et.worldCOMx-ed;et.aabb.miny=et.worldCOMy-ec;et.aabb.maxx=et.worldCOMx+ed;et.aabb.maxy=et.worldCOMy+ec}else{var ev=ea.polygon;if(ev.zip_gverts){if(ev.body!=null){ev.zip_gverts=false;ev.validate_lverts();var eu=ev.body;if(eu.zip_axis){eu.zip_axis=false;eu.axisx=Math.sin(eu.rot);eu.axisy=Math.cos(eu.rot)}var el=ev.lverts.next;var eq=ev.gverts.next;while(eq!=null){var ew=eq;var er=el;el=el.next;ew.x=ev.body.posx+(ev.body.axisy*er.x-ev.body.axisx*er.y);ew.y=ev.body.posy+(er.x*ev.body.axisx+er.y*ev.body.axisy);eq=eq.next}}}var eb=ev.gverts.next;ev.aabb.minx=eb.x;ev.aabb.miny=eb.y;ev.aabb.maxx=eb.x;ev.aabb.maxy=eb.y;var ep=ev.gverts.next.next;while(ep!=null){var eo=ep;if(eo.xev.aabb.maxx){ev.aabb.maxx=eo.x}if(eo.yev.aabb.maxy){ev.aabb.maxy=eo.y}ep=ep.next}}}}}};c6.prototype.sync_broadphase=function(){this.space.validation();if(this.list!=null){var eb=this.list.next;while(eb!=null){var ed=eb.next;var ea=eb.prev;if(eb.aabb.minx>ea.aabb.minx){eb=ed;continue}while(ea.prev!=null&&ea.prev.aabb.minx>eb.aabb.minx){ea=ea.prev}var ec=eb.prev;ec.next=eb.next;if(eb.next!=null){eb.next.prev=ec}if(ea.prev==null){eb.prev=null;this.list=eb;eb.next=ea;ea.prev=eb}else{eb.prev=ea.prev;ea.prev=eb;eb.prev.next=eb;eb.next=ea}eb=ed}}};c6.prototype.sync_broadphase_fast=function(){var eb=this.list.next;while(eb!=null){var ed=eb.next;var ea=eb.prev;if(eb.aabb.minx>ea.aabb.minx){eb=ed;continue}while(ea.prev!=null&&ea.prev.aabb.minx>eb.aabb.minx){ea=ea.prev}var ec=eb.prev;ec.next=eb.next;if(eb.next!=null){eb.next.prev=ec}if(ea.prev==null){eb.prev=null;this.list=eb;eb.next=ea;ea.prev=eb}else{eb.prev=ea.prev;ea.prev=eb;eb.prev.next=eb;eb.next=ea}eb=ed}};c6.prototype.broadphase=function(eb,ef){if(this.list!=null){var em=this.list.next;while(em!=null){var ee=em.next;var ej=em.prev;if(em.aabb.minx>ej.aabb.minx){em=ee;continue}while(ej.prev!=null&&ej.prev.aabb.minx>em.aabb.minx){ej=ej.prev}var eg=em.prev;eg.next=em.next;if(em.next!=null){em.next.prev=eg}if(ej.prev==null){em.prev=null;this.list=em;em.next=ej;ej.prev=em}else{em.prev=ej.prev;ej.prev=em;em.prev.next=em;em.next=ej}em=ee}var ed=this.list;while(ed!=null){var ec=ed.next;var eo=ed.shape;var el=eo.body;var ea=ed.aabb.maxx;while(ec!=null){if(ec.aabb.minx>ea){break}var en=ec.shape;var ei=en.body;if(ei==el){ec=ec.next;continue}if(el.type==1&&ei.type==1){ec=ec.next;continue}if(el.component.sleeping&&ei.component.sleeping){ec=ec.next;continue}var eh=eo.aabb;var ek=en.aabb;if(!(ek.miny>eh.maxy||eh.miny>ek.maxy)){if(ef){eb.narrowPhase(eo,en,el.type!=2||ei.type!=2,null,false)}else{eb.continuousEvent(eo,en,el.type!=2||ei.type!=2,null,false)}}ec=ec.next}ed=ed.next}}};c6.prototype.clear=function(){while(this.list!=null){this.list.shape.removedFromSpace();this.__remove(this.list.shape)}};c6.prototype.shapesUnderPoint=function(ej,eg,ea,eb){this.sync_broadphase();var ef;if(bB.zpp_pool==null){ef=new bB()}else{ef=bB.zpp_pool;bB.zpp_pool=ef.next;ef.next=null}ef.weak=false;ef._immutable=false;ef.x=ej;ef.y=eg;var ek=ef;var eh=eb==null?new cZ():eb;var ei=this.list;while(ei!=null&&ei.aabb.minx>ej){ei=ei.next}while(ei!=null&&ei.aabb.minx<=ej){if(ei.aabb.maxx>=ej&&ei.aabb.miny<=eg&&ei.aabb.maxy>=eg){var ee=ei.shape;var ec;if(ea!=null){var ed=ee.filter;if((ed.collisionMask&ea.collisionGroup)!=0){ec=(ea.collisionMask&ed.collisionGroup)!=0}else{ec=false}}else{ec=true}if(ec){if(ee.type==0){if(b7.circleContains(ee.circle,ek)){eh.push(ee.outer)}}else{if(b7.polyContains(ee.polygon,ek)){eh.push(ee.outer)}}}}ei=ei.next}if(ek.outer!=null){ek.outer.zpp_inner=null;ek.outer=null}ek._isimmutable=null;ek._validate=null;ek._invalidate=null;ek.next=bB.zpp_pool;bB.zpp_pool=ek;return eh};c6.prototype.bodiesUnderPoint=function(ek,eh,ea,eb){this.sync_broadphase();var eg;if(bB.zpp_pool==null){eg=new bB()}else{eg=bB.zpp_pool;bB.zpp_pool=eg.next;eg.next=null}eg.weak=false;eg._immutable=false;eg.x=ek;eg.y=eh;var el=eg;var ei=eb==null?new a5():eb;var ej=this.list;while(ej!=null&&ej.aabb.minx>ek){ej=ej.next}while(ej!=null&&ej.aabb.minx<=ek){if(ej.aabb.maxx>=ek&&ej.aabb.miny<=eh&&ej.aabb.maxy>=eh){var ef=ej.shape;var ed=ef.body.outer;if(!ei.has(ed)){var ec;if(ea!=null){var ee=ef.filter;if((ee.collisionMask&ea.collisionGroup)!=0){ec=(ea.collisionMask&ee.collisionGroup)!=0}else{ec=false}}else{ec=true}if(ec){if(ef.type==0){if(b7.circleContains(ef.circle,el)){ei.push(ed)}}else{if(b7.polyContains(ef.polygon,el)){ei.push(ed)}}}}}ej=ej.next}if(el.outer!=null){el.outer.zpp_inner=null;el.outer=null}el._isimmutable=null;el._validate=null;el._invalidate=null;el.next=bB.zpp_pool;bB.zpp_pool=el;return ei};c6.prototype.shapesInAABB=function(eg,en,ea,ec,ed){this.sync_broadphase();this.updateAABBShape(eg);var ep=this.aabbShape.zpp_inner.aabb;var ek=ed==null?new cZ():ed;var eo=this.list;while(eo!=null&&eo.aabb.maxx=ep.minx&&em.miny>=ep.miny&&em.maxx<=ep.maxx&&em.maxy<=ep.maxy){ek.push(ej.outer)}else{var el=eo.aabb;if(ep.miny<=el.maxy&&el.miny<=ep.maxy&&ep.minx<=el.maxx&&el.minx<=ep.maxx){if(b7.testCollide_safe(ej,this.aabbShape.zpp_inner)){ek.push(ej.outer)}}}}}else{var ee;if(ea){var eb=eo.aabb;if(eb.minx>=ep.minx&&eb.miny>=ep.miny&&eb.maxx<=ep.maxx){ee=eb.maxy<=ep.maxy}else{ee=false}}else{var ei=eo.aabb;if(ep.miny<=ei.maxy&&ei.miny<=ep.maxy&&ep.minx<=ei.maxx){ee=ei.minx<=ep.maxx}else{ee=false}}if(ee){ek.push(ej.outer)}}}eo=eo.next}return ek};c6.prototype.failed=null;c6.prototype.bodiesInAABB=function(ec,er,em,eg,ed){this.sync_broadphase();this.updateAABBShape(ec);var eo=this.aabbShape.zpp_inner.aabb;var eq=ed==null?new a5():ed;if(this.failed==null){this.failed=new a5()}var ep=this.list;while(ep!=null&&ep.aabb.maxx=eo.minx&&ee.miny>=eo.miny&&ee.maxx<=eo.maxx&&ee.maxy<=eo.maxy;if(!eq.has(ef)&&el){eq.push(ef)}else{if(!el){eq.remove(ef);this.failed.push(ef)}}}}else{var eh;if(!eq.has(ef)){var ej=ea.aabb;if(ej.minx>=eo.minx&&ej.miny>=eo.miny&&ej.maxx<=eo.maxx){eh=ej.maxy<=eo.maxy}else{eh=false}}else{eh=false}if(eh){eq.push(ef)}}}}}ep=ep.next}this.failed.clear();return eq};c6.prototype.shapesInCircle=function(el,ej,eb,ea,ec,ed){this.sync_broadphase();this.updateCircShape(el,ej,eb);var em=this.circShape.zpp_inner.aabb;var eh=ed==null?new cZ():ed;var ek=this.list;while(ek!=null&&ek.aabb.maxx=0&&ei=0&&ee=0&&ed=0){if(eo.shape.type==0){ec.circlesect2(eo.shape.circle,eq,er)}else{ec.polysect2(eo.shape.polygon,eq,er)}}}eo=eo.next}}else{if(ec.dirx<0){var es=this.list;var en=null;while(es!=null&&es.aabb.minx<=ef.maxx){en=es;es=es.next}es=en;while(es!=null){var ee;var ek=es.aabb;if(ef.miny<=ek.maxy&&ek.miny<=ef.maxy&&ef.minx<=ek.maxx&&ek.minx<=ef.maxx){if(eb!=null){var ej=es.shape.filter;if((ej.collisionMask&eb.collisionGroup)!=0){ee=(eb.collisionMask&ej.collisionGroup)!=0}else{ee=false}}else{ee=true}}else{ee=false}if(ee){if(ec.aabbsect(es.aabb)>=0){if(es.shape.type==0){ec.circlesect2(es.shape.circle,eq,er)}else{ec.polysect2(es.shape.polygon,eq,er)}}}es=es.prev}}else{var ep=this.list;while(ep!=null&&ep.aabb.minx<=ef.maxx){var ed;var ei=ep.aabb;if(ef.miny<=ei.maxy&&ei.miny<=ef.maxy&&ef.minx<=ei.maxx&&ei.minx<=ef.maxx){if(eb!=null){var eh=ep.shape.filter;if((eh.collisionMask&eb.collisionGroup)!=0){ed=(eb.collisionMask&eh.collisionGroup)!=0}else{ed=false}}else{ed=true}}else{ed=false}if(ed){if(ec.aabbsect(ep.aabb)>=0){if(ep.shape.type==0){ec.circlesect2(ep.shape.circle,eq,er)}else{ec.polysect2(ep.shape.polygon,eq,er)}}}ep=ep.next}}}if(ef.outer!=null){ef.outer.zpp_inner=null;ef.outer=null}ef.wrap_min=ef.wrap_max=null;ef._invalidate=null;ef._validate=null;ef.next=bT.zpp_pool;bT.zpp_pool=ef;return er};c6.prototype.__class__=c6;var cb=zpp_nape.util.ZNPArray2_Float=function(eb,ea){this.width=0;this.list=null;this.width=eb;this.list=[]};cb.__name__=["zpp_nape","util","ZNPArray2_Float"];cb.prototype.list=null;cb.prototype.width=null;cb.prototype.resize=function(eb,ea,ed){this.width=eb;var ec=0;var ee=eb*ea;while(eceb){var ea=ed;ed=eb;eb=ea}var ec=this.table[ed*106039+eb&1048575];if(ec==null){return null}else{if(ec.id==ed&&ec.di==eb){return ec}else{while(true){ec=ec.hnext;if(!(ec!=null&&(ec.id!=ed||ec.di!=eb))){break}}return ec}}};bK.prototype.has=function(ec,ea){var eb=this.table[ec*106039+ea&1048575];if(eb==null){return false}else{if(eb.id==ec&&eb.di==ea){return true}else{while(true){eb=eb.hnext;if(!(eb!=null&&(eb.id!=ec||eb.di!=ea))){break}}return eb!=null}}};bK.prototype.maybeAdd=function(eb){var ea=eb.id*106039+eb.di&1048575;var ec=this.table[ea];if(ec==null){this.table[ea]=eb;eb.hnext=null}else{eb.hnext=ec.hnext;ec.hnext=eb}this.cnt++};bK.prototype.add=function(eb){var ea=eb.id*106039+eb.di&1048575;var ec=this.table[ea];if(ec==null){this.table[ea]=eb;eb.hnext=null}else{eb.hnext=ec.hnext;ec.hnext=eb}this.cnt++};bK.prototype.remove=function(eb){var ea=eb.id*106039+eb.di&1048575;var ed=this.table[ea];if(ed==eb){this.table[ea]=ed.hnext}else{if(ed!=null){var ec;while(true){ec=ed;ed=ed.hnext;if(!(ed!=null&&ed!=eb)){break}}ec.hnext=ed.hnext}}eb.hnext=null;this.cnt--};bK.prototype.hash=function(eb,ea){return eb*106039+ea&1048575};bK.prototype.__class__=bK;var dF=zpp_nape.util.ZNPList_ZPP_CallbackSet=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};dF.__name__=["zpp_nape","util","ZNPList_ZPP_CallbackSet"];dF.prototype.head=null;dF.prototype.begin=function(){return this.head};dF.prototype.modified=null;dF.prototype.pushmod=null;dF.prototype.length=null;dF.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};dF.prototype.add=function(ec){var eb;if(cF.zpp_pool==null){eb=new cF()}else{eb=cF.zpp_pool;cF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dF.prototype.inlined_add=function(ec){var eb;if(cF.zpp_pool==null){eb=new cF()}else{eb=cF.zpp_pool;cF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dF.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};dF.prototype.insert=function(ed,ec){var eb;if(cF.zpp_pool==null){eb=new cF()}else{eb=cF.zpp_pool;cF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dF.prototype.inlined_insert=function(ed,ec){var eb;if(cF.zpp_pool==null){eb=new cF()}else{eb=cF.zpp_pool;cF.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dF.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cF.zpp_pool;cF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dF.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cF.zpp_pool;cF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dF.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dF.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dF.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cF.zpp_pool;cF.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dF.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};dF.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cF.zpp_pool;cF.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dF.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cF.zpp_pool;cF.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};dF.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cF.zpp_pool;cF.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dF.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cF.zpp_pool;cF.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dF.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};dF.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cF.zpp_pool;cF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dF.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cF.zpp_pool;cF.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dF.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};dF.prototype.empty=function(){return this.head==null};dF.prototype.size=function(){return this.length};dF.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dF.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dF.prototype.front=function(){return this.head.elt};dF.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};dF.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};dF.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};dF.prototype.__class__=dF;var s=zpp_nape.util.ZNPList_ZPP_Shape=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};s.__name__=["zpp_nape","util","ZNPList_ZPP_Shape"];s.prototype.head=null;s.prototype.begin=function(){return this.head};s.prototype.modified=null;s.prototype.pushmod=null;s.prototype.length=null;s.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};s.prototype.add=function(ec){var eb;if(b9.zpp_pool==null){eb=new b9()}else{eb=b9.zpp_pool;b9.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};s.prototype.inlined_add=function(ec){var eb;if(b9.zpp_pool==null){eb=new b9()}else{eb=b9.zpp_pool;b9.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};s.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};s.prototype.insert=function(ed,ec){var eb;if(b9.zpp_pool==null){eb=new b9()}else{eb=b9.zpp_pool;b9.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};s.prototype.inlined_insert=function(ed,ec){var eb;if(b9.zpp_pool==null){eb=new b9()}else{eb=b9.zpp_pool;b9.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};s.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=b9.zpp_pool;b9.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};s.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=b9.zpp_pool;b9.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};s.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};s.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};s.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=b9.zpp_pool;b9.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};s.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};s.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=b9.zpp_pool;b9.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};s.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=b9.zpp_pool;b9.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};s.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=b9.zpp_pool;b9.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};s.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=b9.zpp_pool;b9.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};s.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};s.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=b9.zpp_pool;b9.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};s.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=b9.zpp_pool;b9.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};s.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};s.prototype.empty=function(){return this.head==null};s.prototype.size=function(){return this.length};s.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};s.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};s.prototype.front=function(){return this.head.elt};s.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};s.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};s.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};s.prototype.__class__=s;var bs=zpp_nape.util.ZNPList_ZPP_Body=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bs.__name__=["zpp_nape","util","ZNPList_ZPP_Body"];bs.prototype.head=null;bs.prototype.begin=function(){return this.head};bs.prototype.modified=null;bs.prototype.pushmod=null;bs.prototype.length=null;bs.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bs.prototype.add=function(ec){var eb;if(bE.zpp_pool==null){eb=new bE()}else{eb=bE.zpp_pool;bE.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bs.prototype.inlined_add=function(ec){var eb;if(bE.zpp_pool==null){eb=new bE()}else{eb=bE.zpp_pool;bE.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bs.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bs.prototype.insert=function(ed,ec){var eb;if(bE.zpp_pool==null){eb=new bE()}else{eb=bE.zpp_pool;bE.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bs.prototype.inlined_insert=function(ed,ec){var eb;if(bE.zpp_pool==null){eb=new bE()}else{eb=bE.zpp_pool;bE.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bs.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bE.zpp_pool;bE.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bs.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bE.zpp_pool;bE.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bs.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bs.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bs.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=bE.zpp_pool;bE.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bs.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bs.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=bE.zpp_pool;bE.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bs.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=bE.zpp_pool;bE.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bs.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=bE.zpp_pool;bE.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bs.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=bE.zpp_pool;bE.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bs.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bs.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bE.zpp_pool;bE.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bs.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bE.zpp_pool;bE.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bs.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bs.prototype.empty=function(){return this.head==null};bs.prototype.size=function(){return this.length};bs.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bs.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bs.prototype.front=function(){return this.head.elt};bs.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bs.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bs.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bs.prototype.__class__=bs;var n=zpp_nape.util.ZNPList_ZPP_Compound=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};n.__name__=["zpp_nape","util","ZNPList_ZPP_Compound"];n.prototype.head=null;n.prototype.begin=function(){return this.head};n.prototype.modified=null;n.prototype.pushmod=null;n.prototype.length=null;n.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};n.prototype.add=function(ec){var eb;if(Q.zpp_pool==null){eb=new Q()}else{eb=Q.zpp_pool;Q.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};n.prototype.inlined_add=function(ec){var eb;if(Q.zpp_pool==null){eb=new Q()}else{eb=Q.zpp_pool;Q.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};n.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};n.prototype.insert=function(ed,ec){var eb;if(Q.zpp_pool==null){eb=new Q()}else{eb=Q.zpp_pool;Q.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};n.prototype.inlined_insert=function(ed,ec){var eb;if(Q.zpp_pool==null){eb=new Q()}else{eb=Q.zpp_pool;Q.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};n.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=Q.zpp_pool;Q.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};n.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=Q.zpp_pool;Q.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};n.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};n.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};n.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=Q.zpp_pool;Q.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};n.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};n.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=Q.zpp_pool;Q.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};n.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=Q.zpp_pool;Q.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};n.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=Q.zpp_pool;Q.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};n.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=Q.zpp_pool;Q.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};n.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};n.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=Q.zpp_pool;Q.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};n.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=Q.zpp_pool;Q.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};n.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};n.prototype.empty=function(){return this.head==null};n.prototype.size=function(){return this.length};n.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};n.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};n.prototype.front=function(){return this.head.elt};n.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};n.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};n.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};n.prototype.__class__=n;var h=zpp_nape.util.ZNPList_ZPP_Arbiter=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};h.__name__=["zpp_nape","util","ZNPList_ZPP_Arbiter"];h.prototype.head=null;h.prototype.begin=function(){return this.head};h.prototype.modified=null;h.prototype.pushmod=null;h.prototype.length=null;h.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};h.prototype.add=function(ec){var eb;if(dL.zpp_pool==null){eb=new dL()}else{eb=dL.zpp_pool;dL.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};h.prototype.inlined_add=function(ec){var eb;if(dL.zpp_pool==null){eb=new dL()}else{eb=dL.zpp_pool;dL.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};h.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};h.prototype.insert=function(ed,ec){var eb;if(dL.zpp_pool==null){eb=new dL()}else{eb=dL.zpp_pool;dL.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};h.prototype.inlined_insert=function(ed,ec){var eb;if(dL.zpp_pool==null){eb=new dL()}else{eb=dL.zpp_pool;dL.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};h.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};h.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};h.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};h.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};h.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dL.zpp_pool;dL.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};h.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};h.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dL.zpp_pool;dL.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};h.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=dL.zpp_pool;dL.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};h.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dL.zpp_pool;dL.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};h.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dL.zpp_pool;dL.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};h.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};h.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};h.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dL.zpp_pool;dL.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};h.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};h.prototype.empty=function(){return this.head==null};h.prototype.size=function(){return this.length};h.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};h.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};h.prototype.front=function(){return this.head.elt};h.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};h.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};h.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};h.prototype.__class__=h;var aK=zpp_nape.util.ZNPList_ZPP_CbSetPair=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};aK.__name__=["zpp_nape","util","ZNPList_ZPP_CbSetPair"];aK.prototype.head=null;aK.prototype.begin=function(){return this.head};aK.prototype.modified=null;aK.prototype.pushmod=null;aK.prototype.length=null;aK.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};aK.prototype.add=function(ec){var eb;if(cd.zpp_pool==null){eb=new cd()}else{eb=cd.zpp_pool;cd.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};aK.prototype.inlined_add=function(ec){var eb;if(cd.zpp_pool==null){eb=new cd()}else{eb=cd.zpp_pool;cd.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};aK.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};aK.prototype.insert=function(ed,ec){var eb;if(cd.zpp_pool==null){eb=new cd()}else{eb=cd.zpp_pool;cd.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};aK.prototype.inlined_insert=function(ed,ec){var eb;if(cd.zpp_pool==null){eb=new cd()}else{eb=cd.zpp_pool;cd.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};aK.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cd.zpp_pool;cd.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};aK.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cd.zpp_pool;cd.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};aK.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};aK.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};aK.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cd.zpp_pool;cd.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};aK.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};aK.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cd.zpp_pool;cd.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};aK.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cd.zpp_pool;cd.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};aK.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cd.zpp_pool;cd.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};aK.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cd.zpp_pool;cd.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};aK.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};aK.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cd.zpp_pool;cd.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};aK.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cd.zpp_pool;cd.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};aK.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};aK.prototype.empty=function(){return this.head==null};aK.prototype.size=function(){return this.length};aK.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};aK.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};aK.prototype.front=function(){return this.head.elt};aK.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};aK.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};aK.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};aK.prototype.__class__=aK;var t=zpp_nape.util.ZNPList_ZPP_CutInt=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};t.__name__=["zpp_nape","util","ZNPList_ZPP_CutInt"];t.prototype.head=null;t.prototype.begin=function(){return this.head};t.prototype.modified=null;t.prototype.pushmod=null;t.prototype.length=null;t.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};t.prototype.add=function(ec){var eb;if(d3.zpp_pool==null){eb=new d3()}else{eb=d3.zpp_pool;d3.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};t.prototype.inlined_add=function(ec){var eb;if(d3.zpp_pool==null){eb=new d3()}else{eb=d3.zpp_pool;d3.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};t.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};t.prototype.insert=function(ed,ec){var eb;if(d3.zpp_pool==null){eb=new d3()}else{eb=d3.zpp_pool;d3.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};t.prototype.inlined_insert=function(ed,ec){var eb;if(d3.zpp_pool==null){eb=new d3()}else{eb=d3.zpp_pool;d3.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};t.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d3.zpp_pool;d3.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};t.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d3.zpp_pool;d3.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};t.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};t.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};t.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=d3.zpp_pool;d3.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};t.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};t.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=d3.zpp_pool;d3.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};t.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=d3.zpp_pool;d3.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};t.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=d3.zpp_pool;d3.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};t.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=d3.zpp_pool;d3.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};t.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};t.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d3.zpp_pool;d3.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};t.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d3.zpp_pool;d3.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};t.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};t.prototype.empty=function(){return this.head==null};t.prototype.size=function(){return this.length};t.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};t.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};t.prototype.front=function(){return this.head.elt};t.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};t.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};t.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};t.prototype.__class__=t;var B=zpp_nape.util.ZNPList_ZPP_CutVert=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};B.__name__=["zpp_nape","util","ZNPList_ZPP_CutVert"];B.prototype.head=null;B.prototype.begin=function(){return this.head};B.prototype.modified=null;B.prototype.pushmod=null;B.prototype.length=null;B.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};B.prototype.add=function(ec){var eb;if(cH.zpp_pool==null){eb=new cH()}else{eb=cH.zpp_pool;cH.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};B.prototype.inlined_add=function(ec){var eb;if(cH.zpp_pool==null){eb=new cH()}else{eb=cH.zpp_pool;cH.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};B.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};B.prototype.insert=function(ed,ec){var eb;if(cH.zpp_pool==null){eb=new cH()}else{eb=cH.zpp_pool;cH.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};B.prototype.inlined_insert=function(ed,ec){var eb;if(cH.zpp_pool==null){eb=new cH()}else{eb=cH.zpp_pool;cH.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};B.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cH.zpp_pool;cH.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};B.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cH.zpp_pool;cH.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};B.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};B.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};B.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cH.zpp_pool;cH.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};B.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};B.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cH.zpp_pool;cH.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};B.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cH.zpp_pool;cH.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};B.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cH.zpp_pool;cH.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};B.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cH.zpp_pool;cH.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};B.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};B.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cH.zpp_pool;cH.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};B.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cH.zpp_pool;cH.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};B.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};B.prototype.empty=function(){return this.head==null};B.prototype.size=function(){return this.length};B.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};B.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};B.prototype.front=function(){return this.head.elt};B.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};B.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};B.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};B.prototype.__class__=B;var dO=zpp_nape.util.ZNPList_ZPP_PartitionVertex=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};dO.__name__=["zpp_nape","util","ZNPList_ZPP_PartitionVertex"];dO.prototype.head=null;dO.prototype.begin=function(){return this.head};dO.prototype.modified=null;dO.prototype.pushmod=null;dO.prototype.length=null;dO.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};dO.prototype.add=function(ec){var eb;if(V.zpp_pool==null){eb=new V()}else{eb=V.zpp_pool;V.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dO.prototype.inlined_add=function(ec){var eb;if(V.zpp_pool==null){eb=new V()}else{eb=V.zpp_pool;V.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dO.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};dO.prototype.insert=function(ed,ec){var eb;if(V.zpp_pool==null){eb=new V()}else{eb=V.zpp_pool;V.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dO.prototype.inlined_insert=function(ed,ec){var eb;if(V.zpp_pool==null){eb=new V()}else{eb=V.zpp_pool;V.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dO.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=V.zpp_pool;V.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dO.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=V.zpp_pool;V.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dO.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dO.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dO.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=V.zpp_pool;V.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dO.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};dO.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=V.zpp_pool;V.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dO.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=V.zpp_pool;V.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};dO.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=V.zpp_pool;V.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dO.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=V.zpp_pool;V.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dO.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};dO.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=V.zpp_pool;V.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dO.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=V.zpp_pool;V.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dO.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};dO.prototype.empty=function(){return this.head==null};dO.prototype.size=function(){return this.length};dO.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dO.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dO.prototype.front=function(){return this.head.elt};dO.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};dO.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};dO.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};dO.prototype.__class__=dO;var c0=zpp_nape.util.ZNPList_ZPP_SimplifyP=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};c0.__name__=["zpp_nape","util","ZNPList_ZPP_SimplifyP"];c0.prototype.head=null;c0.prototype.begin=function(){return this.head};c0.prototype.modified=null;c0.prototype.pushmod=null;c0.prototype.length=null;c0.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};c0.prototype.add=function(ec){var eb;if(o.zpp_pool==null){eb=new o()}else{eb=o.zpp_pool;o.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};c0.prototype.inlined_add=function(ec){var eb;if(o.zpp_pool==null){eb=new o()}else{eb=o.zpp_pool;o.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};c0.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};c0.prototype.insert=function(ed,ec){var eb;if(o.zpp_pool==null){eb=new o()}else{eb=o.zpp_pool;o.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};c0.prototype.inlined_insert=function(ed,ec){var eb;if(o.zpp_pool==null){eb=new o()}else{eb=o.zpp_pool;o.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};c0.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=o.zpp_pool;o.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};c0.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=o.zpp_pool;o.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};c0.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};c0.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};c0.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=o.zpp_pool;o.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};c0.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};c0.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=o.zpp_pool;o.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};c0.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=o.zpp_pool;o.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};c0.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=o.zpp_pool;o.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};c0.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=o.zpp_pool;o.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};c0.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};c0.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=o.zpp_pool;o.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};c0.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=o.zpp_pool;o.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};c0.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};c0.prototype.empty=function(){return this.head==null};c0.prototype.size=function(){return this.length};c0.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};c0.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};c0.prototype.front=function(){return this.head.elt};c0.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};c0.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};c0.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};c0.prototype.__class__=c0;var bu=zpp_nape.util.ZNPList_ZPP_PartitionedPoly=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bu.__name__=["zpp_nape","util","ZNPList_ZPP_PartitionedPoly"];bu.prototype.head=null;bu.prototype.begin=function(){return this.head};bu.prototype.modified=null;bu.prototype.pushmod=null;bu.prototype.length=null;bu.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bu.prototype.add=function(ec){var eb;if(dU.zpp_pool==null){eb=new dU()}else{eb=dU.zpp_pool;dU.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bu.prototype.inlined_add=function(ec){var eb;if(dU.zpp_pool==null){eb=new dU()}else{eb=dU.zpp_pool;dU.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bu.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bu.prototype.insert=function(ed,ec){var eb;if(dU.zpp_pool==null){eb=new dU()}else{eb=dU.zpp_pool;dU.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bu.prototype.inlined_insert=function(ed,ec){var eb;if(dU.zpp_pool==null){eb=new dU()}else{eb=dU.zpp_pool;dU.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bu.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dU.zpp_pool;dU.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bu.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dU.zpp_pool;dU.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bu.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bu.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bu.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dU.zpp_pool;dU.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bu.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bu.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dU.zpp_pool;dU.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bu.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=dU.zpp_pool;dU.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bu.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dU.zpp_pool;dU.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bu.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dU.zpp_pool;dU.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bu.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bu.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dU.zpp_pool;dU.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bu.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dU.zpp_pool;dU.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bu.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bu.prototype.empty=function(){return this.head==null};bu.prototype.size=function(){return this.length};bu.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bu.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bu.prototype.front=function(){return this.head.elt};bu.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bu.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bu.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bu.prototype.__class__=bu;var dA=zpp_nape.util.ZNPList_ZPP_GeomVert=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};dA.__name__=["zpp_nape","util","ZNPList_ZPP_GeomVert"];dA.prototype.head=null;dA.prototype.begin=function(){return this.head};dA.prototype.modified=null;dA.prototype.pushmod=null;dA.prototype.length=null;dA.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};dA.prototype.add=function(ec){var eb;if(dS.zpp_pool==null){eb=new dS()}else{eb=dS.zpp_pool;dS.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dA.prototype.inlined_add=function(ec){var eb;if(dS.zpp_pool==null){eb=new dS()}else{eb=dS.zpp_pool;dS.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dA.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};dA.prototype.insert=function(ed,ec){var eb;if(dS.zpp_pool==null){eb=new dS()}else{eb=dS.zpp_pool;dS.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dA.prototype.inlined_insert=function(ed,ec){var eb;if(dS.zpp_pool==null){eb=new dS()}else{eb=dS.zpp_pool;dS.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dA.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dS.zpp_pool;dS.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dA.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dS.zpp_pool;dS.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dA.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dA.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dA.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dS.zpp_pool;dS.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dA.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};dA.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dS.zpp_pool;dS.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dA.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=dS.zpp_pool;dS.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};dA.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dS.zpp_pool;dS.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dA.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dS.zpp_pool;dS.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dA.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};dA.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dS.zpp_pool;dS.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dA.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dS.zpp_pool;dS.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dA.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};dA.prototype.empty=function(){return this.head==null};dA.prototype.size=function(){return this.length};dA.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dA.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dA.prototype.front=function(){return this.head.elt};dA.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};dA.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};dA.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};dA.prototype.__class__=dA;var a8=zpp_nape.util.ZNPList_ZPP_SimpleVert=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};a8.__name__=["zpp_nape","util","ZNPList_ZPP_SimpleVert"];a8.prototype.head=null;a8.prototype.begin=function(){return this.head};a8.prototype.modified=null;a8.prototype.pushmod=null;a8.prototype.length=null;a8.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};a8.prototype.add=function(ec){var eb;if(d6.zpp_pool==null){eb=new d6()}else{eb=d6.zpp_pool;d6.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};a8.prototype.inlined_add=function(ec){var eb;if(d6.zpp_pool==null){eb=new d6()}else{eb=d6.zpp_pool;d6.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};a8.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};a8.prototype.insert=function(ed,ec){var eb;if(d6.zpp_pool==null){eb=new d6()}else{eb=d6.zpp_pool;d6.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};a8.prototype.inlined_insert=function(ed,ec){var eb;if(d6.zpp_pool==null){eb=new d6()}else{eb=d6.zpp_pool;d6.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};a8.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d6.zpp_pool;d6.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};a8.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d6.zpp_pool;d6.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};a8.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};a8.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};a8.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=d6.zpp_pool;d6.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};a8.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};a8.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=d6.zpp_pool;d6.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};a8.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=d6.zpp_pool;d6.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};a8.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=d6.zpp_pool;d6.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};a8.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=d6.zpp_pool;d6.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};a8.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};a8.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d6.zpp_pool;d6.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};a8.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d6.zpp_pool;d6.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};a8.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};a8.prototype.empty=function(){return this.head==null};a8.prototype.size=function(){return this.length};a8.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};a8.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};a8.prototype.front=function(){return this.head.elt};a8.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};a8.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};a8.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};a8.prototype.__class__=a8;var dC=zpp_nape.util.ZNPList_ZPP_SimpleEvent=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};dC.__name__=["zpp_nape","util","ZNPList_ZPP_SimpleEvent"];dC.prototype.head=null;dC.prototype.begin=function(){return this.head};dC.prototype.modified=null;dC.prototype.pushmod=null;dC.prototype.length=null;dC.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};dC.prototype.add=function(ec){var eb;if(dY.zpp_pool==null){eb=new dY()}else{eb=dY.zpp_pool;dY.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dC.prototype.inlined_add=function(ec){var eb;if(dY.zpp_pool==null){eb=new dY()}else{eb=dY.zpp_pool;dY.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dC.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};dC.prototype.insert=function(ed,ec){var eb;if(dY.zpp_pool==null){eb=new dY()}else{eb=dY.zpp_pool;dY.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dC.prototype.inlined_insert=function(ed,ec){var eb;if(dY.zpp_pool==null){eb=new dY()}else{eb=dY.zpp_pool;dY.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dC.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dY.zpp_pool;dY.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dC.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dY.zpp_pool;dY.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dC.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dC.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dC.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dY.zpp_pool;dY.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dC.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};dC.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dY.zpp_pool;dY.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dC.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=dY.zpp_pool;dY.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};dC.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dY.zpp_pool;dY.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dC.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dY.zpp_pool;dY.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dC.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};dC.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dY.zpp_pool;dY.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dC.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dY.zpp_pool;dY.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dC.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};dC.prototype.empty=function(){return this.head==null};dC.prototype.size=function(){return this.length};dC.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dC.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dC.prototype.front=function(){return this.head.elt};dC.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};dC.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};dC.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};dC.prototype.__class__=dC;var dw=zpp_nape.util.ZNPList_ZPP_AABBPair=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};dw.__name__=["zpp_nape","util","ZNPList_ZPP_AABBPair"];dw.prototype.head=null;dw.prototype.begin=function(){return this.head};dw.prototype.modified=null;dw.prototype.pushmod=null;dw.prototype.length=null;dw.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};dw.prototype.add=function(ec){var eb;if(cl.zpp_pool==null){eb=new cl()}else{eb=cl.zpp_pool;cl.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dw.prototype.inlined_add=function(ec){var eb;if(cl.zpp_pool==null){eb=new cl()}else{eb=cl.zpp_pool;cl.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dw.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};dw.prototype.insert=function(ed,ec){var eb;if(cl.zpp_pool==null){eb=new cl()}else{eb=cl.zpp_pool;cl.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dw.prototype.inlined_insert=function(ed,ec){var eb;if(cl.zpp_pool==null){eb=new cl()}else{eb=cl.zpp_pool;cl.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dw.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cl.zpp_pool;cl.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dw.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cl.zpp_pool;cl.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dw.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dw.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dw.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cl.zpp_pool;cl.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dw.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};dw.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cl.zpp_pool;cl.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dw.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cl.zpp_pool;cl.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};dw.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cl.zpp_pool;cl.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dw.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cl.zpp_pool;cl.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dw.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};dw.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cl.zpp_pool;cl.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dw.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cl.zpp_pool;cl.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dw.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};dw.prototype.empty=function(){return this.head==null};dw.prototype.size=function(){return this.length};dw.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dw.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dw.prototype.front=function(){return this.head.elt};dw.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};dw.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};dw.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};dw.prototype.__class__=dw;var ce=zpp_nape.util.ZNPList_ZPP_Edge=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};ce.__name__=["zpp_nape","util","ZNPList_ZPP_Edge"];ce.prototype.head=null;ce.prototype.begin=function(){return this.head};ce.prototype.modified=null;ce.prototype.pushmod=null;ce.prototype.length=null;ce.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};ce.prototype.add=function(ec){var eb;if(cq.zpp_pool==null){eb=new cq()}else{eb=cq.zpp_pool;cq.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};ce.prototype.inlined_add=function(ec){var eb;if(cq.zpp_pool==null){eb=new cq()}else{eb=cq.zpp_pool;cq.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};ce.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};ce.prototype.insert=function(ed,ec){var eb;if(cq.zpp_pool==null){eb=new cq()}else{eb=cq.zpp_pool;cq.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};ce.prototype.inlined_insert=function(ed,ec){var eb;if(cq.zpp_pool==null){eb=new cq()}else{eb=cq.zpp_pool;cq.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};ce.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cq.zpp_pool;cq.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};ce.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cq.zpp_pool;cq.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};ce.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};ce.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};ce.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cq.zpp_pool;cq.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};ce.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};ce.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cq.zpp_pool;cq.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};ce.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cq.zpp_pool;cq.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};ce.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cq.zpp_pool;cq.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};ce.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cq.zpp_pool;cq.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};ce.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};ce.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cq.zpp_pool;cq.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};ce.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cq.zpp_pool;cq.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};ce.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};ce.prototype.empty=function(){return this.head==null};ce.prototype.size=function(){return this.length};ce.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};ce.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};ce.prototype.front=function(){return this.head.elt};ce.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};ce.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};ce.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};ce.prototype.__class__=ce;var ai=zpp_nape.util.ZNPList_ZPP_AABBNode=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};ai.__name__=["zpp_nape","util","ZNPList_ZPP_AABBNode"];ai.prototype.head=null;ai.prototype.begin=function(){return this.head};ai.prototype.modified=null;ai.prototype.pushmod=null;ai.prototype.length=null;ai.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};ai.prototype.add=function(ec){var eb;if(d2.zpp_pool==null){eb=new d2()}else{eb=d2.zpp_pool;d2.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};ai.prototype.inlined_add=function(ec){var eb;if(d2.zpp_pool==null){eb=new d2()}else{eb=d2.zpp_pool;d2.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};ai.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};ai.prototype.insert=function(ed,ec){var eb;if(d2.zpp_pool==null){eb=new d2()}else{eb=d2.zpp_pool;d2.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};ai.prototype.inlined_insert=function(ed,ec){var eb;if(d2.zpp_pool==null){eb=new d2()}else{eb=d2.zpp_pool;d2.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};ai.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d2.zpp_pool;d2.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};ai.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d2.zpp_pool;d2.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};ai.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};ai.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};ai.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=d2.zpp_pool;d2.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};ai.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};ai.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=d2.zpp_pool;d2.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};ai.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=d2.zpp_pool;d2.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};ai.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=d2.zpp_pool;d2.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};ai.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=d2.zpp_pool;d2.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};ai.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};ai.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d2.zpp_pool;d2.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};ai.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=d2.zpp_pool;d2.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};ai.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};ai.prototype.empty=function(){return this.head==null};ai.prototype.size=function(){return this.length};ai.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};ai.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};ai.prototype.front=function(){return this.head.elt};ai.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};ai.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};ai.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};ai.prototype.__class__=ai;var bN=zpp_nape.util.ZNPList_ZPP_Component=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bN.__name__=["zpp_nape","util","ZNPList_ZPP_Component"];bN.prototype.head=null;bN.prototype.begin=function(){return this.head};bN.prototype.modified=null;bN.prototype.pushmod=null;bN.prototype.length=null;bN.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bN.prototype.add=function(ec){var eb;if(dv.zpp_pool==null){eb=new dv()}else{eb=dv.zpp_pool;dv.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bN.prototype.inlined_add=function(ec){var eb;if(dv.zpp_pool==null){eb=new dv()}else{eb=dv.zpp_pool;dv.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bN.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bN.prototype.insert=function(ed,ec){var eb;if(dv.zpp_pool==null){eb=new dv()}else{eb=dv.zpp_pool;dv.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bN.prototype.inlined_insert=function(ed,ec){var eb;if(dv.zpp_pool==null){eb=new dv()}else{eb=dv.zpp_pool;dv.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bN.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dv.zpp_pool;dv.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bN.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dv.zpp_pool;dv.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bN.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bN.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bN.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dv.zpp_pool;dv.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bN.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bN.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dv.zpp_pool;dv.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bN.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=dv.zpp_pool;dv.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bN.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dv.zpp_pool;dv.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bN.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dv.zpp_pool;dv.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bN.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bN.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dv.zpp_pool;dv.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bN.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dv.zpp_pool;dv.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bN.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bN.prototype.empty=function(){return this.head==null};bN.prototype.size=function(){return this.length};bN.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bN.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bN.prototype.front=function(){return this.head.elt};bN.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bN.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bN.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bN.prototype.__class__=bN;var c7=zpp_nape.util.ZNPList_ZPP_FluidArbiter=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};c7.__name__=["zpp_nape","util","ZNPList_ZPP_FluidArbiter"];c7.prototype.head=null;c7.prototype.begin=function(){return this.head};c7.prototype.modified=null;c7.prototype.pushmod=null;c7.prototype.length=null;c7.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};c7.prototype.add=function(ec){var eb;if(bb.zpp_pool==null){eb=new bb()}else{eb=bb.zpp_pool;bb.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};c7.prototype.inlined_add=function(ec){var eb;if(bb.zpp_pool==null){eb=new bb()}else{eb=bb.zpp_pool;bb.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};c7.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};c7.prototype.insert=function(ed,ec){var eb;if(bb.zpp_pool==null){eb=new bb()}else{eb=bb.zpp_pool;bb.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};c7.prototype.inlined_insert=function(ed,ec){var eb;if(bb.zpp_pool==null){eb=new bb()}else{eb=bb.zpp_pool;bb.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};c7.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bb.zpp_pool;bb.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};c7.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bb.zpp_pool;bb.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};c7.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};c7.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};c7.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=bb.zpp_pool;bb.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};c7.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};c7.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=bb.zpp_pool;bb.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};c7.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=bb.zpp_pool;bb.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};c7.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=bb.zpp_pool;bb.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};c7.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=bb.zpp_pool;bb.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};c7.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};c7.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bb.zpp_pool;bb.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};c7.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bb.zpp_pool;bb.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};c7.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};c7.prototype.empty=function(){return this.head==null};c7.prototype.size=function(){return this.length};c7.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};c7.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};c7.prototype.front=function(){return this.head.elt};c7.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};c7.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};c7.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};c7.prototype.__class__=c7;var bd=zpp_nape.util.ZNPList_ZPP_SensorArbiter=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bd.__name__=["zpp_nape","util","ZNPList_ZPP_SensorArbiter"];bd.prototype.head=null;bd.prototype.begin=function(){return this.head};bd.prototype.modified=null;bd.prototype.pushmod=null;bd.prototype.length=null;bd.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bd.prototype.add=function(ec){var eb;if(L.zpp_pool==null){eb=new L()}else{eb=L.zpp_pool;L.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bd.prototype.inlined_add=function(ec){var eb;if(L.zpp_pool==null){eb=new L()}else{eb=L.zpp_pool;L.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bd.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bd.prototype.insert=function(ed,ec){var eb;if(L.zpp_pool==null){eb=new L()}else{eb=L.zpp_pool;L.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bd.prototype.inlined_insert=function(ed,ec){var eb;if(L.zpp_pool==null){eb=new L()}else{eb=L.zpp_pool;L.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bd.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=L.zpp_pool;L.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bd.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=L.zpp_pool;L.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bd.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bd.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bd.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=L.zpp_pool;L.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bd.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bd.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=L.zpp_pool;L.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bd.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=L.zpp_pool;L.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bd.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=L.zpp_pool;L.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bd.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=L.zpp_pool;L.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bd.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bd.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=L.zpp_pool;L.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bd.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=L.zpp_pool;L.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bd.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bd.prototype.empty=function(){return this.head==null};bd.prototype.size=function(){return this.length};bd.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bd.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bd.prototype.front=function(){return this.head.elt};bd.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bd.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bd.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bd.prototype.__class__=bd;var dP=zpp_nape.util.ZNPList_ZPP_Listener=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};dP.__name__=["zpp_nape","util","ZNPList_ZPP_Listener"];dP.prototype.head=null;dP.prototype.begin=function(){return this.head};dP.prototype.modified=null;dP.prototype.pushmod=null;dP.prototype.length=null;dP.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};dP.prototype.add=function(ec){var eb;if(e.zpp_pool==null){eb=new e()}else{eb=e.zpp_pool;e.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dP.prototype.inlined_add=function(ec){var eb;if(e.zpp_pool==null){eb=new e()}else{eb=e.zpp_pool;e.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};dP.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};dP.prototype.insert=function(ed,ec){var eb;if(e.zpp_pool==null){eb=new e()}else{eb=e.zpp_pool;e.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dP.prototype.inlined_insert=function(ed,ec){var eb;if(e.zpp_pool==null){eb=new e()}else{eb=e.zpp_pool;e.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};dP.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=e.zpp_pool;e.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dP.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=e.zpp_pool;e.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};dP.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dP.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};dP.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=e.zpp_pool;e.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dP.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};dP.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=e.zpp_pool;e.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};dP.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=e.zpp_pool;e.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};dP.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=e.zpp_pool;e.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dP.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=e.zpp_pool;e.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};dP.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};dP.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=e.zpp_pool;e.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dP.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=e.zpp_pool;e.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};dP.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};dP.prototype.empty=function(){return this.head==null};dP.prototype.size=function(){return this.length};dP.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dP.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};dP.prototype.front=function(){return this.head.elt};dP.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};dP.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};dP.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};dP.prototype.__class__=dP;var bH=zpp_nape.util.ZNPList_ZPP_ColArbiter=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bH.__name__=["zpp_nape","util","ZNPList_ZPP_ColArbiter"];bH.prototype.head=null;bH.prototype.begin=function(){return this.head};bH.prototype.modified=null;bH.prototype.pushmod=null;bH.prototype.length=null;bH.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bH.prototype.add=function(ec){var eb;if(bi.zpp_pool==null){eb=new bi()}else{eb=bi.zpp_pool;bi.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bH.prototype.inlined_add=function(ec){var eb;if(bi.zpp_pool==null){eb=new bi()}else{eb=bi.zpp_pool;bi.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bH.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bH.prototype.insert=function(ed,ec){var eb;if(bi.zpp_pool==null){eb=new bi()}else{eb=bi.zpp_pool;bi.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bH.prototype.inlined_insert=function(ed,ec){var eb;if(bi.zpp_pool==null){eb=new bi()}else{eb=bi.zpp_pool;bi.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bH.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bi.zpp_pool;bi.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bH.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bi.zpp_pool;bi.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bH.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bH.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bH.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=bi.zpp_pool;bi.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bH.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bH.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=bi.zpp_pool;bi.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bH.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=bi.zpp_pool;bi.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bH.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=bi.zpp_pool;bi.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bH.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=bi.zpp_pool;bi.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bH.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bH.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bi.zpp_pool;bi.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bH.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=bi.zpp_pool;bi.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bH.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bH.prototype.empty=function(){return this.head==null};bH.prototype.size=function(){return this.length};bH.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bH.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bH.prototype.front=function(){return this.head.elt};bH.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bH.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bH.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bH.prototype.__class__=bH;var da=zpp_nape.util.ZNPList_ZPP_InteractionGroup=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};da.__name__=["zpp_nape","util","ZNPList_ZPP_InteractionGroup"];da.prototype.head=null;da.prototype.begin=function(){return this.head};da.prototype.modified=null;da.prototype.pushmod=null;da.prototype.length=null;da.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};da.prototype.add=function(ec){var eb;if(w.zpp_pool==null){eb=new w()}else{eb=w.zpp_pool;w.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};da.prototype.inlined_add=function(ec){var eb;if(w.zpp_pool==null){eb=new w()}else{eb=w.zpp_pool;w.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};da.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};da.prototype.insert=function(ed,ec){var eb;if(w.zpp_pool==null){eb=new w()}else{eb=w.zpp_pool;w.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};da.prototype.inlined_insert=function(ed,ec){var eb;if(w.zpp_pool==null){eb=new w()}else{eb=w.zpp_pool;w.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};da.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=w.zpp_pool;w.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};da.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=w.zpp_pool;w.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};da.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};da.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};da.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=w.zpp_pool;w.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};da.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};da.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=w.zpp_pool;w.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};da.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=w.zpp_pool;w.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};da.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=w.zpp_pool;w.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};da.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=w.zpp_pool;w.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};da.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};da.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=w.zpp_pool;w.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};da.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=w.zpp_pool;w.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};da.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};da.prototype.empty=function(){return this.head==null};da.prototype.size=function(){return this.length};da.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};da.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};da.prototype.front=function(){return this.head.elt};da.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};da.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};da.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};da.prototype.__class__=da;var d4=zpp_nape.util.ZNPList_ZPP_ToiEvent=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};d4.__name__=["zpp_nape","util","ZNPList_ZPP_ToiEvent"];d4.prototype.head=null;d4.prototype.begin=function(){return this.head};d4.prototype.modified=null;d4.prototype.pushmod=null;d4.prototype.length=null;d4.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};d4.prototype.add=function(ec){var eb;if(c5.zpp_pool==null){eb=new c5()}else{eb=c5.zpp_pool;c5.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};d4.prototype.inlined_add=function(ec){var eb;if(c5.zpp_pool==null){eb=new c5()}else{eb=c5.zpp_pool;c5.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};d4.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};d4.prototype.insert=function(ed,ec){var eb;if(c5.zpp_pool==null){eb=new c5()}else{eb=c5.zpp_pool;c5.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};d4.prototype.inlined_insert=function(ed,ec){var eb;if(c5.zpp_pool==null){eb=new c5()}else{eb=c5.zpp_pool;c5.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};d4.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=c5.zpp_pool;c5.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};d4.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=c5.zpp_pool;c5.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};d4.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};d4.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};d4.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=c5.zpp_pool;c5.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};d4.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};d4.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=c5.zpp_pool;c5.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};d4.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=c5.zpp_pool;c5.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};d4.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=c5.zpp_pool;c5.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};d4.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=c5.zpp_pool;c5.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};d4.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};d4.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=c5.zpp_pool;c5.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};d4.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=c5.zpp_pool;c5.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};d4.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};d4.prototype.empty=function(){return this.head==null};d4.prototype.size=function(){return this.length};d4.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};d4.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};d4.prototype.front=function(){return this.head.elt};d4.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};d4.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};d4.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};d4.prototype.__class__=d4;var bS=zpp_nape.util.ZNPList_ConvexResult=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};bS.__name__=["zpp_nape","util","ZNPList_ConvexResult"];bS.prototype.head=null;bS.prototype.begin=function(){return this.head};bS.prototype.modified=null;bS.prototype.pushmod=null;bS.prototype.length=null;bS.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};bS.prototype.add=function(ec){var eb;if(cn.zpp_pool==null){eb=new cn()}else{eb=cn.zpp_pool;cn.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bS.prototype.inlined_add=function(ec){var eb;if(cn.zpp_pool==null){eb=new cn()}else{eb=cn.zpp_pool;cn.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};bS.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};bS.prototype.insert=function(ed,ec){var eb;if(cn.zpp_pool==null){eb=new cn()}else{eb=cn.zpp_pool;cn.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bS.prototype.inlined_insert=function(ed,ec){var eb;if(cn.zpp_pool==null){eb=new cn()}else{eb=cn.zpp_pool;cn.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};bS.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cn.zpp_pool;cn.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bS.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cn.zpp_pool;cn.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};bS.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bS.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};bS.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cn.zpp_pool;cn.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bS.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};bS.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cn.zpp_pool;cn.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};bS.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cn.zpp_pool;cn.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};bS.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cn.zpp_pool;cn.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bS.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cn.zpp_pool;cn.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};bS.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};bS.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cn.zpp_pool;cn.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bS.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cn.zpp_pool;cn.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};bS.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};bS.prototype.empty=function(){return this.head==null};bS.prototype.size=function(){return this.length};bS.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bS.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};bS.prototype.front=function(){return this.head.elt};bS.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};bS.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};bS.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};bS.prototype.__class__=bS;var ch=zpp_nape.util.ZNPList_ZPP_GeomPoly=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};ch.__name__=["zpp_nape","util","ZNPList_ZPP_GeomPoly"];ch.prototype.head=null;ch.prototype.begin=function(){return this.head};ch.prototype.modified=null;ch.prototype.pushmod=null;ch.prototype.length=null;ch.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};ch.prototype.add=function(ec){var eb;if(cM.zpp_pool==null){eb=new cM()}else{eb=cM.zpp_pool;cM.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};ch.prototype.inlined_add=function(ec){var eb;if(cM.zpp_pool==null){eb=new cM()}else{eb=cM.zpp_pool;cM.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};ch.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};ch.prototype.insert=function(ed,ec){var eb;if(cM.zpp_pool==null){eb=new cM()}else{eb=cM.zpp_pool;cM.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};ch.prototype.inlined_insert=function(ed,ec){var eb;if(cM.zpp_pool==null){eb=new cM()}else{eb=cM.zpp_pool;cM.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};ch.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cM.zpp_pool;cM.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};ch.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cM.zpp_pool;cM.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};ch.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};ch.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};ch.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cM.zpp_pool;cM.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};ch.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};ch.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=cM.zpp_pool;cM.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};ch.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=cM.zpp_pool;cM.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};ch.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cM.zpp_pool;cM.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};ch.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=cM.zpp_pool;cM.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};ch.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};ch.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cM.zpp_pool;cM.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};ch.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=cM.zpp_pool;cM.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};ch.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};ch.prototype.empty=function(){return this.head==null};ch.prototype.size=function(){return this.length};ch.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};ch.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};ch.prototype.front=function(){return this.head.elt};ch.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};ch.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};ch.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};ch.prototype.__class__=ch;var cf=zpp_nape.util.ZNPList_RayResult=function(){this.length=0;this.pushmod=false;this.modified=false;this.head=null};cf.__name__=["zpp_nape","util","ZNPList_RayResult"];cf.prototype.head=null;cf.prototype.begin=function(){return this.head};cf.prototype.modified=null;cf.prototype.pushmod=null;cf.prototype.length=null;cf.prototype.setbegin=function(ea){this.head=ea;this.modified=true;this.pushmod=true};cf.prototype.add=function(ec){var eb;if(dp.zpp_pool==null){eb=new dp()}else{eb=dp.zpp_pool;dp.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};cf.prototype.inlined_add=function(ec){var eb;if(dp.zpp_pool==null){eb=new dp()}else{eb=dp.zpp_pool;dp.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;ea.next=this.head;this.head=ea;this.modified=true;this.length++;return ec};cf.prototype.addAll=function(ea){var eb=ea.head;while(eb!=null){this.add(eb.elt);eb=eb.next}};cf.prototype.insert=function(ed,ec){var eb;if(dp.zpp_pool==null){eb=new dp()}else{eb=dp.zpp_pool;dp.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};cf.prototype.inlined_insert=function(ed,ec){var eb;if(dp.zpp_pool==null){eb=new dp()}else{eb=dp.zpp_pool;dp.zpp_pool=eb.next;eb.next=null}eb.elt=ec;var ea=eb;if(ed==null){ea.next=this.head;this.head=ea}else{ea.next=ed.next;ed.next=ea}this.pushmod=this.modified=true;this.length++;return ea};cf.prototype.pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dp.zpp_pool;dp.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};cf.prototype.inlined_pop=function(){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dp.zpp_pool;dp.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--};cf.prototype.pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};cf.prototype.inlined_pop_unsafe=function(){var ea=this.head.elt;this.pop();return ea};cf.prototype.remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dp.zpp_pool;dp.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};cf.prototype.try_remove=function(ec){var eb=null;var ed=this.head;var ea=false;while(ed!=null){if(ed.elt==ec){this.erase(eb);ea=true;break}eb=ed;ed=ed.next}return ea};cf.prototype.inlined_remove=function(ed){var ec=null;var ef=this.head;while(ef!=null){if(ef.elt==ed){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ee=ea;ee.elt=null;ee.next=dp.zpp_pool;dp.zpp_pool=ee;this.modified=true;this.length--;this.pushmod=true;break}ec=ef;ef=ef.next}};cf.prototype.inlined_try_remove=function(ee){var ed=null;var eg=this.head;var eb=false;while(eg!=null){if(eg.elt==ee){var ea;var ec;if(ed==null){ea=this.head;ec=ea.next;this.head=ec;if(this.head==null){this.pushmod=true}}else{ea=ed.next;ec=ea.next;ed.next=ec;if(ec==null){this.pushmod=true}}var ef=ea;ef.elt=null;ef.next=dp.zpp_pool;dp.zpp_pool=ef;this.modified=true;this.length--;this.pushmod=true;eb=true;break}ed=eg;eg=eg.next}return eb};cf.prototype.erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dp.zpp_pool;dp.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};cf.prototype.inlined_erase=function(ec){var ea;var eb;if(ec==null){ea=this.head;eb=ea.next;this.head=eb;if(this.head==null){this.pushmod=true}}else{ea=ec.next;eb=ea.next;ec.next=eb;if(eb==null){this.pushmod=true}}var ed=ea;ed.elt=null;ed.next=dp.zpp_pool;dp.zpp_pool=ed;this.modified=true;this.length--;this.pushmod=true;return eb};cf.prototype.splice=function(ea,eb){while(eb-->0&&ea.next!=null){this.erase(ea)}return ea.next};cf.prototype.clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dp.zpp_pool;dp.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};cf.prototype.inlined_clear=function(){while(this.head!=null){var ea=this.head;this.head=ea.next;ea.elt=null;ea.next=dp.zpp_pool;dp.zpp_pool=ea;if(this.head==null){this.pushmod=true}this.modified=true;this.length--}this.pushmod=true};cf.prototype.reverse=function(){var ec=this.head;var eb=null;while(ec!=null){var ea=ec.next;ec.next=eb;this.head=ec;eb=ec;ec=ea}this.modified=true;this.pushmod=true};cf.prototype.empty=function(){return this.head==null};cf.prototype.size=function(){return this.length};cf.prototype.has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};cf.prototype.inlined_has=function(ec){var ea;ea=false;var eb=this.head;while(eb!=null){if(eb.elt==ec){ea=true;break}eb=eb.next}return ea};cf.prototype.front=function(){return this.head.elt};cf.prototype.back=function(){var ea=this.head;var eb=ea;while(eb!=null){ea=eb;eb=eb.next}return ea.elt};cf.prototype.iterator_at=function(eb){var ea=this.head;while(eb-->0&&ea!=null){ea=ea.next}return ea};cf.prototype.at=function(eb){var ea=this.iterator_at(eb);if(ea!=null){return ea.elt}else{return null}};cf.prototype.__class__=cf;var b=zpp_nape.util.ZNPNode_ZPP_CbType=function(){this.elt=null;this.next=null};b.__name__=["zpp_nape","util","ZNPNode_ZPP_CbType"];b.prototype.next=null;b.prototype.alloc=function(){};b.prototype.free=function(){this.elt=null};b.prototype.elt=null;b.prototype.elem=function(){return this.elt};b.prototype.__class__=b;var cF=zpp_nape.util.ZNPNode_ZPP_CallbackSet=function(){this.elt=null;this.next=null};cF.__name__=["zpp_nape","util","ZNPNode_ZPP_CallbackSet"];cF.prototype.next=null;cF.prototype.alloc=function(){};cF.prototype.free=function(){this.elt=null};cF.prototype.elt=null;cF.prototype.elem=function(){return this.elt};cF.prototype.__class__=cF;var b9=zpp_nape.util.ZNPNode_ZPP_Shape=function(){this.elt=null;this.next=null};b9.__name__=["zpp_nape","util","ZNPNode_ZPP_Shape"];b9.prototype.next=null;b9.prototype.alloc=function(){};b9.prototype.free=function(){this.elt=null};b9.prototype.elt=null;b9.prototype.elem=function(){return this.elt};b9.prototype.__class__=b9;var bE=zpp_nape.util.ZNPNode_ZPP_Body=function(){this.elt=null;this.next=null};bE.__name__=["zpp_nape","util","ZNPNode_ZPP_Body"];bE.prototype.next=null;bE.prototype.alloc=function(){};bE.prototype.free=function(){this.elt=null};bE.prototype.elt=null;bE.prototype.elem=function(){return this.elt};bE.prototype.__class__=bE;var cx=zpp_nape.util.ZNPNode_ZPP_Constraint=function(){this.elt=null;this.next=null};cx.__name__=["zpp_nape","util","ZNPNode_ZPP_Constraint"];cx.prototype.next=null;cx.prototype.alloc=function(){};cx.prototype.free=function(){this.elt=null};cx.prototype.elt=null;cx.prototype.elem=function(){return this.elt};cx.prototype.__class__=cx;var Q=zpp_nape.util.ZNPNode_ZPP_Compound=function(){this.elt=null;this.next=null};Q.__name__=["zpp_nape","util","ZNPNode_ZPP_Compound"];Q.prototype.next=null;Q.prototype.alloc=function(){};Q.prototype.free=function(){this.elt=null};Q.prototype.elt=null;Q.prototype.elem=function(){return this.elt};Q.prototype.__class__=Q;var dL=zpp_nape.util.ZNPNode_ZPP_Arbiter=function(){this.elt=null;this.next=null};dL.__name__=["zpp_nape","util","ZNPNode_ZPP_Arbiter"];dL.prototype.next=null;dL.prototype.alloc=function(){};dL.prototype.free=function(){this.elt=null};dL.prototype.elt=null;dL.prototype.elem=function(){return this.elt};dL.prototype.__class__=dL;var aF=zpp_nape.util.ZNPNode_ZPP_InteractionListener=function(){this.elt=null;this.next=null};aF.__name__=["zpp_nape","util","ZNPNode_ZPP_InteractionListener"];aF.prototype.next=null;aF.prototype.alloc=function(){};aF.prototype.free=function(){this.elt=null};aF.prototype.elt=null;aF.prototype.elem=function(){return this.elt};aF.prototype.__class__=aF;var cO=zpp_nape.util.ZNPNode_ZPP_CbSet=function(){this.elt=null;this.next=null};cO.__name__=["zpp_nape","util","ZNPNode_ZPP_CbSet"];cO.prototype.next=null;cO.prototype.alloc=function(){};cO.prototype.free=function(){this.elt=null};cO.prototype.elt=null;cO.prototype.elem=function(){return this.elt};cO.prototype.__class__=cO;var g=zpp_nape.util.ZNPNode_ZPP_Interactor=function(){this.elt=null;this.next=null};g.__name__=["zpp_nape","util","ZNPNode_ZPP_Interactor"];g.prototype.next=null;g.prototype.alloc=function(){};g.prototype.free=function(){this.elt=null};g.prototype.elt=null;g.prototype.elem=function(){return this.elt};g.prototype.__class__=g;var aT=zpp_nape.util.ZNPNode_ZPP_BodyListener=function(){this.elt=null;this.next=null};aT.__name__=["zpp_nape","util","ZNPNode_ZPP_BodyListener"];aT.prototype.next=null;aT.prototype.alloc=function(){};aT.prototype.free=function(){this.elt=null};aT.prototype.elt=null;aT.prototype.elem=function(){return this.elt};aT.prototype.__class__=aT;var cd=zpp_nape.util.ZNPNode_ZPP_CbSetPair=function(){this.elt=null;this.next=null};cd.__name__=["zpp_nape","util","ZNPNode_ZPP_CbSetPair"];cd.prototype.next=null;cd.prototype.alloc=function(){};cd.prototype.free=function(){this.elt=null};cd.prototype.elt=null;cd.prototype.elem=function(){return this.elt};cd.prototype.__class__=cd;var aR=zpp_nape.util.ZNPNode_ZPP_ConstraintListener=function(){this.elt=null;this.next=null};aR.__name__=["zpp_nape","util","ZNPNode_ZPP_ConstraintListener"];aR.prototype.next=null;aR.prototype.alloc=function(){};aR.prototype.free=function(){this.elt=null};aR.prototype.elt=null;aR.prototype.elem=function(){return this.elt};aR.prototype.__class__=aR;var d3=zpp_nape.util.ZNPNode_ZPP_CutInt=function(){this.elt=null;this.next=null};d3.__name__=["zpp_nape","util","ZNPNode_ZPP_CutInt"];d3.prototype.next=null;d3.prototype.alloc=function(){};d3.prototype.free=function(){this.elt=null};d3.prototype.elt=null;d3.prototype.elem=function(){return this.elt};d3.prototype.__class__=d3;var cH=zpp_nape.util.ZNPNode_ZPP_CutVert=function(){this.elt=null;this.next=null};cH.__name__=["zpp_nape","util","ZNPNode_ZPP_CutVert"];cH.prototype.next=null;cH.prototype.alloc=function(){};cH.prototype.free=function(){this.elt=null};cH.prototype.elt=null;cH.prototype.elem=function(){return this.elt};cH.prototype.__class__=cH;var V=zpp_nape.util.ZNPNode_ZPP_PartitionVertex=function(){this.elt=null;this.next=null};V.__name__=["zpp_nape","util","ZNPNode_ZPP_PartitionVertex"];V.prototype.next=null;V.prototype.alloc=function(){};V.prototype.free=function(){this.elt=null};V.prototype.elt=null;V.prototype.elem=function(){return this.elt};V.prototype.__class__=V;var o=zpp_nape.util.ZNPNode_ZPP_SimplifyP=function(){this.elt=null;this.next=null};o.__name__=["zpp_nape","util","ZNPNode_ZPP_SimplifyP"];o.prototype.next=null;o.prototype.alloc=function(){};o.prototype.free=function(){this.elt=null};o.prototype.elt=null;o.prototype.elem=function(){return this.elt};o.prototype.__class__=o;var dU=zpp_nape.util.ZNPNode_ZPP_PartitionedPoly=function(){this.elt=null;this.next=null};dU.__name__=["zpp_nape","util","ZNPNode_ZPP_PartitionedPoly"];dU.prototype.next=null;dU.prototype.alloc=function(){};dU.prototype.free=function(){this.elt=null};dU.prototype.elt=null;dU.prototype.elem=function(){return this.elt};dU.prototype.__class__=dU;var dS=zpp_nape.util.ZNPNode_ZPP_GeomVert=function(){this.elt=null;this.next=null};dS.__name__=["zpp_nape","util","ZNPNode_ZPP_GeomVert"];dS.prototype.next=null;dS.prototype.alloc=function(){};dS.prototype.free=function(){this.elt=null};dS.prototype.elt=null;dS.prototype.elem=function(){return this.elt};dS.prototype.__class__=dS;var d6=zpp_nape.util.ZNPNode_ZPP_SimpleVert=function(){this.elt=null;this.next=null};d6.__name__=["zpp_nape","util","ZNPNode_ZPP_SimpleVert"];d6.prototype.next=null;d6.prototype.alloc=function(){};d6.prototype.free=function(){this.elt=null};d6.prototype.elt=null;d6.prototype.elem=function(){return this.elt};d6.prototype.__class__=d6;var dY=zpp_nape.util.ZNPNode_ZPP_SimpleEvent=function(){this.elt=null;this.next=null};dY.__name__=["zpp_nape","util","ZNPNode_ZPP_SimpleEvent"];dY.prototype.next=null;dY.prototype.alloc=function(){};dY.prototype.free=function(){this.elt=null};dY.prototype.elt=null;dY.prototype.elem=function(){return this.elt};dY.prototype.__class__=dY;var aV=zpp_nape.util.ZNPNode_ZPP_Vec2=function(){this.elt=null;this.next=null};aV.__name__=["zpp_nape","util","ZNPNode_ZPP_Vec2"];aV.prototype.next=null;aV.prototype.alloc=function(){};aV.prototype.free=function(){this.elt=null};aV.prototype.elt=null;aV.prototype.elem=function(){return this.elt};aV.prototype.__class__=aV;var cl=zpp_nape.util.ZNPNode_ZPP_AABBPair=function(){this.elt=null;this.next=null};cl.__name__=["zpp_nape","util","ZNPNode_ZPP_AABBPair"];cl.prototype.next=null;cl.prototype.alloc=function(){};cl.prototype.free=function(){this.elt=null};cl.prototype.elt=null;cl.prototype.elem=function(){return this.elt};cl.prototype.__class__=cl;var cq=zpp_nape.util.ZNPNode_ZPP_Edge=function(){this.elt=null;this.next=null};cq.__name__=["zpp_nape","util","ZNPNode_ZPP_Edge"];cq.prototype.next=null;cq.prototype.alloc=function(){};cq.prototype.free=function(){this.elt=null};cq.prototype.elt=null;cq.prototype.elem=function(){return this.elt};cq.prototype.__class__=cq;var d2=zpp_nape.util.ZNPNode_ZPP_AABBNode=function(){this.elt=null;this.next=null};d2.__name__=["zpp_nape","util","ZNPNode_ZPP_AABBNode"];d2.prototype.next=null;d2.prototype.alloc=function(){};d2.prototype.free=function(){this.elt=null};d2.prototype.elt=null;d2.prototype.elem=function(){return this.elt};d2.prototype.__class__=d2;var dv=zpp_nape.util.ZNPNode_ZPP_Component=function(){this.elt=null;this.next=null};dv.__name__=["zpp_nape","util","ZNPNode_ZPP_Component"];dv.prototype.next=null;dv.prototype.alloc=function(){};dv.prototype.free=function(){this.elt=null};dv.prototype.elt=null;dv.prototype.elem=function(){return this.elt};dv.prototype.__class__=dv;var bb=zpp_nape.util.ZNPNode_ZPP_FluidArbiter=function(){this.elt=null;this.next=null};bb.__name__=["zpp_nape","util","ZNPNode_ZPP_FluidArbiter"];bb.prototype.next=null;bb.prototype.alloc=function(){};bb.prototype.free=function(){this.elt=null};bb.prototype.elt=null;bb.prototype.elem=function(){return this.elt};bb.prototype.__class__=bb;var L=zpp_nape.util.ZNPNode_ZPP_SensorArbiter=function(){this.elt=null;this.next=null};L.__name__=["zpp_nape","util","ZNPNode_ZPP_SensorArbiter"];L.prototype.next=null;L.prototype.alloc=function(){};L.prototype.free=function(){this.elt=null};L.prototype.elt=null;L.prototype.elem=function(){return this.elt};L.prototype.__class__=L;var e=zpp_nape.util.ZNPNode_ZPP_Listener=function(){this.elt=null;this.next=null};e.__name__=["zpp_nape","util","ZNPNode_ZPP_Listener"];e.prototype.next=null;e.prototype.alloc=function(){};e.prototype.free=function(){this.elt=null};e.prototype.elt=null;e.prototype.elem=function(){return this.elt};e.prototype.__class__=e;var bi=zpp_nape.util.ZNPNode_ZPP_ColArbiter=function(){this.elt=null;this.next=null};bi.__name__=["zpp_nape","util","ZNPNode_ZPP_ColArbiter"];bi.prototype.next=null;bi.prototype.alloc=function(){};bi.prototype.free=function(){this.elt=null};bi.prototype.elt=null;bi.prototype.elem=function(){return this.elt};bi.prototype.__class__=bi;var w=zpp_nape.util.ZNPNode_ZPP_InteractionGroup=function(){this.elt=null;this.next=null};w.__name__=["zpp_nape","util","ZNPNode_ZPP_InteractionGroup"];w.prototype.next=null;w.prototype.alloc=function(){};w.prototype.free=function(){this.elt=null};w.prototype.elt=null;w.prototype.elem=function(){return this.elt};w.prototype.__class__=w;var c5=zpp_nape.util.ZNPNode_ZPP_ToiEvent=function(){this.elt=null;this.next=null};c5.__name__=["zpp_nape","util","ZNPNode_ZPP_ToiEvent"];c5.prototype.next=null;c5.prototype.alloc=function(){};c5.prototype.free=function(){this.elt=null};c5.prototype.elt=null;c5.prototype.elem=function(){return this.elt};c5.prototype.__class__=c5;var cn=zpp_nape.util.ZNPNode_ConvexResult=function(){this.elt=null;this.next=null};cn.__name__=["zpp_nape","util","ZNPNode_ConvexResult"];cn.prototype.next=null;cn.prototype.alloc=function(){};cn.prototype.free=function(){this.elt=null};cn.prototype.elt=null;cn.prototype.elem=function(){return this.elt};cn.prototype.__class__=cn;var cM=zpp_nape.util.ZNPNode_ZPP_GeomPoly=function(){this.elt=null;this.next=null};cM.__name__=["zpp_nape","util","ZNPNode_ZPP_GeomPoly"];cM.prototype.next=null;cM.prototype.alloc=function(){};cM.prototype.free=function(){this.elt=null};cM.prototype.elt=null;cM.prototype.elem=function(){return this.elt};cM.prototype.__class__=cM;var dp=zpp_nape.util.ZNPNode_RayResult=function(){this.elt=null;this.next=null};dp.__name__=["zpp_nape","util","ZNPNode_RayResult"];dp.prototype.next=null;dp.prototype.alloc=function(){};dp.prototype.free=function(){this.elt=null};dp.prototype.elt=null;dp.prototype.elem=function(){return this.elt};dp.prototype.__class__=dp;var ao=zpp_nape.util.ZPP_MixVec2List=function(){this.at_index=0;this.at_ite=null;this.zip_length=false;this._length=0;this.inner=null;aN.call(this);this.at_ite=null;this.at_index=0;this.zip_length=true;this._length=0};ao.__name__=["zpp_nape","util","ZPP_MixVec2List"];ao.__super__=aN;ao.prototype=Object.create(aN.prototype);ao.get=function(eb,ec){if(ec==null){ec=false}var ea=new ao();ea.inner=eb;ea.zpp_inner.immutable=ec;return ea};ao.prototype.inner=null;ao.prototype._length=null;ao.prototype.zip_length=null;ao.prototype.at_ite=null;ao.prototype.at_index=null;ao.prototype.zpp_gl=function(){this.zpp_vm();if(this.zip_length){this._length=0;var ea=this.inner.next;while(ea!=null){this._length++;ea=ea.next}this.zip_length=false}return this._length};ao.prototype.zpp_vm=function(){this.zpp_inner.validate();if(this.inner.modified){this.zip_length=true;this._length=0;this.at_ite=null}};ao.prototype.at=function(ea){this.zpp_vm();if(this.zpp_inner.reverse_flag){ea=this.zpp_gl()-1-ea}if(eaec){return ec}else{return ea}}};aH.clamp=function(eb,ec,ea){if(ebea){return ea}else{return eb}}};aH.prototype.__class__=aH;var au=zpp_nape.util.ZPP_PubPool=function(){};au.__name__=["zpp_nape","util","ZPP_PubPool"];au.prototype.__class__=au;var dV=zpp_nape.util.ZPP_Set_ZPP_Body=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};dV.__name__=["zpp_nape","util","ZPP_Set_ZPP_Body"];dV.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};dV.prototype.alloc=function(){};dV.prototype.lt=null;dV.prototype.swapped=null;dV.prototype.data=null;dV.prototype.prev=null;dV.prototype.next=null;dV.prototype.parent=null;dV.prototype.colour=null;dV.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};dV.prototype.empty=function(){return this.parent==null};dV.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};dV.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};dV.prototype.has=function(ea){return this.find(ea)!=null};dV.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};dV.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};dV.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};dV.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};dV.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};dV.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};dV.prototype.remove=function(ea){this.remove_node(this.find(ea))};dV.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};dV.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};dV.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};dV.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};dV.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=dV.zpp_pool;dV.zpp_pool=ea};dV.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=dV.zpp_pool;dV.zpp_pool=eb;ec=ea}}}this.parent=null}};dV.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=dV.zpp_pool;dV.zpp_pool=ec;ed=eb}}}this.parent=null}};dV.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=dV.zpp_pool;dV.zpp_pool=ec;return eb};dV.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};dV.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};dV.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(dV.zpp_pool==null){ea=new dV()}else{ea=dV.zpp_pool;dV.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(dV.zpp_pool==null){ea=new dV()}else{ea=dV.zpp_pool;dV.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(dV.zpp_pool==null){ea=new dV()}else{ea=dV.zpp_pool;dV.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};dV.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(dV.zpp_pool==null){ea=new dV()}else{ea=dV.zpp_pool;dV.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(dV.zpp_pool==null){ea=new dV()}else{ea=dV.zpp_pool;dV.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(dV.zpp_pool==null){ea=new dV()}else{ea=dV.zpp_pool;dV.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};dV.prototype.insert=function(eb){var ea;if(dV.zpp_pool==null){ea=new dV()}else{ea=dV.zpp_pool;dV.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};dV.prototype.__class__=dV;var p=zpp_nape.util.ZPP_Set_ZPP_CbSetPair=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};p.__name__=["zpp_nape","util","ZPP_Set_ZPP_CbSetPair"];p.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};p.prototype.alloc=function(){};p.prototype.lt=null;p.prototype.swapped=null;p.prototype.data=null;p.prototype.prev=null;p.prototype.next=null;p.prototype.parent=null;p.prototype.colour=null;p.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};p.prototype.empty=function(){return this.parent==null};p.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};p.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};p.prototype.has=function(ea){return this.find(ea)!=null};p.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};p.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};p.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};p.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};p.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};p.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};p.prototype.remove=function(ea){this.remove_node(this.find(ea))};p.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};p.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};p.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};p.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};p.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=p.zpp_pool;p.zpp_pool=ea};p.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=p.zpp_pool;p.zpp_pool=eb;ec=ea}}}this.parent=null}};p.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=p.zpp_pool;p.zpp_pool=ec;ed=eb}}}this.parent=null}};p.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=p.zpp_pool;p.zpp_pool=ec;return eb};p.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};p.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};p.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(p.zpp_pool==null){ea=new p()}else{ea=p.zpp_pool;p.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(p.zpp_pool==null){ea=new p()}else{ea=p.zpp_pool;p.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(p.zpp_pool==null){ea=new p()}else{ea=p.zpp_pool;p.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};p.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(p.zpp_pool==null){ea=new p()}else{ea=p.zpp_pool;p.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(p.zpp_pool==null){ea=new p()}else{ea=p.zpp_pool;p.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(p.zpp_pool==null){ea=new p()}else{ea=p.zpp_pool;p.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};p.prototype.insert=function(eb){var ea;if(p.zpp_pool==null){ea=new p()}else{ea=p.zpp_pool;p.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};p.prototype.__class__=p;var b8=zpp_nape.util.ZPP_Set_ZPP_PartitionVertex=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};b8.__name__=["zpp_nape","util","ZPP_Set_ZPP_PartitionVertex"];b8.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};b8.prototype.alloc=function(){};b8.prototype.lt=null;b8.prototype.swapped=null;b8.prototype.data=null;b8.prototype.prev=null;b8.prototype.next=null;b8.prototype.parent=null;b8.prototype.colour=null;b8.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};b8.prototype.empty=function(){return this.parent==null};b8.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};b8.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};b8.prototype.has=function(ea){return this.find(ea)!=null};b8.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};b8.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};b8.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};b8.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};b8.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};b8.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};b8.prototype.remove=function(ea){this.remove_node(this.find(ea))};b8.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};b8.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};b8.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};b8.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};b8.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=b8.zpp_pool;b8.zpp_pool=ea};b8.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=b8.zpp_pool;b8.zpp_pool=eb;ec=ea}}}this.parent=null}};b8.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=b8.zpp_pool;b8.zpp_pool=ec;ed=eb}}}this.parent=null}};b8.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=b8.zpp_pool;b8.zpp_pool=ec;return eb};b8.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};b8.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};b8.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(b8.zpp_pool==null){ea=new b8()}else{ea=b8.zpp_pool;b8.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(b8.zpp_pool==null){ea=new b8()}else{ea=b8.zpp_pool;b8.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(b8.zpp_pool==null){ea=new b8()}else{ea=b8.zpp_pool;b8.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};b8.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(b8.zpp_pool==null){ea=new b8()}else{ea=b8.zpp_pool;b8.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(b8.zpp_pool==null){ea=new b8()}else{ea=b8.zpp_pool;b8.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(b8.zpp_pool==null){ea=new b8()}else{ea=b8.zpp_pool;b8.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};b8.prototype.insert=function(eb){var ea;if(b8.zpp_pool==null){ea=new b8()}else{ea=b8.zpp_pool;b8.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};b8.prototype.__class__=b8;var am=zpp_nape.util.ZPP_Set_ZPP_PartitionPair=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};am.__name__=["zpp_nape","util","ZPP_Set_ZPP_PartitionPair"];am.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};am.prototype.alloc=function(){};am.prototype.lt=null;am.prototype.swapped=null;am.prototype.data=null;am.prototype.prev=null;am.prototype.next=null;am.prototype.parent=null;am.prototype.colour=null;am.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};am.prototype.empty=function(){return this.parent==null};am.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};am.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};am.prototype.has=function(ea){return this.find(ea)!=null};am.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};am.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};am.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};am.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};am.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};am.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};am.prototype.remove=function(ea){this.remove_node(this.find(ea))};am.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};am.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};am.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};am.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};am.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=am.zpp_pool;am.zpp_pool=ea};am.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=am.zpp_pool;am.zpp_pool=eb;ec=ea}}}this.parent=null}};am.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=am.zpp_pool;am.zpp_pool=ec;ed=eb}}}this.parent=null}};am.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=am.zpp_pool;am.zpp_pool=ec;return eb};am.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};am.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};am.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(am.zpp_pool==null){ea=new am()}else{ea=am.zpp_pool;am.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(am.zpp_pool==null){ea=new am()}else{ea=am.zpp_pool;am.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(am.zpp_pool==null){ea=new am()}else{ea=am.zpp_pool;am.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};am.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(am.zpp_pool==null){ea=new am()}else{ea=am.zpp_pool;am.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(am.zpp_pool==null){ea=new am()}else{ea=am.zpp_pool;am.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(am.zpp_pool==null){ea=new am()}else{ea=am.zpp_pool;am.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};am.prototype.insert=function(eb){var ea;if(am.zpp_pool==null){ea=new am()}else{ea=am.zpp_pool;am.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};am.prototype.__class__=am;var bX=zpp_nape.util.ZPP_Set_ZPP_SimpleVert=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};bX.__name__=["zpp_nape","util","ZPP_Set_ZPP_SimpleVert"];bX.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};bX.prototype.alloc=function(){};bX.prototype.lt=null;bX.prototype.swapped=null;bX.prototype.data=null;bX.prototype.prev=null;bX.prototype.next=null;bX.prototype.parent=null;bX.prototype.colour=null;bX.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};bX.prototype.empty=function(){return this.parent==null};bX.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};bX.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};bX.prototype.has=function(ea){return this.find(ea)!=null};bX.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};bX.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};bX.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};bX.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};bX.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};bX.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};bX.prototype.remove=function(ea){this.remove_node(this.find(ea))};bX.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};bX.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};bX.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};bX.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};bX.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=bX.zpp_pool;bX.zpp_pool=ea};bX.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=bX.zpp_pool;bX.zpp_pool=eb;ec=ea}}}this.parent=null}};bX.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=bX.zpp_pool;bX.zpp_pool=ec;ed=eb}}}this.parent=null}};bX.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=bX.zpp_pool;bX.zpp_pool=ec;return eb};bX.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};bX.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};bX.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(bX.zpp_pool==null){ea=new bX()}else{ea=bX.zpp_pool;bX.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(bX.zpp_pool==null){ea=new bX()}else{ea=bX.zpp_pool;bX.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(bX.zpp_pool==null){ea=new bX()}else{ea=bX.zpp_pool;bX.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};bX.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(bX.zpp_pool==null){ea=new bX()}else{ea=bX.zpp_pool;bX.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(bX.zpp_pool==null){ea=new bX()}else{ea=bX.zpp_pool;bX.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(bX.zpp_pool==null){ea=new bX()}else{ea=bX.zpp_pool;bX.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};bX.prototype.insert=function(eb){var ea;if(bX.zpp_pool==null){ea=new bX()}else{ea=bX.zpp_pool;bX.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};bX.prototype.__class__=bX;var bD=zpp_nape.util.ZPP_Set_ZPP_SimpleSeg=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};bD.__name__=["zpp_nape","util","ZPP_Set_ZPP_SimpleSeg"];bD.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};bD.prototype.alloc=function(){};bD.prototype.lt=null;bD.prototype.swapped=null;bD.prototype.data=null;bD.prototype.prev=null;bD.prototype.next=null;bD.prototype.parent=null;bD.prototype.colour=null;bD.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};bD.prototype.empty=function(){return this.parent==null};bD.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};bD.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};bD.prototype.has=function(ea){return this.find(ea)!=null};bD.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};bD.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};bD.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};bD.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};bD.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};bD.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};bD.prototype.remove=function(ea){this.remove_node(this.find(ea))};bD.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};bD.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};bD.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};bD.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};bD.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=bD.zpp_pool;bD.zpp_pool=ea};bD.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=bD.zpp_pool;bD.zpp_pool=eb;ec=ea}}}this.parent=null}};bD.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=bD.zpp_pool;bD.zpp_pool=ec;ed=eb}}}this.parent=null}};bD.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=bD.zpp_pool;bD.zpp_pool=ec;return eb};bD.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};bD.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};bD.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(bD.zpp_pool==null){ea=new bD()}else{ea=bD.zpp_pool;bD.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(bD.zpp_pool==null){ea=new bD()}else{ea=bD.zpp_pool;bD.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(bD.zpp_pool==null){ea=new bD()}else{ea=bD.zpp_pool;bD.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};bD.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(bD.zpp_pool==null){ea=new bD()}else{ea=bD.zpp_pool;bD.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(bD.zpp_pool==null){ea=new bD()}else{ea=bD.zpp_pool;bD.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(bD.zpp_pool==null){ea=new bD()}else{ea=bD.zpp_pool;bD.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};bD.prototype.insert=function(eb){var ea;if(bD.zpp_pool==null){ea=new bD()}else{ea=bD.zpp_pool;bD.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};bD.prototype.__class__=bD;var bl=zpp_nape.util.ZPP_Set_ZPP_SimpleEvent=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};bl.__name__=["zpp_nape","util","ZPP_Set_ZPP_SimpleEvent"];bl.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};bl.prototype.alloc=function(){};bl.prototype.lt=null;bl.prototype.swapped=null;bl.prototype.data=null;bl.prototype.prev=null;bl.prototype.next=null;bl.prototype.parent=null;bl.prototype.colour=null;bl.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};bl.prototype.empty=function(){return this.parent==null};bl.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};bl.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};bl.prototype.has=function(ea){return this.find(ea)!=null};bl.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};bl.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};bl.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};bl.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};bl.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};bl.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};bl.prototype.remove=function(ea){this.remove_node(this.find(ea))};bl.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};bl.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};bl.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};bl.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};bl.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=bl.zpp_pool;bl.zpp_pool=ea};bl.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=bl.zpp_pool;bl.zpp_pool=eb;ec=ea}}}this.parent=null}};bl.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=bl.zpp_pool;bl.zpp_pool=ec;ed=eb}}}this.parent=null}};bl.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=bl.zpp_pool;bl.zpp_pool=ec;return eb};bl.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};bl.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};bl.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(bl.zpp_pool==null){ea=new bl()}else{ea=bl.zpp_pool;bl.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(bl.zpp_pool==null){ea=new bl()}else{ea=bl.zpp_pool;bl.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(bl.zpp_pool==null){ea=new bl()}else{ea=bl.zpp_pool;bl.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};bl.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(bl.zpp_pool==null){ea=new bl()}else{ea=bl.zpp_pool;bl.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(bl.zpp_pool==null){ea=new bl()}else{ea=bl.zpp_pool;bl.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(bl.zpp_pool==null){ea=new bl()}else{ea=bl.zpp_pool;bl.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};bl.prototype.insert=function(eb){var ea;if(bl.zpp_pool==null){ea=new bl()}else{ea=bl.zpp_pool;bl.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};bl.prototype.__class__=bl;var dT=zpp_nape.util.ZPP_Set_ZPP_CbSet=function(){this.colour=0;this.parent=null;this.next=null;this.prev=null;this.data=null;this.swapped=null;this.lt=null};dT.__name__=["zpp_nape","util","ZPP_Set_ZPP_CbSet"];dT.prototype.free=function(){this.data=null;this.lt=null;this.swapped=null};dT.prototype.alloc=function(){};dT.prototype.lt=null;dT.prototype.swapped=null;dT.prototype.data=null;dT.prototype.prev=null;dT.prototype.next=null;dT.prototype.parent=null;dT.prototype.colour=null;dT.prototype.verify=function(){if(!this.empty()){var ed=this.parent;while(ed.prev!=null){ed=ed.prev}while(ed!=null){var eb=ed.data;var ee=true;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!ee){if(!this.lt(eb,ea)&&this.lt(ea,eb)){return false}}else{if(eb==ea){ee=false}else{if(!this.lt(ea,eb)&&this.lt(eb,ea)){return false}}}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}if(ed.next!=null){ed=ed.next;while(ed.prev!=null){ed=ed.prev}}else{while(ed.parent!=null&&ed==ed.parent.next){ed=ed.parent}ed=ed.parent}}}return true};dT.prototype.empty=function(){return this.parent==null};dT.prototype.singular=function(){if(this.parent!=null&&this.parent.prev==null){return this.parent.next==null}else{return false}};dT.prototype.size=function(){var ea=0;if(!this.empty()){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}while(eb!=null){++ea;if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{while(eb.parent!=null&&eb==eb.parent.next){eb=eb.parent}eb=eb.parent}}}return ea};dT.prototype.has=function(ea){return this.find(ea)!=null};dT.prototype.find=function(ea){var eb=this.parent;while(eb!=null&&eb.data!=ea){if(this.lt(ea,eb.data)){eb=eb.prev}else{eb=eb.next}}return eb};dT.prototype.has_weak=function(ea){return this.find_weak(ea)!=null};dT.prototype.find_weak=function(ea){var eb=this.parent;while(eb!=null){if(this.lt(ea,eb.data)){eb=eb.prev}else{if(this.lt(eb.data,ea)){eb=eb.next}else{break}}}return eb};dT.prototype.lower_bound=function(ed){var eb=null;if(!this.empty()){var ec=this.parent;while(ec.prev!=null){ec=ec.prev}while(ec!=null){var ea=ec.data;if(!this.lt(ea,ed)){eb=ea;break}if(ec.next!=null){ec=ec.next;while(ec.prev!=null){ec=ec.prev}}else{while(ec.parent!=null&&ec==ec.parent.next){ec=ec.parent}ec=ec.parent}}}return eb};dT.prototype.first=function(){var ea=this.parent;while(ea.prev!=null){ea=ea.prev}return ea.data};dT.prototype.pop_front=function(){var eb=this.parent;while(eb.prev!=null){eb=eb.prev}var ea=eb.data;this.remove_node(eb);return ea};dT.prototype.remove=function(ea){this.remove_node(this.find(ea))};dT.prototype.successor_node=function(eb){if(eb.next!=null){eb=eb.next;while(eb.prev!=null){eb=eb.prev}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.prev!=ea){ea=eb;eb=eb.parent}}return eb};dT.prototype.predecessor_node=function(eb){if(eb.prev!=null){eb=eb.prev;while(eb.next!=null){eb=eb.next}}else{var ea=eb;eb=eb.parent;while(eb!=null&&eb.next!=ea){ea=eb;eb=eb.parent}}return eb};dT.prototype.successor=function(eb){var ea=this.successor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};dT.prototype.predecessor=function(eb){var ea=this.predecessor_node(this.find(eb));if(ea==null){return null}else{return ea.data}};dT.prototype.remove_node=function(eh){if(eh.next!=null&&eh.prev!=null){var ec=eh.next;while(ec.prev!=null){ec=ec.prev}var ei=eh.data;eh.data=ec.data;ec.data=ei;if(this.swapped!=null){this.swapped(eh.data,ec.data)}eh=ec}var eb=eh.prev==null?eh.next:eh.prev;if(eh.colour==1){if(eh.prev!=null||eh.next!=null){eb.colour=1}else{if(eh.parent!=null){var eg=eh.parent;while(true){eg.colour++;eg.prev.colour--;eg.next.colour--;var ee=eg.prev;if(ee.colour==-1){this.__fix_neg_red(ee);break}else{if(ee.colour==0){if(ee.prev!=null&&ee.prev.colour==0){this.__fix_dbl_red(ee.prev);break}if(ee.next!=null&&ee.next.colour==0){this.__fix_dbl_red(ee.next);break}}}var ed=eg.next;if(ed.colour==-1){this.__fix_neg_red(ed);break}else{if(ed.colour==0){if(ed.prev!=null&&ed.prev.colour==0){this.__fix_dbl_red(ed.prev);break}if(ed.next!=null&&ed.next.colour==0){this.__fix_dbl_red(ed.next);break}}}if(eg.colour==2){if(eg.parent==null){eg.colour=1}else{eg=eg.parent;continue}}break}}}}var ef=eh.parent;if(ef==null){this.parent=eb}else{if(ef.prev==eh){ef.prev=eb}else{ef.next=eb}}if(eb!=null){eb.parent=ef}eh.parent=eh.prev=eh.next=null;var ea=eh;ea.data=null;ea.lt=null;ea.swapped=null;ea.next=dT.zpp_pool;dT.zpp_pool=ea};dT.prototype.clear=function(){if(this.parent!=null){var ec=this.parent;while(ec!=null){if(ec.prev!=null){ec=ec.prev}else{if(ec.next!=null){ec=ec.next}else{var ea=ec.parent;if(ea!=null){if(ec==ea.prev){ea.prev=null}else{ea.next=null}ec.parent=null}var eb=ec;eb.data=null;eb.lt=null;eb.swapped=null;eb.next=dT.zpp_pool;dT.zpp_pool=eb;ec=ea}}}this.parent=null}};dT.prototype.clear_with=function(ea){if(this.parent==null){return}else{var ed=this.parent;while(ed!=null){if(ed.prev!=null){ed=ed.prev}else{if(ed.next!=null){ed=ed.next}else{ea(ed.data);var eb=ed.parent;if(eb!=null){if(ed==eb.prev){eb.prev=null}else{eb.next=null}ed.parent=null}var ec=ed;ec.data=null;ec.lt=null;ec.swapped=null;ec.next=dT.zpp_pool;dT.zpp_pool=ec;ed=eb}}}this.parent=null}};dT.prototype.clear_node=function(ec,ea){ea(ec.data);var eb=ec.parent;if(eb!=null){if(ec==eb.prev){eb.prev=null}else{eb.next=null}ec.parent=null}ec.data=null;ec.lt=null;ec.swapped=null;ec.next=dT.zpp_pool;dT.zpp_pool=ec;return eb};dT.prototype.__fix_neg_red=function(ee){var ek=ee.parent;var ec;if(ek.prev==ee){var ea=ee.prev;var ei=ee.next;var el=ei.prev;var eg=ei.next;ea.colour=0;ee.colour=ek.colour=1;ee.next=el;if(el!=null){el.parent=ee}var em=ek.data;ek.data=ei.data;ei.data=em;if(this.swapped!=null){this.swapped(ek.data,ei.data)}ei.prev=eg;if(eg!=null){eg.parent=ei}ei.next=ek.next;if(ek.next!=null){ek.next.parent=ei}ek.next=ei;if(ei!=null){ei.parent=ek}ec=ea}else{var ed=ee.next;var eb=ee.prev;var ej=eb.next;var eh=eb.prev;ed.colour=0;ee.colour=ek.colour=1;ee.prev=ej;if(ej!=null){ej.parent=ee}var ef=ek.data;ek.data=eb.data;eb.data=ef;if(this.swapped!=null){this.swapped(ek.data,eb.data)}eb.next=eh;if(eh!=null){eh.parent=eb}eb.prev=ek.prev;if(ek.prev!=null){ek.prev.parent=eb}ek.prev=eb;if(eb!=null){eb.parent=ek}ec=ed}if(ec.prev!=null&&ec.prev.colour==0){this.__fix_dbl_red(ec.prev)}else{if(ec.next!=null&&ec.next.colour==0){this.__fix_dbl_red(ec.next)}}};dT.prototype.__fix_dbl_red=function(ek){while(true){var ej=ek.parent;var ee=ej.parent;if(ee==null){ej.colour=1;break}var ei;var eh;var eg;var ef;var ed;var ec;var eb;if(ej==ee.prev){eg=ee;eb=ee.next;if(ek==ej.prev){ei=ek;eh=ej;ef=ek.prev;ed=ek.next;ec=ej.next}else{ei=ej;eh=ek;ef=ej.prev;ed=ek.prev;ec=ek.next}}else{ei=ee;ef=ee.prev;if(ek==ej.prev){eh=ek;eg=ej;ed=ek.prev;ec=ek.next;eb=ej.next}else{eh=ej;eg=ek;ed=ej.prev;ec=ek.prev;eb=ek.next}}var ea=ee.parent;if(ea==null){this.parent=eh}else{if(ea.prev==ee){ea.prev=eh}else{ea.next=eh}}if(eh!=null){eh.parent=ea}ei.prev=ef;if(ef!=null){ef.parent=ei}ei.next=ed;if(ed!=null){ed.parent=ei}eh.prev=ei;if(ei!=null){ei.parent=eh}eh.next=eg;if(eg!=null){eg.parent=eh}eg.prev=ec;if(ec!=null){ec.parent=eg}eg.next=eb;if(eb!=null){eb.parent=eg}eh.colour=ee.colour-1;ei.colour=1;eg.colour=1;if(eh==this.parent){this.parent.colour=1}else{if(eh.colour==0&&eh.parent.colour==0){ek=eh;continue}}break}};dT.prototype.try_insert_bool=function(eb){var ea=null;var ec=null;if(this.parent==null){if(dT.zpp_pool==null){ea=new dT()}else{ea=dT.zpp_pool;dT.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(dT.zpp_pool==null){ea=new dT()}else{ea=dT.zpp_pool;dT.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(dT.zpp_pool==null){ea=new dT()}else{ea=dT.zpp_pool;dT.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return false}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return true}};dT.prototype.try_insert=function(eb){var ea=null;var ec=null;if(this.parent==null){if(dT.zpp_pool==null){ea=new dT()}else{ea=dT.zpp_pool;dT.zpp_pool=ea.next;ea.next=null}ea.data=eb;this.parent=ea}else{ec=this.parent;while(true){if(this.lt(eb,ec.data)){if(ec.prev==null){if(dT.zpp_pool==null){ea=new dT()}else{ea=dT.zpp_pool;dT.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(this.lt(ec.data,eb)){if(ec.next==null){if(dT.zpp_pool==null){ea=new dT()}else{ea=dT.zpp_pool;dT.zpp_pool=ea.next;ea.next=null}ea.data=eb;ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}else{break}}}}if(ea==null){return ec}else{if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea}};dT.prototype.insert=function(eb){var ea;if(dT.zpp_pool==null){ea=new dT()}else{ea=dT.zpp_pool;dT.zpp_pool=ea.next;ea.next=null}ea.data=eb;if(this.parent==null){this.parent=ea}else{var ec=this.parent;while(true){if(this.lt(ea.data,ec.data)){if(ec.prev==null){ec.prev=ea;ea.parent=ec;break}else{ec=ec.prev}}else{if(ec.next==null){ec.next=ea;ea.parent=ec;break}else{ec=ec.next}}}}if(ea.parent==null){ea.colour=1}else{ea.colour=0;if(ea.parent.colour==0){this.__fix_dbl_red(ea)}}return ea};dT.prototype.__class__=dT;String.prototype.__class__=String;String.__name__=true;Array.__name__=true;var dR={__name__:["Int"]};var dH={__name__:["Dynamic"]};var aj=Number;aj.__name__=["Float"];var dh=Boolean;dh.__ename__=["Bool"];var aq={__name__:["Class"]};var aJ={};dc.__toStr={}.toString;P.epsilon=1e-8;P.fluidAngularDragFriction=2.5;P.fluidAngularDrag=100;P.fluidVacuumDrag=0.5;P.fluidLinearDrag=0.5;P.collisionSlop=0.2;P.collisionSlopCCD=0.5;P.distanceThresholdCCD=0.05;P.staticCCDLinearThreshold=0.05;P.staticCCDAngularThreshold=0.005;P.bulletCCDLinearThreshold=0.125;P.bulletCCDAngularThreshold=0.0125;P.dynamicSweepLinearThreshold=17;P.dynamicSweepAngularThreshold=0.6;P.angularCCDSlipScale=0.75;P.arbiterExpirationDelay=6;P.staticFrictionThreshold=2;P.elasticThreshold=20;P.sleepDelay=60;P.linearSleepThreshold=0.2;P.angularSleepThreshold=0.4;P.contactBiasCoef=0.3;P.contactStaticBiasCoef=0.6;P.contactContinuousBiasCoef=0.4;P.contactContinuousStaticBiasCoef=0.5;P.constraintLinearSlop=0.1;P.constraintAngularSlop=0.001;P.illConditionedThreshold=200000000;Y.zpp_pool=null;cV.zpp_pool=null;bO.zpp_pool=null;d0.zpp_pool=null;d5.zpp_pool=null;cL.zpp_pool=null;v.zpp_pool=null;bL.zpp_pool=null;du.zpp_pool=null;dW.zpp_pool=null;aX.zpp_pool=null;c4.zpp_pool=null;ap.zpp_pool=null;dJ.zpp_pool=null;bC.zpp_pool=null;a0.FMAX=1e+100;cr._Constraint=0;cr._Interactor=0;cr._CbType=0;cr._CbSet=0;cr._Listener=0;cr._ZPP_SimpleVert=0;cr._ZPP_SimpleSeg=0;cr._Space=0;cr._InteractionGroup=0;cS.zpp_pool=null;cC.zpp_pool=null;ar.zpp_pool=null;db.ANY_SHAPE=new dk();db.ANY_BODY=new dk();db.ANY_COMPOUND=new dk();db.ANY_CONSTRAINT=new dk();br.internal=false;br.id_ImmState_ACCEPT=1;br.id_ImmState_IGNORE=2;br.id_ImmState_ALWAYS=4;br.id_GravMassMode_DEFAULT=0;br.id_GravMassMode_FIXED=1;br.id_GravMassMode_SCALED=2;br.id_InertiaMode_DEFAULT=0;br.id_InertiaMode_FIXED=1;br.id_MassMode_DEFAULT=0;br.id_MassMode_FIXED=1;br.id_BodyType_STATIC=1;br.id_BodyType_DYNAMIC=2;br.id_BodyType_KINEMATIC=3;br.id_ListenerType_BODY=0;br.id_PreFlag_ACCEPT=1;br.id_ListenerType_CONSTRAINT=1;br.id_PreFlag_IGNORE=2;br.id_ListenerType_INTERACTION=2;br.id_PreFlag_ACCEPT_ONCE=3;br.id_ListenerType_PRE=3;br.id_PreFlag_IGNORE_ONCE=4;br.id_CbEvent_BEGIN=0;br.id_InteractionType_COLLISION=1;br.id_CbEvent_ONGOING=6;br.id_InteractionType_SENSOR=2;br.id_CbEvent_END=1;br.id_InteractionType_FLUID=4;br.id_CbEvent_WAKE=2;br.id_InteractionType_ANY=7;br.id_CbEvent_SLEEP=3;br.id_CbEvent_BREAK=4;br.id_CbEvent_PRE=5;br.id_Winding_UNDEFINED=0;br.id_Winding_CLOCKWISE=1;br.id_Winding_ANTICLOCKWISE=2;br.id_ValidationResult_VALID=0;br.id_ValidationResult_DEGENERATE=1;br.id_ValidationResult_CONCAVE=2;br.id_ValidationResult_SELF_INTERSECTING=3;br.id_ShapeType_CIRCLE=0;br.id_ShapeType_POLYGON=1;br.id_Broadphase_DYNAMIC_AABB_TREE=0;br.id_Broadphase_SWEEP_AND_PRUNE=1;br.id_ArbiterType_COLLISION=1;br.id_ArbiterType_SENSOR=2;br.id_ArbiterType_FLUID=4;cc.types=(function(ee){var ea;if(br.ListenerType_BODY==null){br.internal=true;br.ListenerType_BODY=new dZ();br.internal=false}var eb=br.ListenerType_BODY;if(br.ListenerType_CONSTRAINT==null){br.internal=true;br.ListenerType_CONSTRAINT=new dZ();br.internal=false}var ed=br.ListenerType_CONSTRAINT;if(br.ListenerType_INTERACTION==null){br.internal=true;br.ListenerType_INTERACTION=new dZ();br.internal=false}var ec=br.ListenerType_INTERACTION;if(br.ListenerType_PRE==null){br.internal=true;br.ListenerType_PRE=new dZ();br.internal=false}ea=[eb,ed,ec,br.ListenerType_PRE];return ea}(this));cc.events=(function(eh){var ea;if(br.CbEvent_BEGIN==null){br.internal=true;br.CbEvent_BEGIN=new bU();br.internal=false}var ee=br.CbEvent_BEGIN;if(br.CbEvent_END==null){br.internal=true;br.CbEvent_END=new bU();br.internal=false}var eg=br.CbEvent_END;if(br.CbEvent_WAKE==null){br.internal=true;br.CbEvent_WAKE=new bU();br.internal=false}var ef=br.CbEvent_WAKE;if(br.CbEvent_SLEEP==null){br.internal=true;br.CbEvent_SLEEP=new bU();br.internal=false}var ed=br.CbEvent_SLEEP;if(br.CbEvent_BREAK==null){br.internal=true;br.CbEvent_BREAK=new bU();br.internal=false}var ec=br.CbEvent_BREAK;if(br.CbEvent_PRE==null){br.internal=true;br.CbEvent_PRE=new bU();br.internal=false}var eb=br.CbEvent_PRE;if(br.CbEvent_ONGOING==null){br.internal=true;br.CbEvent_ONGOING=new bU();br.internal=false}ea=[ee,eg,ef,ed,ec,eb,br.CbEvent_ONGOING];return ea}(this));c1.UCbSet=new af();c1.VCbSet=new af();c1.WCbSet=new af();c1.UCbType=new x();c1.VCbType=new x();c1.WCbType=new x();j.internal=false;j.COL=1;j.FLUID=4;j.SENSOR=2;j.types=(function(ed){var ea;if(br.ArbiterType_COLLISION==null){br.internal=true;br.ArbiterType_COLLISION=new av();br.internal=false}var eb=br.ArbiterType_COLLISION;if(br.ArbiterType_SENSOR==null){br.internal=true;br.ArbiterType_SENSOR=new av();br.internal=false}var ec=br.ArbiterType_SENSOR;if(br.ArbiterType_FLUID==null){br.internal=true;br.ArbiterType_FLUID=new av();br.internal=false}ea=[null,eb,ec,null,br.ArbiterType_FLUID];return ea}(this));A.zpp_pool=null;dK.zpp_pool=null;d9.FACE1=0;d9.FACE2=1;d9.CIRCLE=2;d9.zpp_pool=null;c2.internal=false;c2.zpp_pool=null;cA.zpp_pool=null;ax.SHAPE=1;ax.BODY=2;bT.zpp_pool=null;b7.flowpoly=new aG();b7.flowsegs=new aG();a4.convexPool=null;a4.rayPool=null;a4.internal=false;E.zpp_pool=null;c3.zpp_pool=null;az.ints=null;az.paths=null;dr.zpp_pool=null;dn.zpp_pool=null;W.zpp_pool=null;T.zpp_pool=null;bc.me=new bc();bc.look_march=[-1,224,56,216,14,-1,54,214,131,99,-1,91,141,109,181,85];cm.zpp_pool=null;aE.queue=null;aE.edges=null;ah.nextId=0;ah.zpp_pool=null;a.zpp_pool=null;dG.zpp_pool=null;co.zpp_pool=null;dI.zpp_pool=null;bv.sweep=null;bv.inthash=null;bv.vertices=null;bv.queue=null;bv.ints=null;bv.list_vertices=null;bv.list_queue=null;cD.zpp_pool=null;cG.zpp_pool=null;aL.stack=null;ct.zpp_pool=null;k.zpp_pool=null;z.queue=null;z.stack=null;z.edgeSet=null;bB.zpp_pool=null;cj.types=(function(ed){var ea;if(br.BodyType_STATIC==null){br.internal=true;br.BodyType_STATIC=new cU();br.internal=false}var eb=br.BodyType_STATIC;if(br.BodyType_DYNAMIC==null){br.internal=true;br.BodyType_DYNAMIC=new cU();br.internal=false}var ec=br.BodyType_DYNAMIC;if(br.BodyType_KINEMATIC==null){br.internal=true;br.BodyType_KINEMATIC=new cU();br.internal=false}ea=[null,eb,ec,br.BodyType_KINEMATIC];return ea}(this));cj.bodystack=null;cj.bodyset=null;cj.cur_graph_depth=0;b6.zpp_pool=null;cJ.zpp_pool=null;cJ.WAKE=1;cJ.PROPS=2;cJ.ANGDRAG=4;cJ.ARBITERS=8;bZ.types=(function(ec){var ea;if(br.ShapeType_CIRCLE==null){br.internal=true;br.ShapeType_CIRCLE=new H();br.internal=false}var eb=br.ShapeType_CIRCLE;if(br.ShapeType_POLYGON==null){br.internal=true;br.ShapeType_POLYGON=new H();br.internal=false}ea=[eb,br.ShapeType_POLYGON];return ea}(this));c8.zpp_pool=null;c8.internal=false;dz.zpp_pool=null;bG.zpp_pool=null;d.tmpaabb=new bT();cT.FATTEN=3;cT.VEL_STEPS=2;cW.zpp_pool=null;bx.zpp_pool=null;cg.zpp_pool=null;f.zpp_pool=null;ca.zpp_pool=null;b.zpp_pool=null;cF.zpp_pool=null;b9.zpp_pool=null;bE.zpp_pool=null;cx.zpp_pool=null;Q.zpp_pool=null;dL.zpp_pool=null;aF.zpp_pool=null;cO.zpp_pool=null;g.zpp_pool=null;aT.zpp_pool=null;cd.zpp_pool=null;aR.zpp_pool=null;d3.zpp_pool=null;cH.zpp_pool=null;V.zpp_pool=null;o.zpp_pool=null;dU.zpp_pool=null;dS.zpp_pool=null;d6.zpp_pool=null;dY.zpp_pool=null;aV.zpp_pool=null;cl.zpp_pool=null;cq.zpp_pool=null;d2.zpp_pool=null;dv.zpp_pool=null;bb.zpp_pool=null;L.zpp_pool=null;e.zpp_pool=null;bi.zpp_pool=null;w.zpp_pool=null;c5.zpp_pool=null;cn.zpp_pool=null;cM.zpp_pool=null;dp.zpp_pool=null;aZ.internal=false;b0.internal=false;i.internal=false;bj.internal=false;a1.internal=false;cy.internal=false;bF.internal=false;dl.internal=false;bw.internal=false;dE.internal=false;aw.internal=false;aI.internal=false;bt.internal=false;U.internal=false;aB.internal=false;au.poolGeomPoly=null;au.poolVec2=null;au.poolVec3=null;dV.zpp_pool=null;p.zpp_pool=null;b8.zpp_pool=null;am.zpp_pool=null;bX.zpp_pool=null;bD.zpp_pool=null;bl.zpp_pool=null;dT.zpp_pool=null;aW.main()})(); \ No newline at end of file diff --git a/motox3mspooky/assets/lib/phaser-cachebuster.min.js b/motox3mspooky/assets/lib/phaser-cachebuster.min.js deleted file mode 100644 index 8976f23d..00000000 --- a/motox3mspooky/assets/lib/phaser-cachebuster.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * phaser-cachebuster - version 2.0.0 - * Simple Phaser plugin for adding a query parameter to assets URL's so that they can be 'cache busted' - * - * OrangeGames - * Build at 20-12-2016 - * Released under MIT License - */ - -var __extends=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},PhaserCachebuster;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,c)||this;return d.patchLoader(),d}return __extends(b,a),b.prototype.patchLoader=function(){Object.defineProperty(Phaser.Loader,"cacheBuster",{value:null}),Phaser.Loader.prototype.transformUrl=function(a,b){return a?(null!==this.cacheBuster&&null===a.match(/^(data:)/)&&(a+="?v="+this.cacheBuster),a.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?a:this.baseURL+b.path+a):""}},b}(Phaser.Plugin);a.CacheBuster=b}(PhaserCachebuster||(PhaserCachebuster={})); \ No newline at end of file diff --git a/motox3mspooky/assets/lib/phaser-super-storage.min.js b/motox3mspooky/assets/lib/phaser-super-storage.min.js deleted file mode 100644 index 1a676a3e..00000000 --- a/motox3mspooky/assets/lib/phaser-super-storage.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * phaser-super-storage - version 1.0.4 - * A cross platform storage plugin for Phaser - * - * OrangeGames - * Build at 02-10-2017 - * Released under MIT License - */ - -var PhaserSuperStorage;!function(a){var b;!function(a){var b=function(){function a(a){void 0===a&&(a=""),this.namespace="",this.forcePromises=!1,this.setNamespace(a)}return Object.defineProperty(a.prototype,"length",{get:function(){return null!==this.getNameSpaceMatches()?this.getNameSpaceMatches().length:0},enumerable:!0,configurable:!0}),a.prototype.key=function(a){var b=this.getNameSpaceMatches()[a],c=this.getCookiesForNameSpace()[b]||null;return this.forcePromises?this.promisefy(c):c},a.prototype.getItem=function(a){var b=this.getCookiesForNameSpace()[a]||null;return this.forcePromises?this.promisefy(b):b},a.prototype.setItem=function(a,b){if(document.cookie=encodeURIComponent(this.namespace+a)+"="+encodeURIComponent(b)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/",this.forcePromises)return this.promisefy(null)},a.prototype.removeItem=function(a){if(document.cookie=encodeURIComponent(this.namespace+a)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",this.forcePromises)return this.promisefy(null)},a.prototype.clear=function(){var a=this.getCookiesForNameSpace();for(var b in a)a.hasOwnProperty(b)&&this.removeItem(b);if(this.forcePromises)return this.promisefy(null)},a.prototype.setNamespace=function(a){if(a&&(this.namespace=a+":",this.reg=new RegExp("^"+this.namespace+"[a-zA-Z0-9]*","g")),this.forcePromises)return this.promisefy(a)},a.prototype.getNameSpaceMatches=function(){var a=this,b=decodeURIComponent(document.cookie).split("; ");return b.filter(function(b){return null!==b.match(a.reg)&&b.match(a.reg).length>0})},a.prototype.getCookiesForNameSpace=function(){var a=this,b={};return this.getNameSpaceMatches().forEach(function(c){var d=c.replace(a.namespace,"").split("=");b[d[0]]=d[1]}),b},a.prototype.promisefy=function(a){return new Promise(function(b,c){b(a)})},a}();a.CookieStorage=b}(b=a.StorageAdapters||(a.StorageAdapters={}))}(PhaserSuperStorage||(PhaserSuperStorage={}));var PhaserSuperStorage;!function(a){var b;!function(a){var b=function(){function a(){this.namespace="",this.keys=[]}return Object.defineProperty(a.prototype,"forcePromises",{get:function(){return!0},set:function(a){},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"length",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),a.prototype.key=function(a){return this.promisefy(this.keys[a])},a.prototype.getItem=function(a){var b=this;return new Promise(function(c,d){NativeStorage.getItem(b.namespace+a,function(a){c(a)},function(a){2===a.code?c(null):d(a)})})},a.prototype.setItem=function(a,b){var c=this;return a.length<1?void console.error("CordovaStorage: Key cannot be an empty string!"):new Promise(function(d,e){NativeStorage.setItem(c.namespace+a,b,function(){c.keys.indexOf(a)<0&&(c.keys.push(a),c.save()),d(null)},function(a){e(a)})})},a.prototype.removeItem=function(a){var b=this;return new Promise(function(c,d){NativeStorage.remove(b.namespace+a,function(){var d=b.keys.indexOf(a);d>=0&&(b.keys.splice(d,1),b.save()),c(null)},function(a){d(a)})})},a.prototype.clear=function(){var a=this;return new Promise(function(b,c){for(var d=0,e=0;e=a.keys.length&&(a.keys=[],a.save(),b(null))},function(a){c(a)})})},a.prototype.setNamespace=function(a){var b=this;return void 0===a&&(a=""),this.namespace=a+":",this.keys=[],new Promise(function(a,c){b.load().then(a)["catch"](a)})},a.prototype.promisefy=function(a){return new Promise(function(b,c){b(a)})},a.prototype.load=function(){var a=this;return new Promise(function(b,c){NativeStorage.getItem(a.namespace,function(c){a.keys=JSON.parse(c),b(null)},function(a){c(a)})})},a.prototype.save=function(){NativeStorage.setItem(this.namespace,JSON.stringify(this.keys),function(){},function(a){console.warn("CordovaStorage: Failed to save keys of namespace.")})},a}();a.CordovaStorage=b}(b=a.StorageAdapters||(a.StorageAdapters={}))}(PhaserSuperStorage||(PhaserSuperStorage={}));var PhaserSuperStorage;!function(a){var b;!function(b){var c=function(){function b(a,b){void 0===a&&(a=""),void 0===b&&(b="*"),this.namespace="",this.expectedOrigin="",this.storageLength=0,this.enabled=!1,""!==a&&this.setNamespace(a),this.expectedOrigin=b}return Object.defineProperty(b.prototype,"forcePromises",{get:function(){return!0},set:function(a){},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"length",{get:function(){return this.storageLength},enumerable:!0,configurable:!0}),b.prototype.init=function(){var b=this;return this.sendMessage({command:a.StorageCommand.init}).then(function(){b.enabled=!0})},b.prototype.key=function(b){return this.sendMessage({command:a.StorageCommand.key,value:b})},b.prototype.getItem=function(b){return this.sendMessage({command:a.StorageCommand.getItem,key:b})},b.prototype.setItem=function(b,c){return this.sendMessage({command:a.StorageCommand.setItem,key:b,value:c})},b.prototype.removeItem=function(b){return this.sendMessage({command:a.StorageCommand.removeItem,key:b})},b.prototype.clear=function(){return this.sendMessage({command:a.StorageCommand.clear})},b.prototype.setNamespace=function(b){return this.sendMessage({command:a.StorageCommand.setNamespace,value:b})},b.prototype.sendMessage=function(b){var c,d=this;b.command===a.StorageCommand.init&&(c=!1);var e=new MessageChannel;return new Promise(function(f,g){d.enabled||b.command===a.StorageCommand.init||g("Messaging not enabled!"),b.command===a.StorageCommand.init&&setTimeout(function(){c||g("Unable to get a response in time")},1e3),e.port1.onmessage=function(b){console.log("Frame received message",b);var e=a.StorageUtils.validateMessage(b.data);switch(e.command===a.StorageCommand.init&&(c=!0),void 0!==e.status&&"ok"===e.status||g(e.value),void 0!==e.length&&(d.storageLength=e.length),e.command){case a.StorageCommand.setNamespace:d.namespace=e.value+":";case a.StorageCommand.getItem:case a.StorageCommand.length:case a.StorageCommand.key:f(e.value);break;case a.StorageCommand.setItem:case a.StorageCommand.removeItem:case a.StorageCommand.clear:case a.StorageCommand.init:f(e.status);break;default:g(e.value)}},(d.enabled||b.command===a.StorageCommand.init)&&(console.log("Sending message to parent: ",b),window.parent.postMessage(b,d.expectedOrigin,[e.port2]))})},b}();b.IframeStorage=c}(b=a.StorageAdapters||(a.StorageAdapters={}))}(PhaserSuperStorage||(PhaserSuperStorage={}));var PhaserSuperStorage;!function(a){var b;!function(b){var c=function(){function b(a){void 0===a&&(a=""),this.namespace="",this.forcePromises=!1,this.setNamespace(a)}return Object.defineProperty(b.prototype,"length",{get:function(){var b=Object.keys(localStorage);return a.StorageUtils.nameSpaceKeyFilter(b,this.namespace).length},enumerable:!0,configurable:!0}),b.prototype.key=function(a){return this.forcePromises?this.promisefy(this._key,arguments):this._key(a)},b.prototype._key=function(b){var c=Object.keys(localStorage),d=a.StorageUtils.nameSpaceKeyFilter(c,this.namespace),e=localStorage.getItem(d[b]);return e},b.prototype.getItem=function(a){return this.forcePromises?this.promisefy(this._getItem,arguments):this._getItem(a)},b.prototype._getItem=function(a){return localStorage.getItem(this.namespace+a)},b.prototype.setItem=function(a,b){return this.forcePromises?this.promisefy(this._setItem,arguments):this._setItem(a,b)},b.prototype._setItem=function(a,b){return localStorage.setItem(this.namespace+a,b)},b.prototype.removeItem=function(a){return this.forcePromises?this.promisefy(this._removeItem,arguments):this._removeItem(a)},b.prototype._removeItem=function(a){return localStorage.removeItem(this.namespace+a)},b.prototype.clear=function(){return this.forcePromises?this.promisefy(this._clear,arguments):this._clear()},b.prototype._clear=function(){for(var b=Object.keys(localStorage),c=a.StorageUtils.nameSpaceKeyFilter(b,this.namespace),d=0;d=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 ma.vertices.length)throw new Error("lol2");if(b<0)throw new Error("lol3");for(var d=b;db[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)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;ch)return console.warn("quickDecomp: max level ("+h+") reached."),a;for(var x=0;xq&&(q+=this.vertices.length),p=Number.MAX_VALUE,q3&&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) (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;kh[o]&&(h[o]=l[o]),l[o]c&&(this.lowerBound[b]=c);var d=a.upperBound[b];this.upperBound[b]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;hW&&V0)for(var N=0;NMath.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=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;mi)&&(i=h),(null===k||hi){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;Ay&&(y=n[A]);if(c[1]-m>y)return!l&&0;for(var B=!1,A=w;A=u[0]&&q[0]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)=k.length&&(r=k.length-1);for(var s=k[q],t=k[r],u=q;us&&(s=k[u]);if(a.aabb.lowerBound[1]>s)return!j&&0;for(var v=0,u=q;u=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;eb.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=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;kthis.upperLimit&&(f.maxForce=0,f.minForce=-this.maxForce,this.distance=this.upperLimit,l=!0),this.lowerLimitEnabled&&this.positionc)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&&sh)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>1;if(b<3)return[];for(var c=[],e=[],f=0;f3;){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;r3*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;bc&&(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;g0?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=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)=j&&i=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;ce)&&(e=d),(null===g||de){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;bb&&(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=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),es){var t=r;r=s,s=t}for(var u=0;u=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)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(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=a&&d=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;r0,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=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;C1)for(var C=a.frictionEquations.length-u;C=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))=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;eh?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=Dl?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;eo?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>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;b0&&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=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;q0&&(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=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;j0?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=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;e0){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;ej?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;j1&&(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;bv?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;e0&&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);i0&&(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){athis.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){a0?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=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-h&&(k-=h,c+=i),m=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){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){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;e0&&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;b0){Array.isArray(a)||(a=Array.prototype.slice.call(arguments));for(var b=Number.MAX_VALUE,c=0,d=a.length;c=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.y&&c=a&&e=b&&fb.volume)&&(a.x>=b.x&&a.y>=b.y&&a.rightb.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||ca.bottom+f||ed&&(d=a.x),a.xf&&(f=a.y),a.y=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._edgethis.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._edgethis.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;e3)for(var e=3;e=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;gthis.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;kthis.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)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)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;b0))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;g2){c=[];for(var d=2;d2){e=[];for(var f=2;f2){d=[null];for(var e=2;e2){d=[null];for(var e=2;e2){d=[null];for(var e=2;eb[this._sortProperty]?1:a.zb[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;j0)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;he&&(!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;f0&&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&&(athis.bounds.right&&(a.x=this.bounds.left)),e&&(a.y+a._currentBounds.heightthis.bounds.bottom&&(a.y=this.bounds.top))):(d&&a.x+bthis.bounds.right&&(a.x=this.bounds.left-b),e&&a.y+bthis.bounds.bottom&&(a.y=this.bounds.top-b))},Object.defineProperty(c.World.prototype,"width",{get:function(){return this.bounds.width},set:function(a){a1&&!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=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=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;b0;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=g&&this._localPoint.x=h&&this._localPoint.y=g&&this._localPoint.x=h&&this._localPoint.y0&&this._pollCounterthis.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.previousTapTime0&&(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;fa||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,athis.sprite.texture.crop.right||bthis.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)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height)):(this.sprite.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.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.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height)):(this.sprite.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.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;c0&&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;dthis.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.athis.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=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;eb.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;dv?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;bb?h+j:b,d=ie?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-jb?h+j:b,d=i-ke?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-jb?h+j:b,d=i-ke?i+k:e;else{g=f.points;for(var p=0;pb?h+o:b,d=i-oe?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;oj&&(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;f0)for(f=b;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.xf.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=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.x&&d.x>=c.x&&PIXI.EarCut.pointInTriangle(fc.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;b0||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=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=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;d19600?(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;ch?e:h,i=fj?f:j;c.push(g,i,h,i,h,j,g,j);var l=c.length/2;for(k=0;kA?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;dy?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>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;a0&&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;e0&&this.style.maxLines0||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;l0||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;l0||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;h0&&(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;i0&&(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;i0||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;d0||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;gk){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;de?(g>0&&(b+="\n"),b+=f[g]+" ",e=this.style.wordWrapWidth-h):(e-=i,b+=f[g]+" ")}dd&&(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;ig;i--){for(j=0;j0?this._maxWidth:null,j=[],k=0;k=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;fthis.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;k0&&(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?@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;e0?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=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;ca&&(a=b[c].length);return a},c.RetroFont.prototype.removeUnsupportedCharacters=function(a){for(var b="",c=0;c=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=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=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;cb-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=c.Math.PI2-d?a=b:(Math.abs(b-a)>Math.PI&&(ba?a+=d:b=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;ba[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;cb[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[c0?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;j0?1:0},percent:function(a,b,c){return void 0===c&&(c=0),a>b||c>b?1:aa?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>>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.levelthis.bounds.bottom&&(b=2):a.x>this.bounds.right&&(a.ythis.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;a0&&(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;bthis.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;d0?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;a0?(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;c0?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.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=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;b0&&(this.events.sort(this.sortHandler),this.nextTick=this.events[0].tick)},sortHandler:function(a,b){return a.tickb.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.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;bthis._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;cthis._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._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;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;bj&&(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 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-1},getAssetIndex:function(a,b){for(var c=-1,d=0;d-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=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=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=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=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=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;a1&&(a=1),this._volume!==a){if(this._volume=a,this.usingWebAudio)this.masterGain.gain.value=a;else for(var b=0;b=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._updateThrottleb;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;b0)for(var b=0;b=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-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.position0;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-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>>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+(b1&&(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;f0},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;f0},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;ih.right)break;if(h.x>a.body.right)continue}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(a.body.bottomh.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;ik.right)continue;if(k.x>h.right)break}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(h.bottomk.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;hh.bottom)&&(i.xh.right))return this.separateCircle(a,b,e)}var j=!1,k=!1;this.forceX||Math.abs(this.gravity.y+a.gravity.y)=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.yi.right&&(h=c.Math.distance(j.x,j.y,i.right,i.y)-j.radius):j.y>i.bottom&&(j.xi.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)0&&!a.immovable&&b.velocity.x>a.velocity.x?a.velocity.x*=-1:b.velocity.x<0&&!b.immovable&&a.velocity.x0&&!a.immovable&&b.velocity.y>a.velocity.y?a.velocity.y*=-1:b.velocity.y<0&&!b.immovable&&a.velocity.yMath.PI/2&&(a.velocity.x<0&&!a.immovable&&b.velocity.x0&&!b.immovable&&a.velocity.x>b.velocity.x?b.velocity.x*=-1:a.velocity.y<0&&!a.immovable&&b.velocity.y0&&!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()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()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;k0&&(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.xb.right&&c.right&&(a.x=b.right-this.halfWidth-this.radius,this.velocity.x*=d,this.blocked.right=!0),f.yb.bottom&&c.down&&(a.y=b.bottom-this.halfHeight-this.radius,this.velocity.y*=e,this.blocked.down=!0)}else a.xb.right&&c.right&&(a.x=b.right-this.width,this.velocity.x*=d,this.blocked.right=!0),a.yb.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;hb.deltaAbsY()?j=-1:b.deltaAbsX()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-e0&&!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-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=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-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=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=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;eo;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;g2&&"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&&athis.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;r1)for(l=0;lthis.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;kthis.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;cb)){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-1&&this.collideIndexes.splice(e,1)}for(var f=0;f0?this.layers[a].data[c-1][b]:null},getTileBelow:function(a,b,c){return c0?this.layers[a].data[c][b-1]:null},getTileRight:function(a,b,c){return b-1},removeTile:function(a,b,d){if(d=this.getLayer(d),a>=0&&a=0&&b=0&&b=0&&d-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=0&&a=0&&bthis.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;f1?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=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)=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>>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;t536870912)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=0&&e+1=this.firstgid&&a=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._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);gthis.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;f1&&(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.now0&&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;b0?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); -//# sourceMappingURL=phaser.map \ No newline at end of file diff --git a/motox3mspooky/assets/sound/accel01.ogg b/motox3mspooky/assets/sound/accel01.ogg deleted file mode 100644 index 8c9c8433..00000000 Binary files a/motox3mspooky/assets/sound/accel01.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/accel02.ogg b/motox3mspooky/assets/sound/accel02.ogg deleted file mode 100644 index 024c9ab9..00000000 Binary files a/motox3mspooky/assets/sound/accel02.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/accel03.ogg b/motox3mspooky/assets/sound/accel03.ogg deleted file mode 100644 index d5cc4e19..00000000 Binary files a/motox3mspooky/assets/sound/accel03.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/accel04.ogg b/motox3mspooky/assets/sound/accel04.ogg deleted file mode 100644 index dee14a65..00000000 Binary files a/motox3mspooky/assets/sound/accel04.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/barrel_hit0.ogg b/motox3mspooky/assets/sound/barrel_hit0.ogg deleted file mode 100644 index 8f2bfb8a..00000000 Binary files a/motox3mspooky/assets/sound/barrel_hit0.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/barrel_hit1.ogg b/motox3mspooky/assets/sound/barrel_hit1.ogg deleted file mode 100644 index 528c602a..00000000 Binary files a/motox3mspooky/assets/sound/barrel_hit1.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/boost.ogg b/motox3mspooky/assets/sound/boost.ogg deleted file mode 100644 index 8530e1c9..00000000 Binary files a/motox3mspooky/assets/sound/boost.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/button.ogg b/motox3mspooky/assets/sound/button.ogg deleted file mode 100644 index 593443dd..00000000 Binary files a/motox3mspooky/assets/sound/button.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/dead_01.ogg b/motox3mspooky/assets/sound/dead_01.ogg deleted file mode 100644 index 3b9a7e6a..00000000 Binary files a/motox3mspooky/assets/sound/dead_01.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/dead_02.ogg b/motox3mspooky/assets/sound/dead_02.ogg deleted file mode 100644 index 9d99b293..00000000 Binary files a/motox3mspooky/assets/sound/dead_02.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/dead_03.ogg b/motox3mspooky/assets/sound/dead_03.ogg deleted file mode 100644 index 5c2dcacc..00000000 Binary files a/motox3mspooky/assets/sound/dead_03.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/dead_04.ogg b/motox3mspooky/assets/sound/dead_04.ogg deleted file mode 100644 index ecadd4a1..00000000 Binary files a/motox3mspooky/assets/sound/dead_04.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/dead_05.ogg b/motox3mspooky/assets/sound/dead_05.ogg deleted file mode 100644 index 0d9b5813..00000000 Binary files a/motox3mspooky/assets/sound/dead_05.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/dead_06.ogg b/motox3mspooky/assets/sound/dead_06.ogg deleted file mode 100644 index 4fda09b1..00000000 Binary files a/motox3mspooky/assets/sound/dead_06.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/driver_spikes.ogg b/motox3mspooky/assets/sound/driver_spikes.ogg deleted file mode 100644 index 545b5f7a..00000000 Binary files a/motox3mspooky/assets/sound/driver_spikes.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/eng_loop.ogg b/motox3mspooky/assets/sound/eng_loop.ogg deleted file mode 100644 index 237790e5..00000000 Binary files a/motox3mspooky/assets/sound/eng_loop.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/engine_finish.ogg b/motox3mspooky/assets/sound/engine_finish.ogg deleted file mode 100644 index 35ebe58d..00000000 Binary files a/motox3mspooky/assets/sound/engine_finish.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/engine_start.ogg b/motox3mspooky/assets/sound/engine_start.ogg deleted file mode 100644 index 981543ef..00000000 Binary files a/motox3mspooky/assets/sound/engine_start.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/explode1.ogg b/motox3mspooky/assets/sound/explode1.ogg deleted file mode 100644 index b5ca1fe5..00000000 Binary files a/motox3mspooky/assets/sound/explode1.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/explode2.ogg b/motox3mspooky/assets/sound/explode2.ogg deleted file mode 100644 index fdd18976..00000000 Binary files a/motox3mspooky/assets/sound/explode2.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/flip_01.ogg b/motox3mspooky/assets/sound/flip_01.ogg deleted file mode 100644 index 3d343b5e..00000000 Binary files a/motox3mspooky/assets/sound/flip_01.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/flip_02.ogg b/motox3mspooky/assets/sound/flip_02.ogg deleted file mode 100644 index 403b8629..00000000 Binary files a/motox3mspooky/assets/sound/flip_02.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/flip_03.ogg b/motox3mspooky/assets/sound/flip_03.ogg deleted file mode 100644 index edff2506..00000000 Binary files a/motox3mspooky/assets/sound/flip_03.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/flip_04.ogg b/motox3mspooky/assets/sound/flip_04.ogg deleted file mode 100644 index 9ce80005..00000000 Binary files a/motox3mspooky/assets/sound/flip_04.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/flip_05.ogg b/motox3mspooky/assets/sound/flip_05.ogg deleted file mode 100644 index d6c343d0..00000000 Binary files a/motox3mspooky/assets/sound/flip_05.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/flip_06.ogg b/motox3mspooky/assets/sound/flip_06.ogg deleted file mode 100644 index 5a7977a0..00000000 Binary files a/motox3mspooky/assets/sound/flip_06.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/fly_01.ogg b/motox3mspooky/assets/sound/fly_01.ogg deleted file mode 100644 index 59e8d56a..00000000 Binary files a/motox3mspooky/assets/sound/fly_01.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/fly_02.ogg b/motox3mspooky/assets/sound/fly_02.ogg deleted file mode 100644 index 396ffb8d..00000000 Binary files a/motox3mspooky/assets/sound/fly_02.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/fly_03.ogg b/motox3mspooky/assets/sound/fly_03.ogg deleted file mode 100644 index dffae884..00000000 Binary files a/motox3mspooky/assets/sound/fly_03.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/game_track.ogg b/motox3mspooky/assets/sound/game_track.ogg deleted file mode 100644 index bbab4758..00000000 Binary files a/motox3mspooky/assets/sound/game_track.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/glass_crash.ogg b/motox3mspooky/assets/sound/glass_crash.ogg deleted file mode 100644 index 9571a777..00000000 Binary files a/motox3mspooky/assets/sound/glass_crash.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/landing.ogg b/motox3mspooky/assets/sound/landing.ogg deleted file mode 100644 index c29ea0fd..00000000 Binary files a/motox3mspooky/assets/sound/landing.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/menu_track_1.ogg b/motox3mspooky/assets/sound/menu_track_1.ogg deleted file mode 100644 index a272e79c..00000000 Binary files a/motox3mspooky/assets/sound/menu_track_1.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/motor.ogg b/motox3mspooky/assets/sound/motor.ogg deleted file mode 100644 index 78de3ec5..00000000 Binary files a/motox3mspooky/assets/sound/motor.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/safepoint.ogg b/motox3mspooky/assets/sound/safepoint.ogg deleted file mode 100644 index 4a98d98b..00000000 Binary files a/motox3mspooky/assets/sound/safepoint.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/stones.ogg b/motox3mspooky/assets/sound/stones.ogg deleted file mode 100644 index 5eb4f2fc..00000000 Binary files a/motox3mspooky/assets/sound/stones.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/wendy.ogg b/motox3mspooky/assets/sound/wendy.ogg deleted file mode 100644 index ae0db2ac..00000000 Binary files a/motox3mspooky/assets/sound/wendy.ogg and /dev/null differ diff --git a/motox3mspooky/assets/sound/wood_hit0.ogg b/motox3mspooky/assets/sound/wood_hit0.ogg deleted file mode 100644 index a26e3d54..00000000 Binary files a/motox3mspooky/assets/sound/wood_hit0.ogg and /dev/null differ diff --git a/motox3mspooky/index.html b/motox3mspooky/index.html deleted file mode 100644 index c0ca4d03..00000000 --- a/motox3mspooky/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - MotoX3M Spooky - - - - - - - - - - - - -
diff --git a/motox3mspooky/motox3m.min.js b/motox3mspooky/motox3m.min.js deleted file mode 100644 index 678c5587..00000000 --- a/motox3mspooky/motox3m.min.js +++ /dev/null @@ -1,778 +0,0 @@ -!function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var i=t&&t.__esModule?function e(){return t.default}:function e(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=54)}([function(t,e,i){"use strict";e.__esModule=!0;var s=i(6);e.MyRand=s.MyRand,e.UiStrUtil=s.UiStrUtil;var n=i(41);e.Drawing=n.Drawing;var o=i(16);e.NapeUtil=o.NapeUtil;var a=i(64);e.GameCore=a.GameCore;var r=i(65);e.GameObject=r.GameObject;var h=i(66);e.IDisposed=h.IDisposed;var l=i(67);e.IUpdated=l.IUpdated;var c=i(68);e.ISafed=c.ISafed;var u=i(69);e.IRestarted=u.IRestarted;var d=i(70);e.IActivatable=d.IActivatable;var p=i(42);e.GamePhysics=p.GamePhysics;var f=i(31);e.NapePhysics=f.NapePhysics;var y=i(71);e.GameView=y.GameView;var g=i(32);e.RaceCamera=g.RaceCamera;var m=i(33);e.CameraPathes=m.CameraPathes;var v=i(72);e.CarParams=v.CarParams;var b=i(73);e.CarUpgrades=b.CarUpgrades;var x=i(74);e.RaceCars=x.RaceCars;var _=i(75);e.WeaponParams=_.WeaponParams;var w=i(76);e.Inventory=w.Inventory;var P=i(77);e.LeagueVO=P.LeagueVO;var C=i(78);e.MapVO=C.MapVO;var T=i(79);e.RaceData=T.RaceData;var S=i(80);e.BgElVo=S.BgElVo;var A=i(81);e.ShopCarVO=A.ShopCarVO;var E=i(43);e.CarsData=E.CarsData;var I=i(35);e.GameData=I.GameData;var M=i(34);e.RacesData=M.RacesData;var O=i(82);e.ShopData=O.ShopData;var R=i(83);e.CarBuilder=R.CarBuilder;var B=i(85);e.RaceBuilder=B.RaceBuilder;var L=i(89);e.FrameGraphic=L.FrameGraphic;var k=i(46);e.GroundPartClip=k.GroundPartClip;var D=i(45);e.SmokePartClip=D.SmokePartClip;var F=i(90);e.TrailPart=F.TrailPart;var G=i(91);e.WheelGraphic=G.WheelGraphic;var U=i(92);e.BgEl=U.BgEl;var N=i(93);e.LandscapeShape=N.LandscapeShape;var j=i(47);e.CarObject=j.CarObject;var W=i(94);e.BikeObject=W.BikeObject;var X=i(95);e.CorpseObject=X.CorpseObject;var H=i(96);e.DriverObject=H.DriverObject;var V=i(97);e.FrameObject=V.FrameObject;var Y=i(98);e.PartObject=Y.PartObject;var q=i(99);e.WheelObject=q.WheelObject;var z=i(100);e.BgObject=z.BgObject;var K=i(101);e.DecorActObject=K.DecorActObject;var J=i(102);e.DecorMultiObject=J.DecorMultiObject;var Z=i(48);e.DecorObject=Z.DecorObject;var Q=i(103);e.VectorDecor=Q.VectorDecor;var $=i(39);e.CarExplodeObject=$.CarExplodeObject;var tt=i(104);e.GlassExplodeObject=tt.GlassExplodeObject;var et=i(38);e.TrailParticlesSystem=et.TrailParticlesSystem;var it=i(44);e.TrailPartObject=it.TrailPartObject;var st=i(105);e.GlassBlock=st.GlassBlock;var nt=i(49);e.GlassBlockPart=nt.GlassBlockPart;var ot=i(106);e.GroundObject=ot.GroundObject;var at=i(107);e.PlankObject=at.PlankObject;var rt=i(108);e.ShaperObject=rt.ShaperObject;var ht=i(109);e.WaterObject=ht.WaterObject;var lt=i(111);e.BoostObject=lt.BoostObject;var ct=i(51);e.DynamicBodyObject=ct.DynamicBodyObject;var ut=i(112);e.FinishObject=ut.FinishObject;var dt=i(113);e.MotorObject=dt.MotorObject;var pt=i(114);e.MoverPatherObject=pt.MoverPatherObject;var ft=i(115);e.PivotObject=ft.PivotObject;var yt=i(116);e.RemovedBodyObjects=yt.RemovedBodyObjects;var gt=i(117);e.SafePointObject=gt.SafePointObject;var mt=i(118);e.SpikesObject=mt.SpikesObject;var vt=i(119);e.TntObject=vt.TntObject;var bt=i(120);e.ToggleObject=bt.ToggleObject;var xt=i(121);e.CameraZone=xt.CameraZone;var _t=i(122);e.WaypointObject=_t.WaypointObject;var wt=i(1);e.ObjectTypes=wt.ObjectTypes;var Pt=i(11);e.CbTypes=Pt.CbTypes;var Ct=i(7);e.Filters=Ct.Filters;var Tt=i(8);e.Materials=Tt.Materials;var St=i(123);e.MaxPhysics=St.MaxPhysics;var At=i(124);e.BodyEffector=At.BodyEffector;var Et=i(125);e.BoostEffector=Et.BoostEffector;var It=i(126);e.PlayerController=It.PlayerController;var Mt=i(52);e.CarController=Mt.CarController;var Ot=i(5);e.GraphicUtil=Ot.GraphicUtil;var Rt=i(50);e.PhysicUtil=Rt.PhysicUtil;var Bt=i(2);e.MaxGameView=Bt.MaxGameView},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.BG=0,t.LANDSCAPE=1,t.LANDSCAPE_SHAPE=9,t.CAR=2,t.BULLET=3,t.FRONT=4,t.OBJECT=5,t.EFFECT=6,t.CAR_PART=7,t.LANDSCAPE_BACK=8,t}();e.ObjectTypes=s},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(12),a=i(1),r=Phaser.Group,h=i(10),l=i(6),c=i(3),u=i(36),d=i(4),p=function(){function t(){}return t}();e.default=p;var f=function(){function t(t,e,i){this.target=i,this.method=e,this.key=t}return t}();e.RenderVO=f;var y=function(){function t(){}return t.BG=[["Bg0_0","Bg1_0","Bg2_0"],["Bg0_0","Bg1_0","Bg2_0"]],t.ROAD_LINE=[["line","RoadLine0_1","RoadLine1_4","RoadLine0_3","RoadLine0_4","Plank0","line","line_alum","RoadLine0_8","line_spike","UnLine0","UnLine1","line_alum","CandyGround","RoadLine0_Bg"]],t.PILLAR_LINE=[["RoadPillar0_0","CandyPillar","line_alum"]],t.ROAD_TILE=["RoadTile0","RoadTile0","RoadTile0"],t.ROAD_SHAPE=[["RoadTile0_1","RoadTile1_1","RoadTile0","UnTile0","UnTile1","UnTile2","RoadTile0_Bg"],["RoadTile0_1","RoadTile1_1","RoadTile0","UnTile0","UnTile1","UnTile2","RoadTile0_Bg"],["RoadTile0_1","RoadTile1_1","RoadTile0","UnTile0","UnTile1","UnTile2","RoadTile0_Bg"]],t.DECORS=[["Dec12","Dec17","Dec18","Dec19","Dec20","Dec21","Dec22","Dec23","Dec24","Dec25","Dec26","Dec27","Dec28","Sign1","Sign2","Sign15","Sign21","SignPillar","PillarTop0_0","PillarTop0_1","PillarTop0_2","PillarBot0_0","PillarBot0_1","PillarBot0_2","GlassCrashed0_0","GlassCrashed0_1","GlassCrashed0_2","GlassCrashed0_3","GlassCrashed0_4","GlassCrashed0_5","BoostAnim","RocketAnim","Pivot0","particle_boost","GeyserBase","geyser_anim","PlankCandy0","PlankCandy1"]],t.OBJECTS=[["Tnt1","BarrelE","SpikesE","Removed0","Removed1","Plank0","GlassCrashed0","GlassCrashed1","BoostE","PlankBone","RemovedWipe0","SphereE"]],t.FRAMES_ANCHORX=[.48,null,.561,null,.579],t.FRAMES_ANCHORY=[.65,null,.685,null,.654],t.SUSPEND_BACK_ANCHORX=[.05,null,-.125,null,.125],t.SUSPEND_BACK_ANCHORY=[.5,null,.5,null,.5],t.SUSPEND_FRONT_ANCHORX=[.8,null,.923,null,.846],t.SUSPEND_FRONT_ANCHORY=[.2,null,.4,null,.385],t.HEAD_ANCHORX=[.5,null,.55,null,.444],t.HEAD_ANCHORY=[.5,null,.579,null,.543],t.HIP_ANCHORX=[.5,null,.355,null,.5],t.HIP_ANCHORY=[.5,null,.29,null,.454],t.SHIN_ANCHORX=[.5,null,.25,null,.35],t.SHIN_ANCHORY=[.5,null,.24,null,.5],t.ARM_ANCHORX=[.5,null,.47,null,.5],t.ARM_ANCHORY=[.5,null,.5,null,.5],t.FOREARM_ANCHORX=[.5,null,.455,null,.5],t.FOREARM_ANCHORY=[.5,null,.25,null,.5],t.WHEELS=[["Wheel_1_0"],["Wheel_1_0"],["Wheel_3_0"],["Wheel_3_0"],["Wheel_5_0"]],t}();e.AssetsList=y;var g=function(){function t(){this.storage={}}return t.prototype.getByKey=function(t){return this.storage[t]},t.prototype.add=function(t,e){this.storage[t]=e},t.prototype.dispose=function(){for(var t in this.storage)this.storage[t]&&(this.storage[t]=null)},Object.defineProperty(t,"instance",{get:function(){return null===t._instance&&(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.currentAatlass=c.Atlases.Theme0,t._instance=null,t}();e.AssetsStorage=g;var m=function(t){function e(e){var i=t.call(this,e)||this;return i.gamePadLayer=null,i.bg=new r(i.game),i.bg.interactive=!1,i.bg.scale.set(2),i.race=new r(i.game),i.race.interactive=!1,i.landscapeShapes=new r(i.game,i.race),i.landscape=new r(i.game,i.race),i.objects=new r(i.game,i.race),i.front=new r(i.game,i.race),i.gui=new r(i.game),i.raceCamera=new n.RaceCamera,i.raceCamera.setup(i.race,o.default.GAME_W,o.default.GAME_H,d.MaxGameCore.instance),i.gamePadLayer=i.game.add.group(),u.default.instance.init(i.gamePadLayer,i.game),i}return s(e,t),e.prototype.start=function(){t.prototype.start.call(this),this.game.world.addChild(this.bg),this.game.world.addChild(this.race),this.game.world.addChild(this.gui),this.game.world.addChild(this.gamePadLayer),this.raceCamera.setup(this.race,o.default.GAME_W,o.default.GAME_H,d.MaxGameCore.instance)},e.prototype.add=function(t){t.type===a.ObjectTypes.BG?this.bg.addChild(t.graphic):t.type===a.ObjectTypes.LANDSCAPE?this.landscape.addChild(t.graphic):t.type===a.ObjectTypes.LANDSCAPE_SHAPE?this.landscapeShapes.addChild(t.graphic):t.type===a.ObjectTypes.LANDSCAPE_BACK?this.landscape.addChildAt(t.graphic,0):t.type===a.ObjectTypes.CAR?this.objects.addChild(t.graphic):t.type===a.ObjectTypes.OBJECT?this.objects.addChild(t.graphic):t.type===a.ObjectTypes.BULLET?this.objects.addChild(t.graphic):t.type===a.ObjectTypes.EFFECT?this.front.addChild(t.graphic):t.type===a.ObjectTypes.CAR_PART?this.front.addChildAt(t.graphic,0):t.type===a.ObjectTypes.FRONT&&this.front.addChild(t.graphic)},e.prototype.update=function(e,i,s,o){if(t.prototype.update.call(this,e,i,s,o),s){var a=n.RacesData.TARGET_X,r=n.RacesData.TARGET_Y;n.CameraZone.focusedOnPoint?this.raceCamera.focusOnPoint(a,r):n.CameraZone.current?this.raceCamera.focusOnCameraZone(a,r):this.raceCamera.focusOnCar(a,r,e)}},e.prototype.release=function(){this.raceCamera.release(),this.raceCamera=null,this.car=null,this.bg=null,this.landscape=null,this.landscapeShapes=null,this.objects=null,this.front=null,this.gui=null},e}(n.GameView);e.MaxGameView=m;var v=function(){function t(){this.complete=new h.Signal}return Object.defineProperty(t,"instance",{get:function(){return null===t._instance&&(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.theme=0;var t=null,e=0,i="",s=g.instance,o=y.BG[this.theme];for(s.add("Bg0",o[0]),o[2]&&s.add("Bg2",o[2]),t=y.ROAD_LINE[this.theme],e=0;e1&&(n=1),n=this.prevPart+.2*(n-this.prevPart);var o=(.1+.5*n)*s;o<0?o=0:o>1&&(o=1),this.pitchPlaying?(this.prevPart!==n&&(this.enginePitch.volume=o),this.prevPart=n):(this.enginePitch.play("",0,o,!0),this.pitchPlaying=!0)}},e.prototype.update=function(i){if(!this.playerCar){if(!this.car)return;this.playerCar=this.car}if(this.calcEngineSound(this.playerCar.backWheel.body.angularVel),null!==this.engineStart&&(this.engineStart.isPlaying||null===this.engineLoop&&(this.engineLoop=l.default.getInstance().play(c.Sounds.EngineFon,1,!0))),this.paused)null!==this.engineLoop&&(this.engineLoop.volume=0),null!==this.engineStart&&this.engineStart.isPlaying&&(this.engineStart.volume=0),null!==this.engineGaz&&(this.engineGaz.stop(),this.engineGaz=null);else if(null!==this.engineLoop)if(this.car.dead)this.engineLoop.volume=0,null!==this.engineGaz&&(this.engineGaz.stop(),this.engineGaz=null);else{if(this.engineLoop.volume=u.default.getInstance().sfx?1:0,null!==this.engineGaz&&(this.engineGaz.volume=u.default.getInstance().sfx?1:0),!this.prevAccel&&this.car.accell){null!==this.engineGaz&&(this.engineGaz.stop(),this.engineGaz=null),this.engineGazNum++,5===this.engineGazNum&&(this.engineGazNum=1);var s="accel0"+this.engineGazNum;this.engineGaz=l.default.getInstance().play(s)}this.prevAccel=this.car.accell}this.paused||(o.RacesData.data.delayForMaks>0&&(o.RacesData.data.delayForMaks-=i,o.RacesData.data.delayForMaks<=0&&e.instance.setDelayedMasks()),this.updateIternal(i),t.prototype.update.call(this,i),this.view.update(this.car.speed,0,!0,i),this.car.frame.graphic.update2(i))},e.prototype.processFinish=function(){this.finished||(this.finished=!0,this.signalFinish.dispatch(1),l.default.getInstance().play(c.Sounds.Finish))},e.prototype.updateIternal=function(t){this.paused?r.default.instance.hideTimer():this.drive?(this.timer+=t,r.default.instance.showTimer()):(this.playerCar.accell||0!==this.playerCar.tilt)&&(this.drive=!0,r.default.instance.hideControlsHint()),this.playerCar.finished||(o.RacesData.TARGET_X=this.playerCar.x,o.RacesData.TARGET_Y=this.playerCar.y)},e.prototype.setMap=function(t){t.id=o.GameData.raceId,o.RacesData.map=t,this.prepareAssets()},e.prototype.prepareAssets=function(){a.RaceAssetsLoader.instance.complete.add(this.assetsReady,this),a.RaceAssetsLoader.instance.start()},e.prototype.assetsReady=function(t){void 0===t&&(t=null),t&&t.dispose(),o.RacesData.data.assetsReady=!0,this.buildLevel()},e.prototype.buildLevel=function(){o.RacesData.data.restart();var t=new o.RaceBuilder;t.complete.add(this.buildReady,this),t.start()},e.prototype.buildReady=function(t){void 0===t&&(t=null),t&&t.dispose(),this.createCars()},e.prototype.createCars=function(){this.carBuilder||(this.carBuilder=new o.CarBuilder),this.carBuilder.complete.add(this.carsReady,this),this.carBuilder.createAllCars()},e.prototype.carsReady=function(){null!=this.carBuilder&&this.carBuilder.dispose(),this.carBuilder=null,o.RacesData.data.camera=e.instance.view.raceCamera},e.prototype.getSpace=function(){return n.NapePhysics.space},e.prototype.restartFromSafePoint=function(t){for(var i=0;i0?"line_top":"line_wood_g":2===u?x="line_bg":3===u?x="line_metal_g":13==u&&(x="CandyGround"),x&&("line"===x||x.indexOf("line_top"),s.Drawing.drawBitmapPath(x,d,o))}return d},t.createCarFrameGraphic=function(t,e){return new o.FrameGraphic(t,e)},t.createCarWheelGraphic=function(t,e,i){return new o.WheelGraphic(t,i)},t.createImageWithObj=function(e,i){if(null===i)return null;var s;return s=t.game.add.sprite(0,0,t.currentAtlass,i+"0000"),s.anchor.set(.5),e&&(s.position.set(e.x,e.y),s.rotation=a.default.TO_RAD*e.rotation),s},t.createMovieClip=function(e,i,s,n,o){if(void 0===s&&(s=12),void 0===n&&(n=!0),void 0===o&&(o=!1),null===i)return null;var h;return"RocketAnim"==i?(h=t.game.add.sprite(0,0,r.Atlases.Cars,"RocketAnim0000"),h.animations.add("RocketAnim",Phaser.Animation.generateFrameNames("RocketAnim",0,5,"",4)),h.anchor.set(1,.5),h.animations.getAnimation("RocketAnim").play(30),h.animations.getAnimation("RocketAnim").stop()):"BoostAnim"==i?(h=t.game.add.sprite(0,0,t.currentAtlass,"boost_anim0000"),h.animations.add("boost_anim",Phaser.Animation.generateFrameNames("boost_anim",0,9,"",4)),h.anchor.set(.5),h.animations.getAnimation("boost_anim").play(30),h.animations.getAnimation("boost_anim").stop()):"SafePointAnim"===i||"CarExplode"===i?(h=t.game.add.sprite(0,0,t.currentAtlass,"bg0000"),h.animations.add(i,Phaser.Animation.generateFrameNames(i,0,28,"",4)),h.anchor.set(.5),h.animations.getAnimation(i).play(30),h.animations.getAnimation(i).stop()):"CarExplode"===i?(h=t.game.add.sprite(0,0,r.Atlases.Cars,i+"0000"),h.animations.add(i,Phaser.Animation.generateFrameNames(i,0,28,"",4)),h.anchor.set(.5),h.animations.getAnimation(i).play(30),h.animations.getAnimation(i).stop()):(h=t.game.add.sprite(0,0,t.currentAtlass,"bg0000"),h.scale.set(.4)),e&&(h.position.set(e.x,e.y),h.rotation=a.default.TO_RAD*e.rotation),h},t.createImage=function(e,i,s,n){if(null===n)return null;var l,c=n+"",u=o.Inventory.instance.skin;return 0===c.indexOf("driver")||0===c.indexOf("suspend")?(l=t.game.add.sprite(0,0,r.Atlases.Cars,c+u+"0000"),0===c.indexOf("suspend")?-1!==c.indexOf("back")?l.anchor.set(h.AssetsList.SUSPEND_BACK_ANCHORX[u-1],h.AssetsList.SUSPEND_BACK_ANCHORY[u-1]):l.anchor.set(h.AssetsList.SUSPEND_FRONT_ANCHORX[u-1],h.AssetsList.SUSPEND_FRONT_ANCHORY[u-1]):"driver_head"===c?l.anchor.set(h.AssetsList.HEAD_ANCHORX[u-1],h.AssetsList.HEAD_ANCHORY[u-1]):"driver_hip"===c?l.anchor.set(h.AssetsList.HIP_ANCHORX[u-1],h.AssetsList.HIP_ANCHORY[u-1]):"driver_shin"===c?l.anchor.set(h.AssetsList.SHIN_ANCHORX[u-1],h.AssetsList.SHIN_ANCHORY[u-1]):"driver_arm"===c?l.anchor.set(h.AssetsList.ARM_ANCHORX[u-1],h.AssetsList.ARM_ANCHORY[u-1]):"driver_forearm"===c?l.anchor.set(h.AssetsList.FOREARM_ANCHORX[u-1],h.AssetsList.FOREARM_ANCHORY[u-1]):l.anchor.set(.5)):-1!==c.indexOf("FrameExploded")?(l=t.game.add.sprite(0,0,r.Atlases.Cars,c+"0000"),l.anchor.set(h.AssetsList.FRAMES_ANCHORX[u-1],h.AssetsList.FRAMES_ANCHORY[u-1])):(l=t.game.add.sprite(0,0,t.currentAtlass,c+"0000"),l.scale.set(.4)),l.rotation=s*a.default.TO_RAD,l},t.createLandscapeShape=function(e,i,r,h){var l=new o.LandscapeShape(e,i,r),c=0,u=null,d=e.params.layer;h?u="finish":(u="tile_stone_hall",1===d?u="tile_bg":2===d?u="tile":3===d?u="tile_stone_hall":4===d?u="tile_rivet":5===d?u="tile_rivet_bg":6===d?u="tile_stone":7==d&&(u="tile_water_bg"));var p=e.params.vertices,f,y=!1,g=0,m=null;0===d?m="RoadLine0_4":1===d?(u="tile_bg",m="RoadLine0_Bg"):2===d?!0===e.params.line&&(m="line"):3===d?(m="line_spike",g=1):4===d?m="line_rivet":5===d||(6===d?m="line_stone_shape":8===d?y=!0:9===d&&(m="line_spike",g=2));var v=p[0],b=p.length,x=0,_=10,w=0,P=0,C=!1;if(4==b)for(C=!0,x=0;xR?(R=k,0===B&&(B=a.default.dist(v.x,v.y,p[x-1].x,p[x-1].y))):M=!1}else M=!1}v.x+i4||Math.abs(p[0].y-p[p.length-1].y)>4)&&(f=new n.Point(.5*(p[0].x+p[p.length-1].x)+i,.5*(p[0].y+p[p.length-1].y)+r),F[0]=f);for(var U=0;U0&&P-_>_-p[P-1]&&(P-=1,w=p[P]);var T=8156528,S=void 0,A=Math.atan2(x.y-b.y,x.x-b.x);S=t.game.add.image(.5*(b.x+x.x),.5*(b.y+x.y),r.Atlases.Theme0,d[P]),S.rotation=A,c.addChild(S);var E=_/w;S.scale.set(E,1),l?S.anchor.set(.5):S.anchor.set(.5,.2);var I=void 0,M=void 0;v>0?(I=Math.random()*u.length>>0,M=f+.5*a.default.normalizeAngle(A-f),S=t.game.add.image(b.x,b.y,r.Atlases.Theme0,u[I]),S.rotation=M,c.addChild(S),l?S.anchor.set(.5):S.anchor.set(.5,.2)):y=A,h&&v==m-1&&(I=Math.random()*u.length>>0,M=A+.5*a.default.normalizeAngle(y-A),S=t.game.add.image(x.x,x.y,r.Atlases.Theme0,u[I]),S.rotation=M,c.addChild(S),l?S.anchor.set(.5):S.anchor.set(.5,.2)),f=A}return c},t.game=null,t.currentAtlass=r.Atlases.Theme0,t.masks=[],t.maskOwners=[],t}();e.GraphicUtil=c},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.normalizeAngle=function(t){return t>Math.PI?t-=2*Math.PI:t<-Math.PI&&(t+=2*Math.PI),t},t.normalizeAngle2=function(t){return t%=2*Math.PI,t>Math.PI?t-=2*Math.PI:t<-Math.PI&&(t+=2*Math.PI),t},t.normalizeVertices=function(e){var i={};i.className=e.className,i.params={},i.params.vertices=[];var s=e.params,n=s.x,o=s.y;for(var a in s)"vertices"!==a&&(i.params[a]=s[a]);for(var r=t.TO_RAD*s.rotation,h=s.vertices,l=i.params.vertices,c=h.length,u=0;u=1e3;)e/=1e3,++s;return i+e.toString()+t.RANKS[s]+t.PRICE_POSTFIX},t.formatTime=function(t){var e=t/60>>0,i=e.toString();e<10&&(i="0"+i),t-=60*e,e=t>>0;var s=e.toString();return e<10&&(s="0"+s),i+":"+s},t.PRICE_POSTFIX="",t.RANKS=["","k","m","omg","wtf"],t}();e.UiStrUtil=o},function(t,e,i){"use strict";e.__esModule=!0;var s=nape.dynamics.InteractionFilter,n=function(){function t(){}return t.NOTHING=new s(0,0,0,0,0,0),t.SENSOR=new s(0,0,1,4369),t.SENS_ONLY_PLAYER=new s(0,0,1,4368),t.TOGGLE=new s(0,0,1,4369),t.WITH_EARTH_ONLY=new s(1,4369,0,0),t.WHEEL=new s(4096,272,17,4369),t.DRIVER_PART=new s(4096,272),t.BODY_COLLIDER=new s(4096,272,17,4369),t.GROUND=new s(17,4369,1,4369),t.PLAYER_ONLY=new s(256,4096,1,4369),t.WATER=new s(0,0,1,4369),t}();e.Filters=n},function(t,e,i){"use strict";e.__esModule=!0;var s=nape.phys.Material,n=function(){function t(){}return t.DEFAULT=new s,t.GROUND=new s,t.WIEGHTLESS=new s(0,1,2,.001),t.TUMBEWEED=new s(0,1,2,.5),t.GBARREL=new s(0,1,2,.5),t}();e.Materials=n},function(t,e,i){"use strict";e.__esModule=!0;var s=i(15),n=function(){function t(t){this.music=null,this.audioInstances={},this.sound=t.sound}return t.getInstance=function(e){if(null===t.instance){if(!e)throw new Error("Cant create a new instance without a game");t.instance=new t(e)}return t.instance},t.prototype.play=function(t,e,i){return void 0===e&&(e=1),void 0===i&&(i=!1),this.audioInstances.hasOwnProperty(t)||(this.audioInstances[t]=this.sound.add(t)),s.default.getInstance().sfx?(this.audioInstances[t].play(void 0,void 0,e,i,!0),this.audioInstances[t]):this.audioInstances[t].play(void 0,void 0,0,i,!0)},t.prototype.isPlaying=function(t){return!!this.audioInstances.hasOwnProperty(t)&&this.audioInstances[t].isPlaying},t.prototype.stop=function(t){this.audioInstances.hasOwnProperty(t)&&this.audioInstances[t].stop()},t.prototype.playMusic=function(t){if(!s.default.getInstance().music)return this.music=this.sound.play(t,.5,!0),void this.music.stop();null!==this.music&&this.music.name===t||(null!==this.music&&this.music.name!==t&&this.music.stop(),this.music=this.sound.play(t,.5,!0))},t.prototype.fadeMusicVolume=function(t,e){this.music&&this.music.fadeTo(t,e)},t.prototype.stopMusic=function(){null!==this.music&&this.music.isPlaying&&this.music.stop()},t.prototype.toggleSfx=function(){s.default.getInstance().sfx=!s.default.getInstance().sfx},t.prototype.toggleMusic=function(){s.default.getInstance().music=!s.default.getInstance().music,s.default.getInstance().music?this.music&&this.music.play(void 0,void 0,1,!0):this.music&&this.music.isPlaying&&this.stopMusic()},t.instance=null,t}();e.default=n},function(t,e,i){(function(e){t.exports=e.Phaser=i(58)}).call(e,i(27))},function(t,e,i){"use strict";e.__esModule=!0;var s=nape.callbacks.CbType,n=function(){function t(){}return t.WHEEL=new s,t.BODY_COLLIDER=new s,t.ZONE_FINISH=new s,t.COIN=new s,t.DESTOYED=new s,t.TOGGLE=new s,t.TOGGLE_OFF=new s,t.GROUND=new s,t.DRIVER=new s,t.DRIVER_PART=new s,t.SAFE_POINT=new s,t.SPIKES=new s,t.SAW=new s,t.BARREL=new s,t.WOOD=new s,t.WATER=new s,t.GLASS=new s,t.BOOST=new s,t.GEYSER=new s,t}();e.CbTypes=n},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.GAME_W=720,t.GAME_H=480,t.DISPLAY_W=720,t.DISPLAY_H=480,t.CAR_ED_SAVE="mrce",t.ED_SAVE="mre",t}();e.default=s},function(t,e,i){(function(e){t.exports=e.PIXI=i(57)}).call(e,i(27))},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(13),i(10);var n=i(18),o=function(t){function e(e,i,s,o,a,r){void 0===r&&(r=null);var h=t.call(this,e)||this;return h._enable=!0,h._graphics=null,h._texts=null,h.inputEnableChildren=!0,h._graphics=h.game.add.group(h),h._texts=h.game.add.group(h),h.btn=h.game.add.button(0,0,r,o,a),h.btn.anchor.set(.5),h._graphics.addChild(h.btn),null!==s&&(h.label=new n.default(h.game,0,2,i,s,70,40),h.label.anchor.set(.5),h._texts.addChild(h.label),null!==o&&null!==a&&h.label.events.onInputDown.add(o,a)),h.game.add.existing(h),h}return s(e,t),e.prototype.setText=function(t){this.label&&this.label.setText(t)},e.prototype.setFrames=function(t,e,i,s){this.btn.setFrames(t,e,i,s)},e.prototype.destroy=function(e){this.id=null,this.label=null,this.btn=null,this._graphics=null,this._texts=null,t.prototype.destroy.call(this,e)},Object.defineProperty(e.prototype,"enable",{get:function(){return this._enable},set:function(t){this._enable!==t&&(this._enable=t,this.btn.inputEnabled=this._enable,this._enable?(this.btn.tint=16777215,this.label&&(this.label.tint=16777215)):(this.btn.tint=10066329,this.label&&(this.label.tint=10066329)))},enumerable:!0,configurable:!0}),e}(Phaser.Group);e.default=o},function(t,e,i){"use strict";e.__esModule=!0;var s=i(3),n=i(0),o=function(){function t(t,e,i){var n=this;this.musicOn=!0,this.sfxOn=!0,this.carSaves={},this.game=t,this.callback=e,this.callbackContext=i,this.game.storage.getItem(s.Constants.STORAGE_KEY).then(function(t){null===t||void 0===t?(n.initFirstSave(),n.callback&&n.callbackContext&&n.callback.call(n.callbackContext)):n.restore()})}return t.prototype.initFirstSave=function(){this.sfxOn=!0,this.musicOn=!0,n.Inventory.instance.init(),this.save()},t.getInstance=function(e,i,s){return t.instance?s&&i.call(s):t.instance=new t(e,i,s),t.instance},Object.defineProperty(t.prototype,"music",{get:function(){return this.musicOn},set:function(t){this.musicOn=t,this.save()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sfx",{get:function(){return this.sfxOn},set:function(t){this.sfxOn=t,this.save()},enumerable:!0,configurable:!0}),t.prototype.save=function(){var t=JSON.stringify({m:this.musicOn,sf:this.sfxOn,invsav:n.Inventory.instance.save}),e=this.hash(t);this.game.storage.setItem(s.Constants.STORAGE_KEY,t),this.game.storage.setItem(s.Constants.STORAGE_KEY+"h",e)},t.prototype.restore=function(){var t=this,e=this.game.storage.getItem(s.Constants.STORAGE_KEY),i=this.game.storage.getItem(s.Constants.STORAGE_KEY+"h"),o,a;Promise.all([e,i]).then(function(e){if(o=e[0]||"",a=e[1]||"0",""===o)return t.initFirstSave(),void(t.callback&&t.callbackContext&&t.callback.call(t.callbackContext));if(a!==t.hash(o))return t.initFirstSave(),void(t.callback&&t.callbackContext&&t.callback.call(t.callbackContext));if(o&&""!==o)try{var i=JSON.parse(o);t.musicOn=i.m,t.sfxOn=i.sf,n.Inventory.instance.save=i.invsav}catch(e){t.initFirstSave()}else t.initFirstSave();t.callback&&t.callbackContext&&t.callback.call(t.callbackContext)})},t.prototype.hash=function(t){var e=0,i,s,n;if(0===t.length)return e.toString();for(i=0,n=t.length;i=y-2){g=l.angle+.5*Math.PI;break}}g=m.angle,a[3].x=p[f+1].x-.5*s*Math.cos(g),a[3].y=p[f+1].y-.5*s*Math.sin(g),a[2].x=p[f+1].x+.5*s*Math.cos(g),a[2].y=p[f+1].y+.5*s*Math.sin(g),m.dispose()}var v=new o(a),b=void 0;if(v.isConvex())b=new d(a,e,i),b.body=n;else{var x=a[3];a[3]=a[2],a[2]=x,b=new d(a,e,i),b.body=n}}return l.dispose(),u.dispose(),a[0].dispose(),a[1].dispose(),a[2].dispose(),a[3].dispose(),a=null,n.align(),n},t.geomPolyList=new a,t.bodyList=new l,t}();e.NapeUtil=p},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(3),o=i(22),a=function(t){function e(i,s,a,r){var h=t.call(this,i)||this;h.alpha=0,h.beginFill(s,1),h.drawRect(0,0,h.game.width,h.game.height),h.endFill(),o.default.Name!==a&&(e.prevState=a);var l=h.game.add.text(h.game.width/2,h.game.height/2,"LOADING...",n.Constants.styleCredits0);l.anchor.set(.5),h.addChild(l),i.add.existing(h);var c=h.game.add.tween(h);return c.to({alpha:1},100),c.onComplete.add(function(){i.state.start(a,!0,!1,r)}),c.start(),h}return s(e,t),e.prevState="menu",e}(Phaser.Graphics);e.default=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(13),i(10);var n=function(t){function e(e,i,s,n,o,a,r){var h=t.call(this,e,i,s,n,o)||this;return h.maxWidth=a,h.maxHeight=r,h.game.add.existing(h),h}return s(e,t),e.prototype.setText=function(e){return t.prototype.setText.call(this,e),(this.maxWidth||this.maxHeight)&&this.makeFontFit(),this},e.prototype.setMaxSize=function(t,e){this.maxWidth=t,this.maxHeight=e},e.prototype.makeFontFit=function(){for(var t=10,e;this.width>this.maxWidth||this.height>this.maxHeight;){if((e=parseInt(this.fontSize.toString().replace("px",""),10)-1)<10){e=10,this.fontSize=e;break}this.fontSize=e}},e}(Phaser.Text);e.default=n},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){this.brandInstances={},this.motoLinks={},this.brandDomains=[],this.brandInstances[t.Kizi]="http://kizi.com",this.brandInstances[t.YEP10]="http://yep10.com/?utm_source=x3m4_html5",this.brandInstances[t.Google]="https://play.google.com/store/apps/details?id=air.com.aceviral.motox3m&referrer=utm_source%3Dx3m4_html5",this.brandInstances[t.Apple]="https://itunes.apple.com/us/app/moto-x3m-free/id1085088518/?referrer=utm_source%3Dx3m4_html5",this.motoLinks[1]="http://yep10.com/moto-x3m-bike-race-game-2/",this.motoLinks[4]="http://yep10.com/moto-x3m-4-winter-bike-race-game/",this.motoLinks[5]="http://yep10.com/moto-x3m-5-pool-party/"}return t.getInstance=function(){return null===t.instance&&(t.instance=new t),t.instance},t.prototype.getMotoLink=function(t){return this.motoLinks[t]},t.prototype.getUrlLock=function(){return null!==t.Current?this.brandInstances[t.Current]:""},t.prototype.getUrl=function(t){return this.brandInstances[t]},t.instance=null,t.Kizi="kizi",t.YEP10="yep10",t.Current=t.YEP10,t.Google="google",t.Apple="itunes",t}();e.default=s},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.VERSION="6.0.6g",t.GAME_SCALE=1,t.CALCULATED_WIDTH=0,t.CALCULATED_HEIGHT=0,t.WIDTH=720,t.HEIGHT=480,t.LANDSCAPE_LOCKED=!0,t.PORTRAIT_LOCKED=!1,t.GAME_DISTRIBUTION_LOCAL_ID="",t.STORAGE_KEY="mx3m_6_gd",t.styleMoney={font:"25px Impact",fill:"#DDD9D7"},t.styleBestTime={font:"14px Impact",fill:"#FFFFFF"},t.styleTime={font:"15px Impact",fill:"#DDD9D7"},t.styleTimer={font:"20px Impact",fill:"#DDD9D7"},t.styleHelp={font:"20px Impact",fill:"#FFFFFF"},t.stylePlay={font:"80px CfCrackBold",fill:"#FF8F00"},t.styleTrick={font:"30px CfCrackBold",fill:"#FF8F00"},t.stylePlace={font:"24px CfCrackBold",fill:"#97F337"},t.styleMSGUI={font:"10px Impact",fill:"#FFFFFF"},t.styleGarage={font:"80px CfCrackBold",fill:"#FF8F00"},t.styleGarage2={font:"33px CfCrackBold",fill:"#FFFFFF"},t.styleGarage3={font:"50px CfCrackBold",fill:"#FFFFFF"},t.stylePopBtn={font:"30px CfCrackBold",fill:"#2C374E"},t.stylePopBtn2={font:"25px CfCrackBold",fill:"#2C374E"},t.styleChooseLevel={font:"36px CfCrackBold",fill:"#FFFFFF"},t.stylePause={font:"40px CfCrackBold",fill:"#FFFFFF"},t.styleFinish={font:"30px CfCrackBold",fill:"#FF8F00"},t.styleFinish1={font:"20px CfCrackBold",fill:"#FFFFFF"},t.styleCredits0={font:"30px CfCrackBold",fill:"#FFFFFF"},t.styleCreditsOK={font:"50px CfCrackBold",fill:"#FF8F00"},t.styleCredits1={font:"18px Impact",fill:"#FFFFFF"},t.styleCredits2={font:"14px Impact",fill:"#FFFFFF"},t.styleVersion={font:15*t.GAME_SCALE+"px Impact",fill:"#FFFFFF"},t}();e.default=s},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.Garage="garage",t.Cars="cars_game",t.Theme0="theme0",t.preloadList=[t.Cars],t.list=[t.Garage,t.Theme0,t.Cars],t}();e.default=s},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(14),o=i(21),a=i(20),r=i(23),h=i(26),l=i(9),c=i(24),u=i(15),d=i(40),p=i(17),f=i(35),y=i(43),g=i(0),m=i(2),v=i(18),b=function(t){function e(){var i=t.call(this)||this;return i.name=e.Name,i.changeBike=null,i.priceTxt=null,i.btnLeft=null,i.btnRight=null,i.bike=null,i.parts2=null,i}return s(e,t),e.prototype.init=function(){this.game.world.removeAll(),this.parts2=[],g.GraphicUtil.game=this.game,l.default.getInstance().playMusic(c.default.MenuMusic)},e.prototype.create=function(){t.prototype.create.call(this);var i=this.game.add.sprite(360,240,o.default.Garage,"0popup_bg0000");i.anchor.set(.5);var s=null;this.background=this.game.add.sprite(0,0,o.default.Garage,"bg0000"),s=this.game.add.sprite(0,0,o.default.Garage,"0bg_garage0000"),s.alpha=0,this.background.addChild(s),this.background.addChild(i);var r=new n.default(this.game,"BIKE SHOP",a.default.styleGarage,null,null,o.default.Garage);r.setFrames("bg0000","bg0000","bg0000","bg0000"),r.position.set(a.default.WIDTH/2,40),this.background.addChild(r);var l=new n.default(this.game,g.Inventory.instance.getTotalStars()+"",a.default.styleMoney,null,null,o.default.Garage);l.setFrames("w_star0000","w_star0000","w_star0000","w_star0000"),l.position.set(a.default.WIDTH-30,30),l.label.x=-30,this.game.width-a.default.WIDTH>0&&(l.x+=(this.game.width-a.default.WIDTH)/2),this.background.addChild(l),r.label.stroke="#000000",r.label.strokeThickness=4;var c=new v.default(this.game,0,2,"BIKE SHOP",a.default.stylePlay);c.anchor.set(.5),r.label.parent.addChildAt(c,0),c.stroke="#FFFFFF",c.strokeThickness=7,this.playBtn=new n.default(this.game,"",a.default.stylePopBtn2,p.default.prevState===h.default.Name?this.onMenu:this.onPlayDown,this,o.default.Garage),this.playBtn.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000");var u=this.game.add.sprite(0,-7,o.default.Garage,"next_btn0000");u.anchor.set(.5),u.scale.set(-1,1),this.playBtn.label.parent.addChild(u),this.playBtn.x=10+this.playBtn.width/2,this.playBtn.y=a.default.HEIGHT-10-this.playBtn.height/2,this.btnLeft=new n.default(this.game,"",a.default.styleGarage,this.onPrev,this,o.default.Garage),this.btnLeft.setFrames("arrow_btn0000","arrow_btn0000","arrow_btn0001","arrow_btn0000"),this.btnRight=new n.default(this.game,"",a.default.styleGarage,this.onNext,this,o.default.Garage),this.btnRight.setFrames("arrow_btn0000","arrow_btn0000","arrow_btn0001","arrow_btn0000"),this.btnRight.rotation=Phaser.Math.degToRad(180),this.btnLeft.x=10+this.playBtn.width/2,this.btnRight.x=a.default.WIDTH-10-this.playBtn.width/2,this.btnLeft.y=a.default.HEIGHT/2,this.btnRight.y=a.default.HEIGHT/2,this.game.width-a.default.WIDTH>0&&(this.playBtn.x-=(this.game.width-a.default.WIDTH)/2,this.btnLeft.x-=(this.game.width-a.default.WIDTH)/2,this.btnRight.x+=(this.game.width-a.default.WIDTH)/2),e.currCar=e.carList.indexOf(g.Inventory.instance.skin),f.GameData.carId=e.carList[e.currCar],g.Inventory.instance.skin=e.carList[e.currCar],this.setNewViewCar(),this.background.addChild(this.playBtn),this.background.addChild(this.btnLeft),this.background.addChild(this.btnRight),new d.default(this.game,0,null),this.resize()},e.prototype.getPrice=function(){var t=e.priceList[e.currCar]+"";return"0"===t&&(t="FREE"),t},e.prototype.onPlayerChange=function(){2===e.currCar?this.btnRight.enable=!1:this.btnRight.enable=!0,0===e.currCar?this.btnLeft.enable=!1:this.btnLeft.enable=!0},e.prototype.saveCarId=function(){if(g.Inventory.instance.getTotalStars()>=e.priceList[e.currCar])f.GameData.carId=e.carList[e.currCar],g.Inventory.instance.skin=e.carList[e.currCar],this.setNewViewCar(),u.default.getInstance().save();else{var t=this.game.add.tween(this.priceTxt);t.to({y:this.priceTxt.y-15},150,Phaser.Easing.Bounce.InOut,!1,0,3,!0),t.start()}},e.prototype.onPlayDown=function(){new p.default(this.game,0,r.default.Name)},e.prototype.onMenu=function(){new p.default(this.game,0,h.default.Name)},e.prototype.onNext=function(){e.currCar<2&&e.currCar++,this.setNewViewCar()},e.prototype.parseStaticGraphic=function(t,i){var s=null;s=this.game.add.image(t[i].x,t[i].y,o.default.Cars,t[i].g+"0000"),s.angle=t[i].r;var n=e.carList[e.currCar];-1!==i.indexOf("base")?s.anchor.set(m.AssetsList.FRAMES_ANCHORX[n-1],m.AssetsList.FRAMES_ANCHORY[n-1]):-1!==i.indexOf("suspend")?-1!==i.indexOf("front")?s.anchor.set(.8,-1!==t[i].g.indexOf("1")?.2:.5):s.anchor.set(0,.5):"driver_head"===i?s.anchor.set(m.AssetsList.HEAD_ANCHORX[n-1],m.AssetsList.HEAD_ANCHORY[n-1]):"driver_hip"===i?s.anchor.set(m.AssetsList.HIP_ANCHORX[n-1],m.AssetsList.HIP_ANCHORY[n-1]):"driver_shin"===i?s.anchor.set(m.AssetsList.SHIN_ANCHORX[n-1],m.AssetsList.SHIN_ANCHORY[n-1]):s.anchor.set(.5),this.bike.addChild(s)},e.prototype.setNewViewCar=function(){var t=e.carList[e.currCar];null!==this.bike?(this.bike.destroy(),this.bike=this.game.add.group()):this.bike=this.game.add.group();var i=y.CarsData.geomObj["bike"+t],s,r=5===t;s="Wheel0",this.parseStaticGraphic(i,s),s="Wheel1",this.parseStaticGraphic(i,s),s="suspend_back",this.parseStaticGraphic(i,s),r&&(s="suspend_front",this.parseStaticGraphic(i,s)),s="base",this.parseStaticGraphic(i,s),s="driver_shin",this.parseStaticGraphic(i,s),s="driver_hip",this.parseStaticGraphic(i,s),s="driver_corpse",this.parseStaticGraphic(i,s),s="driver_arm",this.parseStaticGraphic(i,s),s="driver_forearm",this.parseStaticGraphic(i,s),s="driver_head",this.parseStaticGraphic(i,s),r||(s="suspend_front",this.parseStaticGraphic(i,s)),this.bike.x=a.default.WIDTH/2,this.bike.y=a.default.HEIGHT/2,this.background.addChild(this.bike),this.changeBike&&this.changeBike.destroy();var h="EQUIPPED";e.carList[e.currCar]!==g.Inventory.instance.skin&&(h="EQUIP IT"),this.changeBike=new n.default(this.game,h,a.default.styleGarage2,this.saveCarId,this,o.default.Garage),this.changeBike.x=a.default.WIDTH/2,this.changeBike.y=a.default.HEIGHT-50,this.changeBike.setFrames("orange_btn_big0000","orange_btn_big0000","orange_btn_big0000","orange_btn_big0000"),this.changeBike.label.setMaxSize(200,40),this.changeBike.label.y=-6,this.changeBike.label.setShadow(1,1,"rgba(0,0,0,0.8)",5),this.priceTxt&&this.priceTxt.destroy(),this.priceTxt=new n.default(this.game,"PRICE:",a.default.styleMoney,null,null,o.default.Garage),this.priceTxt.setFrames("bg0000","bg0000","bg0000","bg0000"),this.priceTxt.label.y=-15;var l=new v.default(this.game,0,15,this.getPrice(),a.default.styleMoney);if("FREE"===this.getPrice())l.anchor.set(.5);else{l.anchor.set(1.05,.5);var c=this.game.add.sprite(0,15,o.default.Garage,"w_star0000");c.anchor.set(.15,.5),this.priceTxt.label.parent.addChild(c)}this.priceTxt.label.parent.addChild(l),this.priceTxt.x=a.default.WIDTH-110,this.game.width-a.default.WIDTH>0&&(this.priceTxt.x+=(this.game.width-a.default.WIDTH)/2),this.priceTxt.y=a.default.HEIGHT-70,this.background.addChild(this.priceTxt),this.background.addChild(this.changeBike),this.onPlayerChange()},e.prototype.update=function(){t.prototype.update.call(this)},e.prototype.onPrev=function(){0!==e.currCar&&e.currCar--,this.setNewViewCar()},e.prototype.shutdown=function(){this.background=null,this.changeBike=null,this.playBtn=null,this.btnLeft=null,this.btnRight=null,this.parts2=null,t.prototype.shutdown.call(this)},e.prototype.resize=function(){t.prototype.resize.call(this);var e=1;e=this.game.width/a.default.WIDTH,e=e>1?1:e,this.background.scale.set(e),this.background.x=(this.game.width-720)/2},e.prevNameState="garage",e.Name="garage",e.pause=!1,e.currCar=0,e.carList=[1,3,5],e.priceList=[0,12,35],e}(Phaser.State);e.default=b},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(21),o=i(20),a=i(24),r=i(9),h=i(25),l=i(22),c=i(127),u=i(17),d=i(40),p=i(29),f=i(35),y=i(0),g=i(14),m=i(15),v=i(26),b=i(19),x=function(t){function e(){var i=t.call(this)||this;return i.name=e.Name,i}return s(e,t),e.prototype.init=function(){this.game.world.removeAll(),r.default.getInstance().playMusic(a.default.MenuMusic)},e.prototype.create=function(){t.prototype.create.call(this),y.Inventory.instance.signalUnlock.removeAll(),y.Inventory.instance.signalUnlock.addOnce(function(){new u.default(this.game,0,e.Name)},this),this.scaleGroup=this.game.add.group();var i=this.game.add.sprite(0,0,n.default.Garage,"0bg_garage0000"),s=this.game.add.sprite(-30,0,n.default.Garage,"0bg_garage_l0000"),a=this.game.add.sprite(i.width-10,0,n.default.Garage,"0bg_garage_r0000"),r=(this.game.width-720)/2;s.x=-1*r-10,s.width=r+20,a.width=r+20,this.scaleGroup.addChild(s),this.scaleGroup.addChild(a),this.scaleGroup.addChild(i);var h=this.game.add.sprite(0,0,n.default.Garage,"top_bg0000");h.x=this.game.width-h.width,h=this.game.add.sprite(this.game.width,0,n.default.Garage,"top_bg0000"),h.x=h.width,h.scale.set(-1,1);var l=new g.default(this.game,"",null,this.onBackDown,this,n.default.Garage);l.setFrames("shop_btn0000","shop_btn0000","shop_btn0000","shop_btn0000"),l.x=45,l.y=30,this.world.addChild(l),this.musicBtn=this.game.add.image(120,25,n.default.Garage,"InGameMusicButton0000"),this.musicBtn.inputEnabled=!0,this.musicBtn.events.onInputUp.add(this.toggleMusic,this),this.musicBtn.anchor.set(.5),this.musicBtn.x=this.game.width-35;var c=new g.default(this.game,y.Inventory.instance.getTotalStars()+"",o.default.styleMoney,null,null,n.default.Garage);c.setFrames("w_star0000","w_star0000","w_star0000","w_star0000"),c.position.set(110,30),c.label.x=20,c.label.anchor.set(0,.5),this.world.addChild(c),this.updateSoundButtons(),this.createButtons();var p=new g.default(this.game,"",o.default.stylePopBtn2,this.onMenu,this,n.default.Garage);p.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000");var f=this.game.add.sprite(0,-7,n.default.Garage,"next_btn0000");f.anchor.set(.5),f.scale.set(-1,1),p.scale.set(.7),p.label.parent.addChild(f),p.x=10+p.width/2,p.y=o.default.HEIGHT-5-p.height/2,this.game.width-o.default.WIDTH>0&&(p.x-=(this.game.width-o.default.WIDTH)/2),this.scaleGroup.addChild(p),p=new g.default(this.game,"",o.default.stylePopBtn2,this.onPlayNext,this,n.default.Garage),p.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000"),f=this.game.add.sprite(0,-7,n.default.Garage,"next_btn0000"),f.anchor.set(.5),p.scale.set(.7),p.label.parent.addChild(f),p.x=o.default.WIDTH-10-p.width/2,p.y=o.default.HEIGHT-5-p.height/2,this.game.width-o.default.WIDTH>0&&(p.x+=(this.game.width-o.default.WIDTH)/2),this.scaleGroup.addChild(p);var m;m=new g.default(this.game,"",null,this.onMoto1,this,n.default.Garage),m.setFrames("moto10000","moto10000","moto10000","moto10000"),m.btn.anchor.set(.5),m.x=.5*o.default.WIDTH-140,m.y=o.default.HEIGHT-5-p.height/2,m.scale.set(.75),this.scaleGroup.addChild(m),m=new g.default(this.game,"",null,this.onMoto4,this,n.default.Garage),m.setFrames("moto40000","moto40000","moto40000","moto40000"),m.btn.anchor.set(.5),m.x=.5*o.default.WIDTH,m.y=o.default.HEIGHT-5-p.height/2,m.scale.set(.75),this.scaleGroup.addChild(m),this.scaleGroup.addChild(m),m=new g.default(this.game,"",null,this.onMoto5,this,n.default.Garage),m.setFrames("moto50000","moto50000","moto50000","moto50000"),m.btn.anchor.set(.5),m.x=.5*o.default.WIDTH+140,m.y=o.default.HEIGHT-5-p.height/2,m.scale.set(.75),this.scaleGroup.addChild(m),new d.default(this.game,0,null),this.resize()},e.prototype.onMoto1=function(){window.open(b.default.getInstance().getMotoLink(1),"_blank")},e.prototype.onMoto4=function(){window.open(b.default.getInstance().getMotoLink(4),"_blank")},e.prototype.onMoto5=function(){window.open(b.default.getInstance().getMotoLink(5),"_blank")},e.prototype.onMenu=function(){new u.default(this.game,0,v.default.Name)},e.prototype.createButtons=function(){for(var t=0;t<22;t++){var e=y.CarsData.geomObj["point"+t].x,i=y.CarsData.geomObj["point"+t].y;this.createButton(t,e,i,0)}},e.prototype.createButton=function(t,e,i,s){void 0===t&&(t=0);var o=t,a=new c.default(this.game,o+""),r="LeveMapItemLocked",h=r+"0000";a.btn.setFrames(h,h,h,h),a.x=e,a.y=i,a.label.visible=!1,o+1<10?a.label.setText("0"+(o+1)):a.label.setText(o+1+"");var l=1;void 0!==y.Inventory.instance.save[y.Inventory.RACE_PREFIX+(o+1).toString()+y.Inventory.RACE_RESULT]&&(l=Number(y.Inventory.instance.save[y.Inventory.RACE_PREFIX+(o+1).toString()+y.Inventory.RACE_RESULT])+2,a.label.visible=!0);var u=this.game.add.sprite(0,0,n.default.Garage,r+"000"+l);u.anchor.set(.5),this.scaleGroup.addChild(a),a.btn.parent.addChild(u),a.label.visible?(a.signalSelect.addOnce(this.onPlayDown,this),this.lastEnabled=a):a.enable=!1},e.prototype.onPlayNext=function(){this.onPlayDown(this.lastEnabled)},e.prototype.onPlayDown=function(t){r.default.getInstance().play(a.default.Click);var i=p.default.list.indexOf(p.default.Level001),s=Number(t.getID());e.LevelNum=s,e.CurrentLevel=p.default.list[i+s],f.GameData.raceId=s+1,f.GameData.currentLevel=this.game.cache.getJSON(e.CurrentLevel),y.GraphicUtil.currentAtlass=n.default.Theme0,new u.default(this.game,0,h.default.Name)},e.prototype.onBackDown=function(){r.default.getInstance().play(a.default.Click),this.game.state.start(l.default.Name)},e.prototype.toggleMusic=function(){m.default.getInstance().music?r.default.getInstance().toggleMusic():m.default.getInstance().sfx?r.default.getInstance().toggleSfx():(r.default.getInstance().toggleSfx(),r.default.getInstance().toggleMusic()),this.updateSoundButtons(),r.default.getInstance().play(a.default.Click)},e.prototype.updateSoundButtons=function(){var t=m.default.getInstance().music?0:1;t+=m.default.getInstance().sfx?0:1,this.musicBtn.loadTexture(n.default.Garage,"InGameMusicButton000"+t)},e.prototype.shutdown=function(){this.scaleGroup=null,this.musicBtn=null,this.lastEnabled=null,this.scaleGroup=null,t.prototype.shutdown.call(this)},e.prototype.resize=function(){var t=1;t=this.game.width/o.default.WIDTH,t=t>1?1:t,this.scaleGroup.scale.set(t),this.scaleGroup.alignIn(this.world.bounds,Phaser.BOTTOM_CENTER)},e.Name="choose_zone",e.pause=!1,e.CurrentLevel="",e.LevelNum=0,e}(Phaser.State);e.default=x},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.FlySound=function(){return Math.random()>.6?t.Fly1:Math.random()>.3?t.Fly2:t.Fly3},t.FlipSound=function(){return"flip_0"+(Math.round(5*Math.random())+1)},t.DieSound=function(){return"dead_0"+(Math.round(5*Math.random())+1)},t.startSound=function(){return"accel0"+(Math.round(3*Math.random())+1)},t.MenuMusic="menu_track_1",t.GameMusic="game_track",t.Click="button",t.Landing="landing",t.DriverSpikes="driver_spikes",t.SavePoint="safepoint",t.Stones="stones",t.Explode1="explode1",t.Explode2="explode2",t.Barrel1="barrel_hit0",t.Barrel2="barrel_hit1",t.Engine1="motor",t.EngineFon="eng_loop",t.Fly1="fly_01",t.Fly2="fly_02",t.Fly3="fly_03",t.Flip1="flip_01",t.Flip2="flip_02",t.Flip3="flip_03",t.Flip4="flip_04",t.Flip5="flip_05",t.Flip6="flip_06",t.Dead1="dead_01",t.Dead2="dead_02",t.Dead3="dead_03",t.Dead4="dead_04",t.Dead5="dead_05",t.Dead6="dead_06",t.Start="engine_start",t.Finish="engine_finish",t.Start1="accel01",t.Start2="accel02",t.Start3="accel03",t.Start4="accel04",t.Wood="wood_hit0",t.Wendy="wendy",t.Boost="boost",t.GlassCrash="glass_crash",t.preloadList=[],t.list=[t.MenuMusic,t.GameMusic,t.Engine1,t.EngineFon,t.Explode1,t.Explode2,t.Barrel1,t.Barrel2,t.Wood,t.Wendy,t.Stones,t.SavePoint,t.DriverSpikes,t.Landing,t.Fly1,t.Fly2,t.Fly3,t.Flip1,t.Flip2,t.Flip3,t.Flip4,t.Flip5,t.Flip6,t.Dead1,t.Dead2,t.Dead3,t.Dead4,t.Dead5,t.Dead6,t.Finish,t.Start,t.Start1,t.Start2,t.Start3,t.Start4,t.Click,t.Boost,t.GlassCrash],t}();e.default=s},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(13),i(10);var n=i(3),o=i(23),a=i(21),r=i(14),h=i(15),l=i(9),c=i(17),u=i(4),d=i(0),p=i(28),f=i(18),y=i(37),g=i(22),m=i(2),v=i(19),b=i(12),x=function(t){function e(){var i=t.call(this)||this;return i.name=e.Name,i.popup=null,i.black=null,i.transition=null,i.bike=null,i.popupDelay=Phaser.Timer.SECOND,i._armatureDisplay=null,i}return s(e,t),e.prototype.onPlayNextLevel=function(){if(l.default.getInstance().play(n.Sounds.Click),"undefined"!=typeof gdsdk&&"undefined"!==gdsdk.showBanner)var t=gdsdk.showBanner();if(o.default.LevelNum+1>=22)this.onChooseZone();else{o.default.LevelNum++;var i=o.default.LevelNum;d.GameData.raceId=i+1,o.default.CurrentLevel="map"+d.GameData.raceId.toString(),d.GameData.currentLevel=this.game.cache.getJSON(o.default.CurrentLevel),d.GraphicUtil.currentAtlass=a.default.Theme0,new c.default(this.game,0,e.Name)}},e.prototype.init=function(){var i=this;t.prototype.init.call(this),this.game.world.removeAll(),e.loadedLevel=!1,dragonBones.PhaserFactory.init(this.game);var s=this.game.cache.getJSON(n.JSONData.DBBike),o=this.game.cache.getJSON(n.JSONData.DBBike_Texture),a=this.game.cache.getImage(p.default.DBBike,!0).base;dragonBones.PhaserFactory.factory.parseDragonBonesData(s),dragonBones.PhaserFactory.factory.parseTextureAtlasData(o,a),this.initData(),this.game.time.advancedTiming=!0,d.GraphicUtil.game=this.game,u.MaxGameCore.instance.init(this.game),d.CarsData.geom[1]=this.game.cache.getJSON(n.JSONData.Bike),u.MaxGameCore.instance.signalFinish.add(this.onCallPopup,this),u.MaxGameCore.instance.start(),y.default.instance.init(this.game.add.group(),this.game),this.black=this.game.add.graphics(0,0),this.black.beginFill(0,1),this.black.drawRect(0,0,this.game.width,this.game.height),this.black.endFill();var r=this.game.add.text(this.game.width/2,this.game.height/2,"LOADING...",n.Constants.styleCredits0);r.anchor.set(.5),this.black.addChild(r),this.transition=this.game.add.tween(this.black),this.transition.to({alpha:0},100,Phaser.Easing.Linear.None,!1,500),this.transition.onComplete.add(function(){if(e.loadedLevel=!0,i.hardRestart(),i.black.destroy(),i.black=null,i.transition=null,b.default.isDesktop){i.game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR).onUp.add(i.onSpace,i);i.game.input.keyboard.addKey(Phaser.Keyboard.P).onUp.add(i.onPause,i);i.game.input.keyboard.addKey(Phaser.Keyboard.R).onUp.add(i.onR,i)}else i.game.input.onDown.add(i.onSpaceMobile,i);y.default.instance.signalRestart.add(i.hardRestart,i),y.default.instance.signalPause.add(i.onPause,i),y.default.instance.signalToggleMusic.add(i.onToggleMusic,i),u.MaxGameCore.instance.paused=!1,u.MaxGameCore.instance.enginePitch=l.default.getInstance().play(n.Sounds.Engine1,.1,!0)}),u.MaxGameCore.instance.signalLoaded.removeAll(),u.MaxGameCore.instance.signalLoaded.addOnce(function(){this.transition.start(),u.MaxGameCore.instance.paused=!0},this),l.default.getInstance().playMusic(n.Sounds.GameMusic),d.CarExplodeObject.setupPool()},e.prototype.create=function(){t.prototype.create.call(this),this.resize()},e.prototype.setNewViewCar=function(){e.currCar++;var t=o.default.LevelNum;e.currCar>=2&&t<10&&(e.currCar=0),e.currCar>=5&&(e.currCar=0),null!==this._armatureDisplay&&this._armatureDisplay.destroy();var i;if(e.currCar<2){var s="biker"+e.currCar+"_anim_btn";this._armatureDisplay=dragonBones.PhaserFactory.factory.buildArmatureDisplay(s),this._armatureDisplay.x=0,this._armatureDisplay.y=150,this._armatureDisplay.animation.play("animation",0),this.popup.addChild(this._armatureDisplay)}else 2===e.currCar?(i=new r.default(this.game,"",null,this.onMoto1,this,a.default.Garage),i.setFrames("moto10000","moto10000","moto10000","moto10000"),i.btn.anchor.set(.5),i.y=114,this.popup.getChildAt(1).addChild(i)):3===e.currCar?(i=new r.default(this.game,"",null,this.onMoto4,this,a.default.Garage),i.setFrames("moto40000","moto40000","moto40000","moto40000"),i.btn.anchor.set(.5),i.y=114,this.popup.getChildAt(1).addChild(i)):4===e.currCar&&(i=new r.default(this.game,"",null,this.onMoto5,this,a.default.Garage),i.setFrames("moto50000","moto50000","moto50000","moto50000"),i.btn.anchor.set(.5),i.y=114,this.popup.getChildAt(1).addChild(i))},e.prototype.hardRestart=function(){y.default.instance.hideControlsHint(),y.default.instance.continueShow=!1,y.default.instance.helperShow=!1,1===d.GameData.raceId&&y.default.instance.showControlsHint(),u.MaxGameCore.instance.car.review(),u.MaxGameCore.instance.restart(),u.MaxGameCore.instance.drive=!1,u.MaxGameCore.instance.finished=!1,y.default.instance.showTimer(),u.MaxGameCore.instance.timer=0,u.MaxGameCore.instance.car.callbackDie=y.default.instance.showDeathHint,u.MaxGameCore.instance.car.callbackStunt=y.default.instance.showFlipMsg,u.MaxGameCore.instance.car.callbackContext=y.default.instance,this.closePopup()},e.prototype.onSpaceMobile=function(){u.MaxGameCore.instance.finished||u.MaxGameCore.instance.car.dead&&(u.MaxGameCore.instance.paused||(y.default.instance.hideControlsHint(),u.MaxGameCore.instance.car.safeId>=0?(u.MaxGameCore.instance.car.review(),u.MaxGameCore.instance.restartFromSafePoint(u.MaxGameCore.instance.car.safeId)):this.hardRestart()))},e.prototype.onSpace=function(){e.isAdsPause||u.MaxGameCore.instance.paused||u.MaxGameCore.instance.finished||u.MaxGameCore.instance.car.dead&&(u.MaxGameCore.instance.paused||(y.default.instance.hideControlsHint(),u.MaxGameCore.instance.car.safeId>=0?(u.MaxGameCore.instance.car.review(),u.MaxGameCore.instance.restartFromSafePoint(u.MaxGameCore.instance.car.safeId)):this.hardRestart()))},e.prototype.onR=function(){this.hardRestart()},e.prototype.onPause=function(){u.MaxGameCore.instance.finished||this.onCallPopup(0)},e.prototype.onToggleMusic=function(){this.toggleMusic()},e.prototype.toggleMusic=function(){h.default.getInstance().music?l.default.getInstance().toggleMusic():h.default.getInstance().sfx?l.default.getInstance().toggleSfx():(l.default.getInstance().toggleSfx(),l.default.getInstance().toggleMusic()),y.default.instance.updateSoundButtons(),l.default.getInstance().play(n.Sounds.Click)},e.prototype.setFields=function(t){var e=d.RacesData.data,i=new r.default(this.game,"",n.Constants.styleTime,null,this,a.default.Garage);i.setFrames("bg0000","bg0000","bg0000","bg0000"),t.addChild(i),i.y=20,i.label.setMaxSize(200,50),i.label.stroke="#000000",i.label.strokeThickness=2;var s=this.game.add.sprite(-133,-76,a.default.Garage,"star00000"),o=this.game.add.sprite(0,-88,a.default.Garage,"star00000"),h=this.game.add.sprite(133,-76,a.default.Garage,"star00000");s.anchor.set(.5),o.anchor.set(.5),h.anchor.set(.5),s.scale.set(.9),h.scale.set(.9),s.angle=-10,h.angle=10;var c=this.game.add.sprite(-133,-76,a.default.Garage,"star10000");c.anchor.set(.5);var u=this.game.add.sprite(0,-88,a.default.Garage,"star10000");u.anchor.set(.5);var p=this.game.add.sprite(133,-76,a.default.Garage,"star10000");p.anchor.set(.5),c.angle=-10,p.angle=10;var f=new r.default(this.game,"0",n.Constants.styleTime,null,null);f.x=-133,f.y=-6;var y=new r.default(this.game,"0",n.Constants.styleTime,null,null);y.y=-16;var g=new r.default(this.game,"0",n.Constants.styleTime,null,null);g.x=133,g.y=-6,t.addChild(s),t.addChild(o),t.addChild(h),t.addChild(c),t.addChild(u),t.addChild(p),t.addChild(f),t.addChild(y),t.addChild(g);var m=d.RacesData.map.settings.prizes,v=m.split(",");f.setText(v[2]+" sec."),y.setText(v[1]+" sec."),g.setText(v[0]+" sec.");var b=e.stars;c.visible=b>0,u.visible=b>1,p.visible=b>2,c.scale.set(.9),p.scale.set(.9);var x,_=200;b>0&&(c.scale.set(3),c.alpha=0,x=this.game.add.tween(c),x.onComplete.addOnce(function(){l.default.getInstance().play(n.Sounds.Explode2),d.RacesData.data.camera.shakeContainer(this.popup)},this),x.to({alpha:1},400,Phaser.Easing.Linear.None,!0,_-150),x=this.game.add.tween(c.scale),x.to({x:.9,y:.9},400,Phaser.Easing.Back.Out,!0,_),_+=400),b>1&&(u.scale.set(3),u.alpha=0,x=this.game.add.tween(u),x.onComplete.addOnce(function(){l.default.getInstance().play(n.Sounds.Explode1),d.RacesData.data.camera.shakeContainer(this.popup)},this),x.to({alpha:1},400,Phaser.Easing.Linear.None,!0,_-100),x=this.game.add.tween(u.scale),x.to({x:1,y:1},400,Phaser.Easing.Back.Out,!0,_),_+=700),b>2&&(p.scale.set(3),p.alpha=0,x=this.game.add.tween(p),x.onComplete.addOnce(function(){l.default.getInstance().play(n.Sounds.Explode2),d.RacesData.data.camera.shakeContainer(this.popup)},this),x.to({alpha:1},400,Phaser.Easing.Linear.None,!0,_-100),x=this.game.add.tween(p.scale),x.to({x:.9,y:.9},400,Phaser.Easing.Back.Out,!0,_),_+=1e3);var w=Math.ceil(100*e.timer),P=w/100>>0;w-=100*P;var C=this.game.add.sprite(200,90,a.default.Garage,"improved_bg0000");if(C.anchor.set(.5),t.addChild(C),C.visible=e.improved,C.alpha=0,e.improved){var T=new r.default(this.game,"NEW BEST TIME",n.Constants.styleBestTime,null,null);T.angle=25,T.y=-25,C.addChild(T);var S=new r.default(this.game,P.toString()+"."+w.toString()+" sec",n.Constants.styleBestTime,null,null);S.angle=25,S.x=-8,S.y=-5,C.addChild(S),T.label.setShadow(1,1,"rgba(0,0,0,0.8)"),S.label.setShadow(1,1,"rgba(0,0,0,0.8)");var A=C.x,E=C.y;C.x=-500,C.alpha=0;this.game.add.tween(C).to({x:A,y:E,alpha:1},250,Phaser.Easing.Back.InOut,!0)}i.setText("Your time: "+P+"."+w+" sec.")},e.prototype.postRace=function(t){var e=d.RacesData.data;e.timer=u.MaxGameCore.instance.timer;var i=0,s,n=d.RacesData.map.settings.prizes;if(0===n.length);else{s=n.split(",");var o=void 0,a=void 0;for(o=0;op&&(f=p),r+=(3e3+100*(d.RacesData.map.id-1))*f/p}var y=d.Inventory.instance.setScore(d.GameData.raceId,r)}this.setFields(t),h.default.getInstance().save()},e.prototype.onCallPopup=function(t){if(u.MaxGameCore.instance.paused)return void this.closePopup();var i=o.default.LevelNum;if(1===t&&!e.promoShowed&&i===d.RacesData.MAP_COUNT-1)return void this.game.time.events.add(Phaser.Timer.SECOND,this.motoX3MPopup,this);this.createPopup(),1!==t&&(u.MaxGameCore.instance.paused=!0,y.default.instance.flipTexts.alpha=0);var s=null,h="GAME PAUSED",l=null;if(1===t){h=i+1<10?"LEVEL 0"+(i+1)+" COMPLETE":"LEVEL "+(i+1)+" COMPLETE",this.setNewViewCar(),l=new r.default(this.game,h,n.Constants.styleFinish,null,null,a.default.Garage),l.y=-220,l.label.stroke="#000000",l.label.strokeThickness=2;var c=new f.default(this.game,0,2,h,n.Constants.styleFinish);if(c.anchor.set(.5),l.label.parent.addChildAt(c,0),c.stroke="#FFFFFF",c.strokeThickness=5,e.currCar<2){var p=null;p=new r.default(this.game,"CHANGE BIKE",n.Constants.styleFinish1,this.onGarage,this,a.default.Garage),p.y=190,p.setFrames("orange_btn_big0000","orange_btn_big0000","orange_btn_big0000","orange_btn_big0000"),p.label.setMaxSize(200,40),p.label.y=-8,p.label.setText("CHANGE BIKE"),p.label.setShadow(1,1,"rgba(0,0,0,0.8)",5),this.popup.getChildAt(1).addChild(p)}else{var p=null;p=2===e.currCar?new r.default(this.game,"",n.Constants.styleFinish1,this.onMoto1,this,a.default.Garage):new r.default(this.game,"",n.Constants.styleFinish1,this.onMoto4,this,a.default.Garage),p.y=190,p.setFrames("green_btn_big0000","green_btn_big0000","green_btn_big0000","green_btn_big0000"),this.popup.getChildAt(1).addChild(p)}y.default.instance.timer.visible=!1}else{s=this.game.add.sprite(0,3,a.default.Garage,"bg0000"),s.anchor.set(.5),s.scale.set(1,1.4),this.popup.getChildAt(1).addChild(s),l=new r.default(this.game,h,n.Constants.stylePause,null,this,a.default.Garage),l.y=-145,l.label.stroke="#000000",l.label.strokeThickness=2;var g=this.game.add.group();this.popup.getChildAt(1).addChild(g),this.setPauseViewCar(g)}l.setFrames("bg0000","bg0000","bg0000","bg0000"),this.popup.getChildAt(1).addChild(l);var m=new r.default(this.game,"",n.Constants.styleCredits1,this.onChooseZone,this,a.default.Garage);m.x=-270,m.y=200,m.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000"),m.scale.set(.8);var v=this.game.add.sprite(0,-11,a.default.Garage,"exit_btn0000");v.anchor.set(.5),m.label.parent.addChild(v),this.popup.getChildAt(1).addChild(m);var b=new r.default(this.game,"",n.Constants.stylePopBtn2,1===t?this.onPlayNextLevel:this.onResume,this,a.default.Garage);b.x=270,b.y=200,b.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000"),b.scale.set(.8);var x=this.game.add.sprite(0,-7,a.default.Garage,"next_btn0000");if(x.anchor.set(.5),b.label.parent.addChild(x),this.popup.getChildAt(1).addChild(b),1===t){var _=this.game.add.group();this.popup.getChildAt(1).addChild(_),this.postRace(_),this.popupDelay>0&&(this.popup.visible=!1,this.game.time.events.add(this.popupDelay,this.setPopupVisible,this))}this.resizePopup(1)},e.prototype.setPopupVisible=function(){this.popup&&(this.popup.visible=!0)},e.prototype.disposePopup=function(){this.popup&&this.popup.destroy(),this.popup=null,u.MaxGameCore.instance.paused=!1,y.default.instance.showTimer()},e.prototype.backgroundPopup=function(){this.popup=this.game.add.sprite(350,250,a.default.Garage,"bg0000"),this.popup.anchor.set(.5);var t=this.game.add.sprite(0,0,a.default.Garage,"bg0000");t.width=this.game.width,t.height=this.game.height,t.inputEnabled=!0,t.anchor.set(.5),this.popup.addChild(t),this.world.addChild(y.default.instance.container),y.default.instance.hideTimer()},e.prototype.createPopup=function(){null!==this.popup&&this.disposePopup(),this.backgroundPopup();var t=this.game.add.sprite(0,0,a.default.Garage,"0popup_bg0000");t.anchor.set(.5),this.popup.addChild(t)},e.prototype.resizePopup=function(t){if(null!==this.popup){var e=this.popup.removeChildAt(0);e.width=this.game.width,e.height=this.game.height,this.popup.x=this.world.bounds.centerX,this.popup.y=this.world.bounds.centerY,this.popup.addChildAt(e,0)}},e.prototype.closePopup=function(){this.disposePopup()},e.prototype.onResume=function(){this.closePopup()},e.prototype.onChooseZone=function(){h.default.getInstance().save(),this.closePopup(),new c.default(this.game,0,o.default.Name)},e.prototype.onGarage=function(){h.default.getInstance().save(),this.closePopup(),new c.default(this.game,0,g.default.Name)},e.prototype.parseStaticGraphic=function(t,e){var i=null;i=this.game.add.image(t[e].x,t[e].y,a.default.Cars,t[e].g+"0000"),i.angle=t[e].r,-1!==e.indexOf("base")?i.anchor.set(m.AssetsList.FRAMES_ANCHORX[0],m.AssetsList.FRAMES_ANCHORY[0]):-1!==e.indexOf("suspend")?-1!==e.indexOf("front")?i.anchor.set(.8,-1!==t[e].g.indexOf("1")?.2:.5):i.anchor.set(0,.5):i.anchor.set(.5),this.bike.addChild(i)},e.prototype.setPauseViewCar=function(t){null!==this.bike?(this.bike.destroy(),this.bike=this.game.add.group(t)):this.bike=this.game.add.group(t);var e=d.CarsData.geomObj.bike11,i="Wheel0";this.parseStaticGraphic(e,i),i="Wheel1",this.parseStaticGraphic(e,i),i="suspend_back",this.parseStaticGraphic(e,i),i="base",this.parseStaticGraphic(e,i),i="driver_corpse",this.parseStaticGraphic(e,i),i="driver_hip",this.parseStaticGraphic(e,i),i="driver_shin",this.parseStaticGraphic(e,i),i="driver_arm",this.parseStaticGraphic(e,i),i="driver_forearm",this.parseStaticGraphic(e,i),i="driver_head",this.parseStaticGraphic(e,i),i="suspend_front",this.parseStaticGraphic(e,i),this.bike.x=0,this.bike.y=10},e.prototype.update=function(){if(this.isFirstUpdate)return this.isFirstUpdate=!1,this.timeAcc=0,void(this.prevTimeMS=Date.now());if(!e.isAdsPause)for(t.prototype.update.call(this),this.currTimeMS=Date.now(),this.deltaTime=(this.currTimeMS-this.prevTimeMS)/1e3,this.deltaTime>e.MAX_FRAME_TIME&&(this.deltaTime=e.MAX_FRAME_TIME),this.prevTimeMS=this.currTimeMS,this.timeAcc+=this.deltaTime;this.timeAcc>=e.DESIRED_FRAME_TIME;)this.updateGameController(e.DESIRED_FRAME_TIME),this.timeAcc-=e.DESIRED_FRAME_TIME},e.prototype.resize=function(){t.prototype.resize.call(this);var e=1;this.game.width/this.game.height>=n.Constants.WIDTH/n.Constants.HEIGHT?(e=this.game.width/n.Constants.WIDTH,e=e>1?1:e):(e=this.game.height/n.Constants.HEIGHT,e=e>1?1:e),y.default.instance.resize(e),this.resizePopup(e)},e.prototype.shutdown=function(){this.closePopup(),u.MaxGameCore.instance.release(),y.default.instance.release(),t.prototype.shutdown.call(this)},e.prototype.render=function(){null!==this.popup&&dragonBones.PhaserFactory.factory.dragonBones.advanceTime(-1),t.prototype.render.call(this)},e.prototype.initData=function(){this.isFirstUpdate=!0},e.prototype.updateGameController=function(t){u.MaxGameCore.instance.update(t),y.default.instance.setTimer()},e.prototype.motoX3MPopup=function(){null!==this.popup&&this.disposePopup(),e.promoShowed=!0,this.popupDelay=0,this.backgroundPopup();var t=this.game.add.sprite(0,0,a.default.Garage,"0popup_bg0000");t.anchor.set(.5),this.popup.addChild(t);var i=null,s=null;i=this.game.add.sprite(0,3,a.default.Garage,"bg0000"),i.anchor.set(.5),i.scale.set(1,1.4),this.popup.getChildAt(1).addChild(i),s=new r.default(this.game,"You win! Congratulations! \nPlay more MotoX3M games",n.Constants.styleMoney,null,this,a.default.Garage),s.y=-100,s.label.align="center",s.label.stroke="#000000",s.label.strokeThickness=2;var o=this.game.add.group();this.popup.getChildAt(1).addChild(o),s.setFrames("bg0000","bg0000","bg0000","bg0000"),this.popup.getChildAt(1).addChild(s);var h;h=new r.default(this.game,"",null,this.onMoto1,this,a.default.Garage),h.setFrames("moto10000","moto10000","moto10000","moto10000"),h.btn.anchor.set(.5),h.x=-h.width-10,this.popup.getChildAt(1).addChild(h),h=new r.default(this.game,"",null,this.onMoto4,this,a.default.Garage),h.setFrames("moto40000","moto40000","moto40000","moto40000"),h.btn.anchor.set(.5),this.popup.getChildAt(1).addChild(h),h=new r.default(this.game,"",null,this.onMoto5,this,a.default.Garage),h.setFrames("moto50000","moto50000","moto50000","moto50000"),h.btn.anchor.set(.5),h.x=h.width+10,this.popup.getChildAt(1).addChild(h);var l=new r.default(this.game,"OK",n.Constants.styleGarage3,this.closeMotoX3MPopup,this,a.default.Garage);l.label.y-=8,l.label.setShadow(1,1,"rgba(0,0,0,0.8)",5),l.x=0,l.y=100,l.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000"),l.scale.set(.8),this.popup.getChildAt(1).addChild(l),this.resizePopup(1)},e.prototype.closeMotoX3MPopup=function(){this.onCallPopup(1)},e.prototype.onMoto1=function(){window.open(v.default.getInstance().getMotoLink(1),"_blank")},e.prototype.onMoto4=function(){window.open(v.default.getInstance().getMotoLink(4),"_blank")},e.prototype.onMoto5=function(){window.open(v.default.getInstance().getMotoLink(5),"_blank")},e.promoShowed=!1,e.Name="gameplay",e.pause=!1,e.MAX_FRAME_TIME=.1,e.DESIRED_FRAME_TIME=1/30,e.isAdsPause=!1,e.loadedLevel=!1,e.currCar=-1,e}(Phaser.State);e.default=x},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(13),i(10);var n=i(9),o=i(15),a=i(128),r=i(3),h=i(14),l=i(40),c=i(17),u=i(12),d=i(0),p=i(18),f=i(23),y=i(29),g=i(22),m=i(28),v=i(19),b=function(t){function e(){var i=t.call(this)||this;return i.name=e.Name,i.popup=null,i.popup_btn=null,i.google_btn=null,i.apple_btn=null,i._armatureDisplay=null,i}return s(e,t),e.prototype.init=function(){this.game.world.removeAll(),dragonBones.PhaserFactory.init(this.game),u.default.DISPLAY_W=Phaser.Math.max(this.game.width,this.game.height),u.default.DISPLAY_H=Phaser.Math.min(this.game.width,this.game.height)},e.prototype.create=function(){t.prototype.create.call(this),d.Inventory.instance.signalUnlock.removeAll(),d.Inventory.instance.signalUnlock.addOnce(function(){new c.default(this.game,0,f.default.Name)},this),this.background2=this.game.add.sprite(0,0,r.Atlases.Garage,"0bg_garage0000"),this.background=this.game.add.sprite(0,0,r.Atlases.Garage,"0bg_garage0000"),this.background3=this.game.add.sprite(0,0,r.Atlases.Garage,"bg0000"),this.background4=this.game.add.sprite(0,0,r.Atlases.Garage,"bg0000");var e=this.game.cache.getJSON(y.default.DBMenu),i=this.game.cache.getJSON(y.default.DBMenu_Texture),s=this.game.cache.getImage(m.default.DBMenu,!0).base;dragonBones.PhaserFactory.factory.parseDragonBonesData(e),dragonBones.PhaserFactory.factory.parseTextureAtlasData(i,s),this._armatureDisplay=dragonBones.PhaserFactory.factory.buildArmatureDisplay("biker_anim"),this._armatureDisplay.x=0,this._armatureDisplay.y=360,this._armatureDisplay.animation.play("biker menu animation",-1),this.background.addChild(this._armatureDisplay);var n={font:"bold 20px Djvu",fill:"#FFFFFF"};this.bgTop=this.game.add.image(0,0,r.Atlases.Garage,"top_bg0000"),this.bgTop.scale.set(1.5,1),this.playBtn=new h.default(this.game,"Play",r.Constants.stylePlay,this.startGame,this,r.Atlases.Garage),this.playBtn.setFrames("play_btn0000","play_btn0000","play_btn0000","play_btn0000"),this.playBtn.x=500,this.playBtn.y=200,this.playBtn.label.x=130,this.playBtn.label.stroke="#000000",this.playBtn.label.strokeThickness=5;var u=new p.default(this.game,130,2,"Play",r.Constants.stylePlay);u.anchor.set(.5),this.playBtn.label.parent.addChildAt(u,0);var g=this.game.add.image(100,0,r.Atlases.Garage,"black0000");g.alpha=0,g.width=280,g.height=100,g.anchor.set(.5),g.inputEnabled=!0,g.input.useHandCursor=!0,g.events.onInputDown.addOnce(this.startGame,this),this.playBtn.label.parent.addChild(g),u.stroke="#FFFFFF",u.strokeThickness=10,this.background4.addChild(this.playBtn),this.moregames=new h.default(this.game,"Reset",n,this.resetGame,this,r.Atlases.Garage),this.moregames.setFrames("play_btn0000","play_btn0000","play_btn0000","play_btn0000"),this.moregames.x=620,this.moregames.y=400,this.background4.addChild(this.moregames),this.moregames.visible=!1;var v=new a.default(this.game,0,0," ",n,this.onCredits,this,10,10,r.Atlases.Garage);v.setFrames("btn_credits0000","btn_credits0000","btn_credits0001","btn_credits0000"),v.alignIn(this.world.bounds,Phaser.TOP_LEFT,-1,-1),this.world.addChild(v),this.logo=this.game.add.image(200,100,r.Atlases.Garage,"0logo0000"),this.logo.anchor.set(.5),this.garageBtn=new h.default(this.game,"",null,this.onGarage,this,r.Atlases.Garage),this.garageBtn.setFrames("shop_btn0000","shop_btn0000","shop_btn0000","shop_btn0000"),this.garageBtn.x=this.game.width-140,this.garageBtn.y=30,this.world.addChild(this.garageBtn),this.musicBtn=this.game.add.image(this.game.width-40,25,r.Atlases.Garage,"InGameMusicButton0000"),this.musicBtn.inputEnabled=!1,this.musicBtn.events.onInputUp.add(this.toggleMusic,this),this.musicBtn.anchor.set(.5),this.playBtn.visible=!1,this.blackRightBG=this.game.add.sprite(900,r.Constants.HEIGHT/2,r.Atlases.Garage,"0popup_bg0000"),this.blackRightBG.anchor.set(.5),this.blackRightBG.angle=90,this.background3.addChild(this.blackRightBG);var b=this.game.add.sprite(0,-r.Constants.HEIGHT/2,r.Atlases.Garage,"0popup_bg0000");b.anchor.set(.5),this.blackRightBG.addChild(b),b=this.game.add.sprite(0,0,r.Atlases.Garage,"0popup_bg0000"),b.anchor.set(.5),this.blackRightBG.addChild(b),this.textVersion=new p.default(this.game,680,470," "+r.Constants.VERSION,r.Constants.styleVersion),this.background3.addChild(this.textVersion),this.google_btn=new h.default(this.game,"",n,this.onGoogle,this,r.Atlases.Garage),this.google_btn.setFrames("google_btn0000","google_btn0000","google_btn0000","google_btn0000"),this.google_btn.x=110,this.google_btn.y=380,this.background.addChild(this.google_btn),this.apple_btn=new h.default(this.game,"",n,this.onApple,this,r.Atlases.Garage),this.apple_btn.setFrames("apple_btn0000","apple_btn0000","apple_btn0000","apple_btn0000"),this.apple_btn.x=110,this.apple_btn.y=445,this.background.addChild(this.apple_btn),o.default.getInstance(this.game,this.onLoadSave,this),new l.default(this.game,0,null),this.resize()},e.prototype.onLoadSave=function(){n.default.getInstance(this.game).playMusic(r.Sounds.MenuMusic),this.musicBtn.inputEnabled=!0,this.updateSoundButtons(),this.playBtn.visible=!0},e.prototype.onGoogle=function(){window.open(v.default.getInstance().getUrl(v.default.Google),"_blank")},e.prototype.onApple=function(){window.open(v.default.getInstance().getUrl(v.default.Apple),"_blank")},e.prototype.initGame=function(){null===d.GameData.currentCar&&(d.GameData.currentCar=this.game.cache.getJSON(y.default.Car001),d.CarsData.geomObj=this.game.cache.getJSON(y.default.Objects),this.setCar(d.GameData.currentCar))},e.prototype.startGame=function(){if("undefined"!=typeof gdsdk&&"undefined"!==gdsdk.showBanner)var t=gdsdk.showBanner();n.default.getInstance().play(r.Sounds.Click),this.initGame(),new c.default(this.game,0,f.default.Name)},e.prototype.onGarage=function(){n.default.getInstance().play(r.Sounds.Click),this.initGame(),new c.default(this.game,0,g.default.Name)},e.prototype.setCar=function(t){d.CarsData.params=new d.CarParams,d.CarsData.params.setData(t),g.default.currCar=g.default.carList.indexOf(d.Inventory.instance.skin),d.CarsData.params.skinId=g.default.carList[g.default.currCar]},e.prototype.resetGame=function(){d.Inventory.instance.reset(),o.default.getInstance().save()},e.unlockGame=function(){d.Inventory.instance.unlockAll(),o.default.getInstance().save()},e.prototype.toggleMusic=function(){o.default.getInstance().music?n.default.getInstance().toggleMusic():o.default.getInstance().sfx?n.default.getInstance().toggleSfx():(n.default.getInstance().toggleSfx(),n.default.getInstance().toggleMusic()),this.updateSoundButtons(),n.default.getInstance().play(r.Sounds.Click)},e.prototype.updateSoundButtons=function(){var t=o.default.getInstance().music?0:1;t+=o.default.getInstance().sfx?0:1,this.musicBtn.loadTexture(r.Atlases.Garage,"InGameMusicButton000"+t)},e.prototype.onCredits=function(){this.createPopup();for(var t=23,e,i=[" "," "," "," "," ","CEO: Konstantin Matrunchik","Coding: Dmitry Borozenets","Art: Andrey Zdyschuk","Game Design: Vasiliy Kachor","Menu song: skyler182.newgrounds.com","Ported by iriysoft.com"],s=0;s1?1:e,this.garageBtn.x=this.game.width-120,this.musicBtn.x=this.game.width-35,this.bgTop.x=this.game.width-250,this.background.scale.set(e),this.background.alignIn(this.world.bounds,Phaser.BOTTOM_CENTER),this.logo.scale.set(e),this.background2.scale.set(2.02*Phaser.Math.max(this.game.width/r.Constants.WIDTH,this.game.height/r.Constants.HEIGHT)),this.background2.alignIn(this.world.bounds,Phaser.CENTER),this.background2.visible=!1,this._armatureDisplay.x=-this.background.x-50,this.game.width>820?this.blackRightBG.x=900:this.game.width-110>450?this.blackRightBG.x=this.game.width-110:this.blackRightBG.x=this.game.width,this.game.width>r.Constants.WIDTH&&(this.google_btn.x=110-(this.game.width-r.Constants.WIDTH)/2,this.apple_btn.x=this.google_btn.x),this.playBtn.x=this.game.width-250,this.playBtn.y=200,this.moregames.x=this.game.width-100,this.moregames.y=this.game.height-180,this.playBtn.scale.set(e),this.moregames.scale.set(e),this.textVersion.x=this.game.width-60,this.textVersion.y=this.game.height-20,this.resizePopup(e),t.prototype.resize.call(this)},e.prototype.shutdown=function(){t.prototype.shutdown.call(this),this.background=null,this.background2=null,this.popup=null,this.popup_btn=null,this.playBtn=null,this.moregames=null,this.musicBtn=null,this.bgTop=null,this._armatureDisplay=null},e.Name="menu",e}(Phaser.State);e.default=b},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.DBBike="bikes_texture",t.DBMenu="menu_texture",t.preloadList=[],t.list=[t.DBBike,t.DBMenu],t}();e.default=s},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.Level001="map1",t.Level002="map2",t.Level003="map3",t.Level004="map4",t.Level005="map5",t.Level006="map6",t.Level007="map7",t.Level008="map8",t.Level009="map9",t.Level010="map10",t.Level011="map11",t.Level012="map12",t.Level013="map13",t.Level014="map14",t.Level015="map15",t.Level016="map16",t.Level017="map17",t.Level018="map18",t.Level019="map19",t.Level020="map20",t.Level021="map21",t.Level022="map22",t.Car001="1",t.Bike="bike",t.DBBike="bikes_skeleton",t.DBBike_Texture="bikes_texture",t.DBMenu="menu_skeleton",t.DBMenu_Texture="menu_texture",t.Objects="objects",t.preloadList=[t.Objects],t.list=[t.Level001,t.Level002,t.Level003,t.Level004,t.Level005,t.Level006,t.Level007,t.Level008,t.Level009,t.Level010,t.Level011,t.Level012,t.Level013,t.Level014,t.Level015,t.Level016,t.Level017,t.Level018,t.Level019,t.Level020,t.Level021,t.Level022,t.Car001,t.Objects,t.DBBike,t.DBBike_Texture,t.DBMenu,t.DBMenu_Texture,t.Bike],t}();e.default=s},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(13),i(10);var n=i(3),o=i(17),a=i(26),r=i(2),h=function(t){function e(){var i=t.call(this)||this;return i.name=e.Name,i.loadComplete=!0,i.bike=null,i.w0=null,i.w1=null,i.wait=null,i.mainParent=null,i}return s(e,t),e.prototype.preload=function(){var e=this;t.prototype.preload.call(this),this.wait=this.game.add.text(this.game.width/2,this.game.height/2,"LOADING...",n.Constants.styleCredits0),this.wait.anchor.set(.5),this.game.sound.muteOnPause=!0,this.game.load.onFileComplete.add(this.fileComplete,this);var i="x"+n.Constants.GAME_SCALE+"/";n.JSONData.list.forEach(function(t){e.game.load.json(t,"assets/levels/"+t+".json")}),n.Images.list.forEach(function(t){e.game.load.image(t,"assets/images/"+i+t+".png")}),n.Atlases.list.forEach(function(t){e.game.load.atlas(t,"assets/atlases/"+i+t+".png","assets/atlases/"+i+t+".json")}),n.Sounds.list.forEach(function(t){e.game.device.iOS?e.game.load.audio(t,["assets/sound/"+t+".m4a"]):e.game.load.audio(t,["assets/sound/"+t+".ogg","assets/sound/"+t+".mp3"])}),this.game.scale.onSizeChange.add(function(){e.game.state.getCurrentState().resize()},this)},e.prototype.init=function(){t.prototype.init.call(this),this.mainParent=this.game.add.group(),this.mainParent.x=this.game.width/2,this.mainParent.y=this.game.height/2-80,this.setPauseViewCar(this.mainParent)},e.prototype.setPauseViewCar=function(t){null!==this.bike?(this.bike.destroy(),this.bike=this.game.add.group(t)):this.bike=this.game.add.group(t);var e=this.game.cache.getJSON(n.JSONData.Objects).bike11,i="Wheel0";this.w0=this.parseStaticGraphic(e,i),i="Wheel1",this.w1=this.parseStaticGraphic(e,i),i="suspend_back",this.parseStaticGraphic(e,i),i="base",this.parseStaticGraphic(e,i),i="driver_corpse",this.parseStaticGraphic(e,i),i="driver_hip",this.parseStaticGraphic(e,i),i="driver_shin",this.parseStaticGraphic(e,i),i="driver_arm",this.parseStaticGraphic(e,i),i="driver_forearm",this.parseStaticGraphic(e,i),i="driver_head",this.parseStaticGraphic(e,i),i="suspend_front",this.parseStaticGraphic(e,i),this.bike.x=0,this.bike.y=10},e.prototype.parseStaticGraphic=function(t,e){var i=null;return i=this.game.add.image(t[e].x,t[e].y,n.Atlases.Cars,t[e].g+"0000"),i.angle=t[e].r,-1!==e.indexOf("base")?i.anchor.set(r.AssetsList.FRAMES_ANCHORX[0],r.AssetsList.FRAMES_ANCHORY[0]):-1!==e.indexOf("suspend")?-1!==e.indexOf("front")?i.anchor.set(.8,-1!==t[e].g.indexOf("1")?.2:.5):i.anchor.set(0,.5):i.anchor.set(.5),this.bike.addChild(i),i},e.prototype.create=function(){t.prototype.create.call(this)},e.prototype.update=function(){t.prototype.update.call(this),this.loadComplete&&(this.loadComplete=!1,e.game=this.game,new o.default(this.game,0,a.default.Name))},e.prototype.fileComplete=function(t,e,i,s,n){this.wait.setText("Loading..."+t+"%"),this.w0.angle=720*t/100,this.w1.angle=720*t/100},e.prototype.resize=function(){var e=1;e=this.game.width/n.Constants.WIDTH,e=e>1?1:e,this.mainParent&&(this.mainParent.x=this.game.width/2,this.mainParent.y=this.game.height/2-80),this.wait&&this.wait.position.set(this.game.width/2,this.game.height/2),t.prototype.resize.call(this)},e.prototype.shutdown=function(){t.prototype.shutdown.call(this)},e.Name="preloader",e.game=null,e}(Phaser.State);e.default=h},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.space.Space,o=i(42),a=i(16),r=function(t){function e(){var i=t.call(this)||this;return e.space=new n,i}return s(e,t),e.prototype.start=function(){},e.prototype.update=function(t){e.space.step(.5*t),e.space.step(.5*t);for(var i=e.space.liveBodies.iterator(),s;i.hasNext();){var n=i.next(),o=n.userData;o.graphic?(s=o.graphic,s.x=n.position.x,s.y=n.position.y,s.rotation=n.rotation%(2*Math.PI)):o.graphicEx&&(s=o.graphicEx,s.x=n.position.x,s.y=n.position.y,s.rotation=n.rotation%(2*Math.PI))}},e.prototype.add=function(t){null!==t.body.compound?t.body.compound.space=e.space:t.body.space=e.space},e.prototype.release=function(){for(t.prototype.release.call(this);!e.space.bodies.empty();)a.NapeUtil.disposeBody(e.space.bodies.at(0))},e}(o.GamePhysics);e.NapePhysics=r},function(t,e,i){"use strict";e.__esModule=!0;var s=i(0),n=i(33),o=function(){function t(){this.object=null,this.car=null,this.tweening=!1}return t.prototype.setup=function(t,e,i,s){this.maxScale=.45,this.tweening=!1,this.viewportW=e,this.viewportH=i,this.viewportHalfH=.5*i,this.viewportHalfW=.5*e,this.object=t,this.prevX=t.x,this.prevY=t.y,this.car=s,this.prevScale=t.scale.x,this.prevFrameH=i,n.CameraPathes.instance.tweened=!1,this.shakeX=0,this.shakeY=0},t.prototype.hardFocusOnCar=function(e,i,s){this.update(e+t.CAR_DX/s,i-100,s,!1)},t.prototype.shake=function(){var t=s.GraphicUtil.game.add.tween(this);t.to({shakeX:15,shakeY:15},100,Phaser.Easing.Bounce.InOut,!1,0,3,!0),t.start()},t.prototype.shakeContainer=function(t){void 0===t&&(t=null);var e=s.GraphicUtil.game.add.tween(t),i=t.x,n=t.y;e.to({x:t.x-10,y:t.y-10},15,Phaser.Easing.Bounce.InOut,!1,0,3,!0),e.onComplete.addOnce(function(){t.x=i,t.y=n},this),e.start()},t.prototype.update=function(e,i,s,n){void 0===n&&(n=!1);var o,a,r=1;if(n){var h=.4;this.prevX+=.4*(e-this.prevX),this.prevY+=.4*(i-this.prevY),r=this.prevScale+(s-this.prevScale),o=-this.prevX*r+this.viewportHalfW,a=-this.prevY*r+this.viewportHalfH}else r=s,o=-e*r+this.viewportHalfW,a=-i*r+this.viewportHalfH,this.prevX=e,this.prevY=i;this.prevScale=r,t.x=-o/r,t.y=-a/r,this.car.finished||this.updateObject(o+this.shakeX,a+this.shakeY,r),t.w=this.viewportW/r,t.h=this.viewportH/r,t.scale=r},t.prototype.updateObject=function(t,e,i){this.object.scale.set(i),this.object.x=t,this.object.y=e},t.prototype.focusOnCar=function(e,i,s){var o=n.CameraPathes.instance.getPathPointXY(e,i),a=!1,r=1,h=this.getFrameHBySpeed(s),l,c;if(isNaN(o))rh&&(h=d),r=t.SCALE_MULT*this.viewportH/h,ri.maxMove?i.maxMove:t:i.move===s.CameraZone.VER&&(o=ei.maxMove?i.maxMove:e),this.tweening=!0,this.update(n,o,i.scale,!0)},t.prototype.focusOnPoint=function(t,e){this.tweening=!0,this.update(t,e,1,!0)},t.prototype.getFrameHBySpeed=function(t){var e=this.viewportH,i=500,s=3e3;if(t>500){var n=this.viewportH;t=t>3e3?3e3:t;e+=(t-500)/2500*n}var o=e-this.prevFrameH,a=2;return o<-2?e=this.prevFrameH-2:o>8&&(e=this.prevFrameH+8),this.prevFrameH=e,e},t.prototype.release=function(){this.object=null,this.car=null},t.inCamera=function(e,i,s){return e>t.x-s&&et.y-s&&ithis.maxX)return NaN;for(var i=this.points.length,n=s.get(0,0),o=1;o=t){var r=this.points[o-1],h=t-r.x;n.x=a.x-r.x,n.y=a.y-r.y;var l=h*Math.tan(n.angle),c=r.y+l;return c>0;t-=100*e;var i=(e<10?"0"+e:e)+"."+t;i.length<5&&(i+="0"),this.timer.setText(i)},t.prototype.showFlipMsg=function(t,e){var i="FLIP",n="";n=n+"-"+.5*t+" sec",this.flipTexts.setText(n),this.flipBG.setText(n),t>1&&(i=i+" "+t+"X"),this.lFront.setText(i),this.lBack.setText(i),h.MaxGameCore.instance.timer-=.5*t,this.startTextAnim(this.flipTexts,this.hideFlipTxtAnim,this),c.default.getInstance().play(s.Sounds.FlipSound())},t.prototype.startTextAnim=function(t,e,i){t.scale.set(.1),this.flipBG.stroke="#000000",this.flipBG.strokeThickness=2,t.label.stroke="#FFFFFF",t.label.strokeThickness=5;var s=this.game.add.tween(t.scale);t.alpha=1,s.to({x:1,y:1},350,Phaser.Easing.Back.Out,!0),s.onComplete.addOnce(e,i)},t.prototype.hideFlipTxtAnim=function(){this.game.add.tween(this.flipTexts).to({alpha:0},250,Phaser.Easing.Linear.None,!0,500)},t.prototype.release=function(){this.flipTexts=null,this.flipBG=null,this.bgBtnRight=null,this.bgBtnLeft=null,this.helperText=null,this.continueText=null,this.continueShow=!1,this.helperShow=!1,this.game=null,this.timer=null,this.pauseBtn=null,this.restartBtn=null,this.musicBtn=null,this.stars=null,this.signalToggleMusic.removeAll(),this.signalRestart.removeAll(),this.signalPause.removeAll(),this.signalToggleMusic=null,this.signalRestart=null,this.signalPause=null,this.container.destroy(),this.container=null},t.prototype.showControlsHint=function(){this.helperText.visible=!0,this.continueText.visible=!1,this.helperShow=!0,this.continueShow=!1},t.prototype.showDeathHint=function(){h.MaxGameCore.instance.finished||(this.continueText.visible=!0),this.helperText.visible=!1,this.helperShow=!1,this.continueShow=!0,c.default.getInstance().play(s.Sounds.DieSound())},t.prototype.hideControlsHint=function(){this.helperShow=!1,this.continueShow=!1,this.helperText.visible=!1,this.continueText.visible=!1},t.prototype.showTimer=function(){this.timer.visible||h.MaxGameCore.instance.finished||(this.timer.visible=!0,this.helperShow&&(this.helperText.visible=!0),this.continueShow&&(this.continueText.visible=!0),a.default.instance.container.visible=!0)},t.prototype.hideTimer=function(){this.timer.visible&&(this.timer.visible=!1,this.helperText.visible=!1,this.continueText.visible=!1,a.default.instance.container.visible=!1)},t.prototype.init=function(e,i){this.container=e,this.game=i,p.default.isDesktop||(t.MSG_CONTINUE="Tap to continue",t.MSG_HELP="Use arrows to move"),this.scl=Math.max(this.game.width,this.game.height)/s.Constants.WIDTH,this.scl=this.scl>1?1:this.scl,this.signalRestart=new Phaser.Signal,this.signalPause=new Phaser.Signal,this.signalToggleMusic=new Phaser.Signal,this.timer=new n.default(this.game,"00.00",s.Constants.styleTimer,null,null,s.Atlases.Garage),this.timer.setFrames("timer_bg0000","timer_bg0000","timer_bg0000","timer_bg0000"),this.timer.x=this.game.width/2,this.timer.y=25,this.timer.label.x=-2,this.timer.label.anchor.set(0,.6),this.timer.inputEnableChildren=!1,this.helperText=new n.default(this.game,t.MSG_HELP,s.Constants.styleHelp,null,null,s.Atlases.Garage),this.helperText.setFrames("0popup_bg0000","0popup_bg0000","0popup_bg0000","0popup_bg0000"),this.helperText.x=this.game.width/2,this.helperText.y=this.game.height+this.helperText.height/2-90*s.Constants.GAME_SCALE,this.helperText.label.anchor.set(.5,5.5),this.helperText.visible=!1,this.continueText=new n.default(this.game,t.MSG_CONTINUE,s.Constants.styleHelp,null,null,s.Atlases.Garage),this.continueText.setFrames("0popup_bg0000","0popup_bg0000","0popup_bg0000","0popup_bg0000"),this.continueText.x=this.game.width/2,this.continueText.y=this.game.height+this.helperText.height/2-90*s.Constants.GAME_SCALE,this.continueText.label.anchor.set(.5,5.5),this.continueText.visible=!1,this.bgBtnRight=this.game.add.image(this.game.width,0,s.Atlases.Garage,"pause_bg0000"),this.bgBtnRight.scale.set(-1.4,1),this.bgBtnLeft=this.game.add.image(0,0,s.Atlases.Garage,"pause_bg0000"),this.bgBtnLeft.scale.set(1.4,1),this.restartBtn=this.game.add.image(0,0,s.Atlases.Garage,"restart_btn0000"),this.pauseBtn=this.game.add.image(this.game.width-90,0,s.Atlases.Garage,"InGamePauseButton0000"),this.musicBtn=this.game.add.image(this.game.width-58,0,s.Atlases.Garage,"InGameMusicButton0000"),this.stars=this.game.add.text(45,6,"#"+(o.default.LevelNum+1),s.Constants.styleMoney),this.flipTexts=new n.default(i,"",s.Constants.styleTrick,null,null,s.Atlases.Garage),this.flipTexts.setFrames("bg0000","bg0000","bg0000","bg0000"),this.flipTexts.label.setMaxSize(200,45),this.flipTexts.label.y=20,this.flipTexts.alpha=0,this.lBack=new l.default(this.game,0,-20,"FLIP",s.Constants.styleTrick),this.lBack.anchor.set(.5),this.flipTexts.label.parent.addChildAt(this.lBack,0),this.lBack.stroke="#FFFFFF",this.lBack.strokeThickness=5,this.lFront=new l.default(this.game,0,-20,"FLIP",s.Constants.styleTrick),this.lFront.anchor.set(.5),this.flipTexts.label.parent.addChild(this.lFront),this.lFront.stroke="#000000",this.lFront.strokeThickness=2,this.flipBG=new l.default(this.game,0,20,"",s.Constants.styleTrick),this.flipBG.anchor.set(.5),this.flipTexts.label.parent.addChild(this.flipBG),this.restartBtn.inputEnabled=!0,this.restartBtn.events.onInputDown.add(this.onRestart,this),this.pauseBtn.inputEnabled=!0,this.pauseBtn.events.onInputDown.add(this.onPause,this),this.musicBtn.inputEnabled=!0,this.musicBtn.events.onInputDown.add(this.toggleMusic,this),this.updateSoundButtons(),this.container.addChild(this.bgBtnRight),this.container.addChild(this.bgBtnLeft),this.container.addChild(this.pauseBtn),this.container.addChild(this.restartBtn),this.container.addChild(this.musicBtn),this.container.addChild(this.flipTexts),this.container.addChild(this.stars),this.container.addChild(this.timer),this.container.addChild(this.helperText),this.container.addChild(this.continueText),p.default.isDesktop||a.default.instance.container.parent.addChild(a.default.instance.container),this.flipTexts.x=.5*this.game.width/this.scl,this.flipTexts.y=.2*s.Constants.HEIGHT},t.prototype.toggleMusic=function(){this.signalToggleMusic.dispatch()},t.prototype.updateSoundButtons=function(){var t=d.default.getInstance().music?0:1;t+=d.default.getInstance().sfx?0:1,this.musicBtn.loadTexture(s.Atlases.Garage,"InGameMusicButton000"+t)},t.prototype.resize=function(t){this.container.scale.set(t),this.bgBtnRight.x=this.game.width/t,this.musicBtn.x=this.game.width/t-58,this.pauseBtn.x=this.game.width/t-100,this.bgBtnRight.y=0,this.bgBtnLeft.y=0,this.game.state.current===r.default.Name&&this.resizeGameplay(t),p.default.isDesktop||a.default.instance.resize(t)},t.prototype.onMoreGames=function(){window.open(u.default.getInstance().getUrl(u.default.YEP10),"_blank")},t.prototype.resizeGameplay=function(t){this.flipTexts.x=.5*this.game.width},t.prototype.onPause=function(){this.signalPause.dispatch()},t.prototype.onRestart=function(){this.signalRestart.dispatch()},Object.defineProperty(t,"instance",{get:function(){return t._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.MSG_CONTINUE="Press SPACE to continue",t.MSG_HELP="Use arrows to move",t}();e.default=f},function(t,e,i){"use strict";e.__esModule=!0;var s=i(44),n=function(){function t(){}return t.prototype.init=function(t,e){this.prevX=t,this.prevY=e,this.prevDist=0},t.prototype.emit=function(e,i){var n=Math.sqrt((e-this.prevX)*(e-this.prevX)+(i-this.prevY)*(i-this.prevY));if(nt.MIN_DIST;)this.prevX+=t.MIN_DIST*a,this.prevY+=t.MIN_DIST*r,s.TrailPartObject.get().put(this.prevX,this.prevY),n-=t.MIN_DIST},t.MIN_DIST=16,t}();e.TrailParticlesSystem=n},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(1),a=i(4),r=i(5),h=i(2),l=function(t){function e(){var e=t.call(this)||this;return e.create(),e}return s(e,t),e.setupPool=function(){for(var t=0;t<11;t++)e.pool.push(new e);e.poolLen=e.pool.length},e.get=function(){for(var t=0;t0&&e.pool.splice(0,e.poolLen),this.maxSizeCallback=null,this.completeCallback=null,this.completeCallbackContext=null,t.prototype.release.call(this)},e.pool=new Array,e.poolLen=0,e}(n.GameObject);e.CarExplodeObject=l},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(3),o=function(t){function e(e,i,s){void 0===s&&(s=null);var o=t.call(this,e)||this;o.beginFill(i,1),o.drawRect(0,0,o.game.width,o.game.height),o.endFill(),e.add.group(o,"white",!0).add(o);var a=o.game.add.text(o.game.width/2,o.game.height/2,"LOADING...",n.Constants.styleCredits0);a.anchor.set(.5),o.addChild(a);var r=o.game.add.tween(o);return r.to({alpha:0},100),r.onComplete.add(function(){null!==s&&s()}),r.start(),o}return s(e,t),e}(Phaser.Graphics);e.default=o},function(t,e,i){"use strict";e.__esModule=!0;var s=i(10),n=i(0),o=function(){function t(){}return t.setTransform=function(t,e,i,s,n,o,a,r){void 0===n&&(n=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===r&&(r=null),t.x=e,t.y=i,t.rotation=s,n&&(t.pivot.x=n),o&&(t.pivot.y=o),a&&(t.scale.x=a),r&&(t.scale.y=r)},t.release=function(){for(var e in t.mapTexture)if(t.mapTexture.hasOwnProperty(e)){var i=t.mapTexture[e];i.destroy(!0)}t.mapTexture={}},t.drawBitmapPath=function(e,i,s){var n=s.length,o=[],a=0,r=null;for(a=0;a.15;)n=i[i.length-1],o=t[d+1],c=Phaser.Point.distance(n,o),c>e?(u=e/c,c*=u,Phaser.Point.interpolate(n,o,u,p),i.push(new s.Point(p.x,p.y))):(d++,i.push(new s.Point(t[d].x,t[d].y))),h-=c;return l}},t.choosePic=function(e,i){if(void 0===t.mapTexture[e]){var s=new Phaser.Image(n.GraphicUtil.game,0,0,n.GraphicUtil.currentAtlass,e+"0000"),o=s.generateTexture();s.visible=!1,t.mapTexture[e]=o}return n.GraphicUtil.game.add.rope(0,0,t.mapTexture[e],null,i)},t.drawOld=function(t,e,i){var s,o,a=0,r=i.length,h=0,l=null;for(h=0;h0?e.pool.pop():new e},e.prototype.create=function(t){void 0===t&&(t=null),this.type=a.ObjectTypes.LANDSCAPE,this.graphic=new n.TrailPart,this.active=!1,o.MaxGameCore.instance.add(this)},e.prototype.update=function(t){void 0===t&&(t=0),this.active&&(this.graphic.update(t),this.graphic.isPlaying||this.remove())},e.prototype.put=function(t,e){this.graphic.x=t,this.graphic.y=e,this.graphic.visible=!0,this.active=!0,this.graphic.gotoAndPlay(0)},e.prototype.remove=function(){this.active&&(e.pool[e.pool.length]=this),this.active=!1,this.graphic.visible=!1},e.prototype.restart=function(){this.remove()},e.pool=[],e}(n.GameObject);e.TrailPartObject=r},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(5),o=i(2),a=function(t){function e(){var e=t.call(this,n.GraphicUtil.game)||this;e.anim=null;var i=o.AssetsStorage.instance.getByKey("smoke_part"),s=e.game.add.sprite(0,0,n.GraphicUtil.currentAtlass,i+"0000");return s.animations.add(i,Phaser.Animation.generateFrameNames(i,0,28,"",4)),s.anchor.set(.5),e.anim=s.animations.getAnimation(i),e.anim.play(30),e.anim.stop(),e.anim.onComplete.add(e.animationComplete,e),e.addChild(s),e.visible=!1,e}return s(e,t),e.prototype.update2=function(t){void 0===t&&(t=0),this.anim.isPlaying&&(this.x+=this.velX*t,this.y+=this.velY*t,this.velY+=e.GRAVITY_Y*t)},e.prototype.animationComplete=function(){this.visible=!1},e.prototype.emit=function(t,i,s){this.visible=!0,this.x=t,this.y=i,this.velX=e.BASE_VEL*Math.cos(s),this.velY=e.BASE_VEL*Math.sin(s),this.anim.play(30)},e.GRAVITY_Y=-500,e.BASE_VEL=-50,e}(Phaser.Group);e.SmokePartClip=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(2),a=function(t){function e(){var e=t.call(this,n.GraphicUtil.game)||this;e.anim=null;var i=o.AssetsStorage.instance.getByKey("ground_part"),s=e.game.add.sprite(0,0,n.GraphicUtil.currentAtlass,i+"0000");return s.animations.add(i,Phaser.Animation.generateFrameNames(i,0,28,"",4)),s.anchor.set(.5),e.anim=s.animations.getAnimation(i),e.anim.play(30),e.anim.stop(),e.anim.onComplete.add(e.animationComplete,e),e.addChild(s),e.visible=!1,e}return s(e,t),e.prototype.update2=function(t){void 0===t&&(t=0),this.anim.isPlaying&&(this.x+=this.velX*t,this.y+=this.velY*t,this.velY+=e.GRAVITY_Y*t)},e.prototype.animationComplete=function(){this.visible=!1},e.prototype.emit=function(t,e,i,s){this.visible=!0,this.x=t,this.y=e,this.velX=i,this.velY=s,this.anim.play(30)},e.GRAVITY_Y=500,e}(Phaser.Group);e.GroundPartClip=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.geom.Ray,o=nape.geom.Vec2,a=nape.phys.Compound,r=i(0),h=i(4),l=i(9),c=i(3),u=i(25),d=function(t){function e(){var e=t.call(this)||this;return e.LONG_FLY_TIME=.1,e.dampingDelta=.99,e._drive=!0,e.ray=new n(o.weak(),o.weak(0,1)),e.itemId=-1,e.accell=!1,e.smokeTimer=0,e.wheelieTimer=0,e.tilt=0,e.compound=new a,e}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.space=h.MaxGameCore.instance.getSpace(),this.setParams(t),this.finished=!1,this.boost=new r.BoostEffector(this.frame.body),this.boost.anim=this.frame.graphic.boostAnim,this.restart()},e.prototype.setParams=function(t){this.skinId=t.skinId;var e;0===t.wd?(this.wdWheels=[this.backWheel.body],e=this.backWheel.body.shapes.at(0).radius):1===t.wd?(e=this.frontWheel.body.shapes.at(0).radius,this.wdWheels=[this.frontWheel.body]):(this.wdWheels=[this.backWheel.body,this.frontWheel.body],e=Math.max(this.backWheel.body.shapes.at(0).radius,this.frontWheel.body.shapes.at(0).radius)),this.wheelRadius=e;var i=2*Math.PI*e,s=t.maxSpeed/i;this.maxAngularVel=2*s*Math.PI,this.accelTorque=t.torque,t.maxTorque>t.torque?this.deltaTorque=t.maxTorque-t.torque:this.deltaTorque=0,this.tiltTorque=t.flipTorque,this.frame.maxFlipVel=this.maxTiltSpeed=t.maxFlipSpeed},e.prototype.restart=function(){this.wheelieTimer=0,this.accell=!1,this.safeId=-1,this.finished=!1,this.maxFlyAngle=this.minFlyAngle=this.startFlyAngle=this.rotation=this.frame.body.rotation,this.fallTime=this.flyTime=0,this.frame.body.userData.handler=this,this.backWheel.body.userData.handler=this,this.frontWheel.body.userData.handler=this,this.frame.body.userData.graphic=this.frame.graphic,this.backWheel.body.userData.graphicEx=this.backWheel.graphic,this.frontWheel.body.userData.graphicEx=this.frontWheel.graphic,this._drive=!0,this._deadDelay=0,this.dead=!1,this.itemId=-1,this.setVisible(!0),this.setAlpha(1),this.review(),this.compound.space=this.space},e.prototype.release=function(){this.space=null,this.compound.space=null,this.compound=null,this.frame=null,this.backWheel=null,this.frontWheel=null,this.callbackFinish=null,this.callbackDie=null,this.callbackStunt=null,this.callbackFight=null,this.suspendBack=null,this.suspendBackLocal&&this.suspendBackLocal.dispose(),this.suspendBackLocal=null,this.suspendFront=null,this.boost.dispose(),this.boost=null,t.prototype.release.call(this)},Object.defineProperty(e.prototype,"drive",{get:function(){return this._drive},set:function(t){t&&!this._drive&&(this.frontWheel.startSpin(),this.backWheel.startSpin()),this._drive=t},enumerable:!0,configurable:!0}),e.prototype.addBoost=function(t,e){this.dead||this.boost.add(t,e)},e.prototype.update=function(t){void 0===t&&(t=0),this.dead&&this.driver?(this.x=this.driver.parts[0].body.position.x,this.y=this.driver.parts[0].body.position.y):(this.x=this.frame.body.position.x,this.y=this.frame.body.position.y),this.rotation=this.frame.body.rotation;var i=this.speed;this.speed=this.frame.body.velocity.length,this.speedV=this.frame.body.velocity.y,this.hasGround=this.frame.hasGround||this.backWheel.hasGround||this.frontWheel.hasGround,this.hasGround?(this.flyTime>this.LONG_FLY_TIME&&(this.processLand(),i>500&&l.default.getInstance().play(c.Sounds.Landing)),this.flyTime=0,this.fallTime=0):(0===this.flyTime&&(this.maxFlyAngle=this.minFlyAngle=this.startFlyAngle=this.rotation),this.rotation>this.maxFlyAngle?this.maxFlyAngle=this.rotation:this.rotation0?this.fallTime+=t:this.fallTime=0);var s;if(this._drive){var n=this.controller.getDrive();if(this.applyDrive(t,!1,n),this.finished)this.applyTilt(t,0);else{var o=this.controller.getTilt();this.applyTilt(t,o)}if(4!==this.skinId&&(this.controller.accell?this.smokeTimer-=2*t:this.smokeTimer-=t,this.smokeTimer<=0)){this.smokeTimer+=e.SMOKE_TIME,s=this.frame.graphic;var a=this.frame.body.localPointToWorld(this.frame.localSmokePos),h=.1*Math.PI;this.controller.accell?(s.emitSmoke(a.x,a.y,this.rotation-.5*h+Math.random()*h),s.emitSmoke(a.x,a.y,this.rotation-.1*Math.PI+.5*h+Math.random()*h),s.emitSmoke(a.x,a.y,this.rotation+.1*Math.PI+.5*h+Math.random()*h),a.dispose()):(s.emitSmoke(a.x,a.y,this.rotation-.5*h+Math.random()*h),a.dispose())}s=this.frame.graphic,this.updateWheelie(t)}else this._deadDelay>0&&(this._deadDelay-=t,this._deadDelay<=0&&9!==this.skinId&&(this._drive=!0,this._deadDelay=0,this.dead=!1,this.setVisible(!0),this.compound.space=this.space)),this.finished&&(this.frontWheel.body.angularVel*=.8,this.backWheel.body.angularVel*=.8);if(this.suspendBack){var u=this.frame.body.localPointToWorld(this.suspendBackLocal),d=this.backWheel.body.position.sub(u);r.Drawing.setTransform(this.suspendBack.graphic,u.x,u.y,d.angle,NaN,NaN,d.length/this.suspendBackW,1),d.dispose(),u.dispose()}this.suspendFront&&(this.suspendFront.graphic.x=this.frontWheel.body.position.x,this.suspendFront.graphic.y=this.frontWheel.body.position.y,this.suspendFront.graphic.rotation=(this.suspendFrontAngle+this.frame.body.rotation)%(2*Math.PI)),this.driver.head&&(this.driver.head.trail&&this.driver.head.trail.emit(this.driver.head.body.position.x,this.driver.head.body.position.y),this.driver.head.update(t)),this.boost.update(t,this.hasGround)},e.prototype.updateWheelie=function(t){h.MaxGameCore.instance.finished||(this.hasGround?this.frame.hasGround?this.wheelieTimer>0&&this.wheelieComplete():this.backWheel.hasGround&&!this.frontWheel.hasGround||!this.backWheel.hasGround&&this.frontWheel.hasGround?(this.wheelieTimer+=t,this.wheelieTimer>1&&this.callbackWheelie&&this.callbackWheelie(this.wheelieTimer,!1)):this.wheelieTimer>0&&this.wheelieComplete():this.wheelieTimer>0&&this.wheelieComplete())},e.prototype.wheelieComplete=function(){this.wheelieTimer>1&&this.callbackWheelie&&this.callbackWheelie(this.wheelieTimer,!0),this.wheelieTimer=0},e.prototype.setAlpha=function(t){this.frame.graphic.alpha=this.backWheel.graphic.alpha=this.frontWheel.graphic.alpha=t},e.prototype.processLand=function(){if(!h.MaxGameCore.instance.finished){if(!this.dead&&(this.backWheel.hasGround||this.frontWheel.hasGround)){var t=void 0,e=Math.PI;t=this.startFlyAngle-this.minFlyAngle;var i=t/(2*Math.PI)>>0;t-=2*i*Math.PI,t>=e&&i++;var s=i;t=this.maxFlyAngle-this.startFlyAngle,i=t/(2*Math.PI)>>0,t-=2*i*Math.PI,t>=e&&i++;var n=i;s>0&&this.callbackStunt&&this.callbackStunt.call(this.callbackContext,s,!0),n>0&&this.callbackStunt&&this.callbackStunt.call(this.callbackContext,n,!1)}this.startFlyAngle=this.maxFlyAngle=this.minFlyAngle=this.rotation}},e.prototype.applyDrive=function(t,e,i){var s=!1,n=!1;this.finished||(1===i?s=!0:-1===i&&(n=!0));var o=this.accelTorque,a=this.maxAngularVel;if(this.deltaTorque>0&&(s||n)){var r=this.speed/this.wheelRadius;if(r0&&(m.angularVel*=.5),m.angularVel>-a&&m.applyAngularImpulse(-t*o/f)):e||(m.angularVel*=this.dampingDelta),Math.abs(m.angularVel)0&&s>this.maxTiltSpeed&&(i.angularVel=this.maxTiltSpeed),this.driver){var n=e;if(0===n)if(this.hasGround)this.controller.accell&&(n=-1);else{var o=this.frame.body.velocity.y;o<-20?n=1:o>20&&(n=-1)}this.driver.move(e,n)}},e.prototype.setReviewPos=function(t,e,i){this.safeId=i,this.frame.body.userData.reviewX=t,this.frame.body.userData.reviewY=e},e.prototype.review=function(){h.MaxGameCore.instance.stopAllSounds(),u.default.loadedLevel&&(h.MaxGameCore.instance.engineStart=l.default.getInstance().play(c.Sounds.Start)),this.wheelieTimer=0,this.backWheel.connect(!1),this.frontWheel.connect(!1),this.driver.connectDriver(!1),this.driver.connect(!1),r.NapeUtil.stopBody(this.frame.body),r.NapeUtil.stopBody(this.backWheel.body),r.NapeUtil.stopBody(this.frontWheel.body),this.driver.stop(),this.frame.review(),this.startFlyAngle=this.maxFlyAngle=this.minFlyAngle=this.rotation=this.frame.body.rotation;var t=o.get(-this.frame.wheelBackDx,this.frame.wheelDy),e=this.frame.body.localPointToWorld(t);this.backWheel.body.position.set(e),e.dispose(),t.setxy(this.frame.wheelFrontDx,this.frame.wheelDy),e=this.frame.body.localPointToWorld(t),this.frontWheel.body.position.set(e),e.dispose(),t.dispose(),this.driver.review(this.frame.body.position),this.backWheel.connect(!0),this.frontWheel.connect(!0),this.driver.connectDriver(!0),this.driver.connect(!0),this.driver.activateMirrorParts(!1),this.dead=!1,this._drive=!0,this.boost.restart()},e.prototype.setVisible=function(t){this.frame.graphic.visible=this.backWheel.graphic.visible=this.frontWheel.graphic.visible=t},e.prototype.processFinish=function(t){this.wheelieComplete(),this._drive=!1,this.finished=!0,this.applyTilt(0,0),h.MaxGameCore.instance.processFinish()},e.SMOKE_TIME=.2,e}(r.GameObject);e.CarObject=d},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(1),a=i(6),r=i(2),h=function(t){function e(e){var i=t.call(this)||this;return i.type=e?o.ObjectTypes.LANDSCAPE:o.ObjectTypes.FRONT,i}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null);var e=t.className,i=e.indexOf("_dup");i>=0&&(e=e.substring(0,i));var s=r.AssetsStorage.instance.getByKey(e);if(s){var h=s+"0000";"Dec120000"===h&&(h="Dec12_anim0000"),this.graphic=n.GraphicUtil.game.add.sprite(0,0,n.GraphicUtil.currentAtlass,h),n.Drawing.setTransform(this.graphic,t.params.x,t.params.y,a.default.TO_RAD*t.params.rotation,0,0,t.params.scaleX,t.params.scaleY),0===h.indexOf("Sign")&&"SignPillar0000"!==h&&(this.type=o.ObjectTypes.LANDSCAPE),"SignPillar0000"===h&&(this.type=o.ObjectTypes.LANDSCAPE_BACK);var l=this.graphic;"Dec12_anim0000"===h?(l.animations.add("Dec12_anim",Phaser.Animation.generateFrameNames("Dec12_anim",0,11,"",4)),l.anchor.set(.6,1.1),l.animations.getAnimation("Dec12_anim").play(15,!0)):"SignPillar0000"===h?(l.anchor.set(.5,.5),1===l.scale.y&&l.scale.set(1,1.15)):l.anchor.set(.5)}},e}(n.GameObject);e.DecorObject=h},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.phys.BodyType,o=i(0),a=i(1),r=i(5),h=i(7),l=i(2),c=function(t){function e(e,i){var s=t.call(this)||this;return s.id=e,s.parentKey=i,s}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.type=a.ObjectTypes.LANDSCAPE;var e=l.AssetsStorage.instance,i=this.parentKey+this.id.toString();this.graphic=r.GraphicUtil.createImage(0,0,0,i),this.body=o.NapeUtil.createCircleBody(n.DYNAMIC,h.Filters.NOTHING,!1,4),this.body.userData.graphicEx=this.graphic},e.prototype.restart=function(){this.killTweenLite(),this.body.space=null,this.graphic.visible=!1},e.prototype.release=function(){this.killTweenLite(),t.prototype.release.call(this)},e.prototype.activate=function(t,e,i){this.killTweenLite(),o.NapeUtil.stopBody(this.body),this.tweenLite=r.GraphicUtil.game.add.tween(this),this.tweenLite.to({x:100},5e3),this.tweenLite.start(),this.tweenLite.onComplete.addOnce(this.deactivate,this,0,this),this.body.position=t,this.body.rotation=e,this.body.space=o.NapePhysics.space,this.graphic.visible=!0},e.prototype.killTweenLite=function(){this.tweenLite&&(this.tweenLite.onComplete.removeAll(),this.tweenLite=null)},e.prototype.deactivate=function(t){t.restart()},e}(o.GameObject);e.GlassBlockPart=c},function(t,e,i){"use strict";e.__esModule=!0;var s=nape.geom.GeomPoly,n=nape.geom.GeomPolyList,o=nape.geom.Vec2,a=nape.phys.Body,r=nape.phys.BodyType,h=nape.shape.Polygon,l=i(6),c=i(0),u=function(){function t(){}return t.createGroundBody=function(e){var i=e.params.x,s=e.params.y,n=e.params.vertices,h=n.length,u=NaN,d=NaN,p=null!=e.params.thick?e.params.thick:128,f=e.params.direction*l.default.TO_RAD,y=e.params.directed,g=c.Materials.GROUND,m=new a(r.STATIC,o.weak(i,s));m.cbTypes.add(c.CbTypes.GROUND);var v,b=n[0];v=[b];for(var x,_=1;_=0,_;this.graphic=l.GraphicUtil.createImageWithObj(d,i),this.type=m?a.ObjectTypes.LANDSCAPE_BACK:a.ObjectTypes.LANDSCAPE,o.NapeUtil.setupStartPos(this.body),this.body.userData.graphicEx=this.graphic,i.indexOf("Barrel")>=0&&this.body.cbTypes.add(c.CbTypes.BARREL),0===i.indexOf("Removed")&&this.body.cbTypes.add(c.CbTypes.WOOD),(x||0===i.indexOf("Plank"))&&(this.body.userData.isGround=!0,x&&(this.body.userData.isPT=!0)),!1===t.params.active?this.activeOnStart=!1:this.activeOnStart=!0},e.prototype.restart=function(){o.NapeUtil.stopBody(this.body),o.NapeUtil.resetStartPos(this.body),this.showGraphicOnStart&&(this.isInitial=!0),this.graphic.x=this.body.position.x,this.graphic.y=this.body.position.y,this.graphic.rotation=this.body.rotation,this.activate(this.activeOnStart)},e.prototype.review=function(){this.skipRevive||this.restart()},e.prototype.activate=function(t){void 0===t&&(t=!0);var e,i;if(t){for(this.body.space=d.MaxGameCore.instance.getSpace(),e=this.body.constraints.iterator();e.hasNext();)i=e.next(),i.active=!0;this.activateGraphic&&(this.graphic.visible=!0)}else{for(e=this.body.constraints.iterator();e.hasNext();)i=e.next(),i.active=!1,i.userData.skipActive=!0;this.body.space=null,this.activateGraphic&&(this.isInitial&&this.showGraphicOnStart?this.graphic.visible=!0:this.graphic.visible=!1)}this.isInitial=!1},e.prototype.isActive=function(){return this.activeOnStart},e.CANDIES=["PlankCandy0","PlankCandy1","PlankCandy2","PlankCandy3"],e.CANDIES_COUNT=4,e}(o.GameObject);e.DynamicBodyObject=f},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(t){this.accell=!1,this.brake=!1,this.car=t}return t.prototype.getBoost=function(){return!1},t.prototype.getDrive=function(){return 0},t.prototype.getTilt=function(){return 0},t.prototype.getUseItem=function(){return!1},t.prototype.dispose=function(){this.car=null},t}();e.CarController=s},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(13),i(10);var n=i(3),o=i(19),a=i(17),r=i(30),h=function(t){function e(){var i=t.call(this)||this;return i.name=e.Name,i.bike=null,i.logo=null,i.google_btn=null,i.apple_btn=null,i.wait=null,i.mainParent=null,i}return s(e,t),e.prototype.preload=function(){t.prototype.preload.call(this),this.game.load.onFileComplete.add(this.fileComplete,this);var e=!0;this.preloadSplash()},e.prototype.init=function(){t.prototype.init.call(this),this.mainParent=this.game.add.group(),this.mainParent.x=this.game.width/2,this.mainParent.y=this.game.height/2,this.setPauseViewCar(this.mainParent)},e.prototype.preloadLock=function(){this.game.load.atlas(n.Atlases.Garage,"assets/atlases/x1/"+n.Atlases.Garage+".png","assets/atlases/x1/"+n.Atlases.Garage+".json")},e.prototype.preloadSplash=function(){},e.prototype.createLock=function(){},e.prototype.opensitelockLink=function(){window.open("http://"+o.default.getInstance().getUrlLock(),"_blank")},e.prototype.createSplash=function(){new a.default(this.game,0,r.default.Name)},e.prototype.nextMethod=function(){var t=this.game.add.tween(this.logo);t.to({alpha:0},660,Phaser.Easing.Linear.None,!1,4e3),t.onComplete.add(function(){new a.default(this.game,0,r.default.Name)},this),t.start()},e.prototype.onGoogle=function(){window.open(o.default.getInstance().getUrl(o.default.Google),"_blank")},e.prototype.onApple=function(){window.open(o.default.getInstance().getUrl(o.default.Apple),"_blank")},e.prototype.fileComplete=function(t,e,i,s,n){100===t&&this.game.load.onFileComplete.removeAll()},e.prototype.setPauseViewCar=function(t){null!==this.bike?(this.bike.destroy(),this.bike=this.game.add.group(t)):this.bike=this.game.add.group(t),this.bike.x=0,this.bike.y=10},e.prototype.create=function(){t.prototype.create.call(this);var e=!0;this.createSplash()},e.prototype.resize=function(){var e=1;e=this.game.width/n.Constants.WIDTH,e=e>1?1:e,this.mainParent&&(this.mainParent.x=this.game.width/2,this.mainParent.y=this.game.height/2),this.wait&&this.wait.position.set(this.game.width/2,this.game.height/2),t.prototype.resize.call(this)},e.prototype.shutdown=function(){t.prototype.shutdown.call(this)},e.Name="sitelock",e}(Phaser.State);e.default=h},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(55),i(13),i(10);var n=i(60),o=i(61),a=i(30),r=i(53),h=i(37),l=i(12),c;!function(t){var e=function(t){function e(){var e=t.call(this,{enableDebug:!0,width:720,height:480,renderer:Phaser.AUTO,parent:"content",transparent:!0,antialias:!0,preserveDrawingBuffer:!1,physicsConfig:null,seed:"",state:null,forceSetTimeOut:!1})||this;return e.clearBeforeRender=!1,Phaser.Device.whenReady(function(){l.default.isDesktop=e.device.desktop,e._isPad()&&(l.default.isDesktop=!1),e.stage.disableVisibilityChange=!0;var t=l.default.isDesktop?"click":"touchstart";document.getElementById("content").addEventListener(t,function(t){e.gameResumed(t),window.focus()}),document.getElementById("content").addEventListener("SDK_GAME_START",function(t){e.adsResume()}),document.getElementById("content").addEventListener("SDK_GAME_PAUSE",function(t){e.adsPause()})}),e.state.add("game",{create:e.stateCreator.bind(e),preload:e.statePreloader.bind(e)},!0),e}return s(e,t),e.prototype._isPad=function(){var t=-1!==navigator.userAgent.toLowerCase().indexOf("ipad");return!!(!t&&navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2)||t},e.prototype.statePreloader=function(){},e.prototype.stateCreator=function(){var t=this;this.plugins.add(PhaserSuperStorage.StoragePlugin),this.plugins.add(PhaserCachebuster.CacheBuster),this.storage.forcePromises=!0,this.state.add(o.Boot.Name,o.Boot,!1),this.state.add(a.default.Name,a.default,!1),this.state.add(r.default.Name,r.default,!1),this.state.add(o.Menu.Name,o.Menu,!1),this.state.add(o.Garage.Name,o.Garage,!1),this.state.add(o.ChooseZone.Name,o.ChooseZone,!1),this.state.add(o.Gameplay.Name,o.Gameplay,!1);var e=function(){t.recursiveUpdateText(t.stage)};n.load({custom:{families:["Aller Display","CfCrackBold","Impact"],urls:["assets/css/AllerDisplay.css","assets/css/CfCrackBold.css","assets/css/impact.css"]},active:e,inactive:e}),this.state.start(o.Boot.Name),this.state.remove("game")},e.prototype.recursiveUpdateText=function(t){var e=this;t instanceof Phaser.Text&&(t.dirty=!0),t.children&&t.children.length>0&&t.children.forEach(function(t){e.recursiveUpdateText(t)})},e.prototype.adsResume=function(){this.sound.mute=!1,o.Gameplay.isAdsPause=!1},e.prototype.adsPause=function(){this.sound.mute=!0,o.Gameplay.isAdsPause=!0,h.default.instance.signalPause&&h.default.instance.signalPause.dispatch()},e}(Phaser.Game);t.Game=e}(c||(c={})),new c.Game},function(t,e,i){(function(e){t.exports=e.p2=i(56)}).call(e,i(27))},function(t,e,i){var s,s;!function(e){var i;t.exports=e()}(function(){var t,e,i;return function t(e,i,n){function o(r,h){if(!i[r]){if(!e[r]){var l="function"==typeof s&&s;if(!h&&l)return s(r,!0);if(a)return a(r,!0);throw new Error("Cannot find module '"+r+"'")}var c=i[r]={exports:{}};e[r][0].call(c.exports,function(t){var i=e[r][1][t];return o(i||t)},c,c.exports,t,e,i,n)}return i[r].exports}for(var a="function"==typeof s&&s,r=0;r=0&&h<=1&&l>=0&&l<=1}},{"./Scalar":4}],2:[function(t,e,i){function s(){}e.exports=s,s.area=function(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])},s.left=function(t,e,i){return s.area(t,e,i)>0},s.leftOn=function(t,e,i){return s.area(t,e,i)>=0},s.right=function(t,e,i){return s.area(t,e,i)<0},s.rightOn=function(t,e,i){return s.area(t,e,i)<=0};var n=[],o=[];s.collinear=function(t,e,i,a){if(a){var r=n,h=o;r[0]=e[0]-t[0],r[1]=e[1]-t[1],h[0]=i[0]-e[0],h[1]=i[1]-e[1];var l=r[0]*h[0]+r[1]*h[1],c=Math.sqrt(r[0]*r[0]+r[1]*r[1]),u=Math.sqrt(h[0]*h[0]+h[1]*h[1]);return Math.acos(l/(c*u))t.vertices.length)throw new Error("lol2");if(e<0)throw new Error("lol3");for(var s=e;se[t][0])&&(t=i);a.left(this.at(t-1),this.at(t),this.at(t+1))||this.reverse()},s.prototype.reverse=function(){for(var t=[],e=0,i=this.vertices.length;e!==i;e++)t.push(this.vertices.pop());this.vertices=t},s.prototype.isReflex=function(t){return a.right(this.at(t-1),this.at(t),this.at(t+1))};var h=[],l=[];s.prototype.canSee=function(t,e){var i,s,n=h,r=l;if(a.leftOn(this.at(t+1),this.at(t),this.at(e))&&a.rightOn(this.at(t-1),this.at(t),this.at(e)))return!1;s=a.sqdist(this.at(t),this.at(e));for(var c=0;c!==this.vertices.length;++c)if((c+1)%this.vertices.length!==t&&c!==t&&a.leftOn(this.at(t),this.at(e),this.at(c+1))&&a.rightOn(this.at(t),this.at(e),this.at(c))&&(n[0]=this.at(t),n[1]=this.at(e),r[0]=this.at(c),r[1]=this.at(c+1),i=o.lineInt(n,r),a.sqdist(this.at(t),i)0?this.slice(t):[this]},s.prototype.slice=function(t){if(0==t.length)return[this];if(t instanceof Array&&t.length&&t[0]instanceof Array&&2==t[0].length&&t[0][0]instanceof Array){for(var e=[this],i=0;ir)return t;for(var P=0;Pg&&(g+=this.vertices.length),y=Number.MAX_VALUE,g3&&i>=0;--i)a.collinear(this.at(i-1),this.at(i),this.at(i+1),t)&&(this.vertices.splice(i%this.vertices.length,1),i--,e++);return e}},{"./Line":1,"./Point":2,"./Scalar":4}],4:[function(t,e,i){function s(){}e.exports=s,s.eq=function(t,e,i){return i=i||0,Math.abs(t-e) (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(t,e,i){function s(t){this.lowerBound=n.create(),t&&t.lowerBound&&n.copy(this.lowerBound,t.lowerBound),this.upperBound=n.create(),t&&t.upperBound&&n.copy(this.upperBound,t.upperBound)}var n=t("../math/vec2"),o=t("../utils/Utils");e.exports=s;var a=n.create();s.prototype.setFromPoints=function(t,e,i,s){var o=this.lowerBound,r=this.upperBound;"number"!=typeof i&&(i=0),0!==i?n.rotate(o,t[0],i):n.copy(o,t[0]),n.copy(r,o);for(var h=Math.cos(i),l=Math.sin(i),c=1;cr[f]&&(r[f]=u[f]),u[f]i&&(this.lowerBound[e]=i);var s=t.upperBound[e];this.upperBound[e]l?-1:h}},{"../math/vec2":30,"../utils/Utils":57}],8:[function(t,e,i){function s(t){this.type=t,this.result=[],this.world=null,this.boundingVolumeType=s.AABB}var n=t("../math/vec2"),o=t("../objects/Body");e.exports=s,s.AABB=1,s.BOUNDING_CIRCLE=2,s.prototype.setWorld=function(t){this.world=t},s.prototype.getCollisionPairs=function(t){};var a=n.create();s.boundingRadiusCheck=function(t,e){n.sub(a,t.position,e.position);var i=n.squaredLength(a),s=t.boundingRadius+e.boundingRadius;return i<=s*s},s.aabbCheck=function(t,e){return t.getAABB().overlaps(e.getAABB())},s.prototype.boundingVolumeCheck=function(t,e){var i;switch(this.boundingVolumeType){case s.BOUNDING_CIRCLE:i=s.boundingRadiusCheck(t,e);break;case s.AABB:i=s.aabbCheck(t,e);break;default:throw new Error("Bounding volume type not recognized: "+this.boundingVolumeType)}return i},s.canCollide=function(t,e){var i=o.KINEMATIC,s=o.STATIC;return(t.type!==s||e.type!==s)&&(!(t.type===i&&e.type===s||t.type===s&&e.type===i)&&((t.type!==i||e.type!==i)&&((t.sleepState!==o.SLEEPING||e.sleepState!==o.SLEEPING)&&!(t.sleepState===o.SLEEPING&&e.type===s||e.sleepState===o.SLEEPING&&t.type===s))))},s.NAIVE=1,s.SAP=2},{"../math/vec2":30,"../objects/Body":31}],9:[function(t,e,i){function s(){h.call(this,h.NAIVE)}var n=t("../shapes/Circle"),o=t("../shapes/Plane"),a=t("../shapes/Shape"),r=t("../shapes/Particle"),h=t("../collision/Broadphase"),l=t("../math/vec2");e.exports=s,s.prototype=new h,s.prototype.constructor=s,s.prototype.getCollisionPairs=function(t){var e=t.bodies,i=this.result;i.length=0;for(var s=0,n=e.length;s!==n;s++)for(var o=e[s],a=0;az&&q0)for(var Q=0;QMath.pow(y,2))return 0;if(u)return!0;var g=this.createContactEquation(t,n,e,o);return r(g.normalA,l,i),a.normalize(g.normalA,g.normalA),a.scale(g.contactPointA,g.normalA,d),a.scale(g.contactPointB,g.normalA,-p),h(g.contactPointA,g.contactPointA,i),r(g.contactPointA,g.contactPointA,t.position),h(g.contactPointB,g.contactPointB,l),r(g.contactPointB,g.contactPointB,n.position),this.contactEquations.push(g),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(g)),1},s.prototype[b.PLANE|b.CONVEX]=s.prototype[b.PLANE|b.BOX]=s.prototype.planeConvex=function(t,e,i,s,n,o,c,u,d){var p=P,f=C,y=T,g=0;a.rotate(f,w,s);for(var m=0;m!==o.vertices.length;m++){var v=o.vertices[m];if(a.rotate(p,v,u),h(p,p,c),r(y,p,i),l(y,f)<=0){if(d)return!0;g++;var b=this.createContactEquation(t,n,e,o);r(y,p,i),a.copy(b.normalA,f);var x=l(y,b.normalA);a.scale(y,b.normalA,x),r(b.contactPointB,p,n.position),r(b.contactPointA,p,y),r(b.contactPointA,b.contactPointA,t.position),this.contactEquations.push(b),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(b))}}return this.enableFrictionReduction&&this.enableFriction&&g&&this.frictionEquations.push(this.createFrictionFromAverage(g)),g},s.prototype[b.PARTICLE|b.PLANE]=s.prototype.particlePlane=function(t,e,i,s,n,o,h,c,u){var d=P,p=C;c=c||0,r(d,i,h),a.rotate(p,w,c);var f=l(d,p);if(f>0)return 0;if(u)return!0;var y=this.createContactEquation(n,t,o,e);return a.copy(y.normalA,p),a.scale(d,y.normalA,f),r(y.contactPointA,i,d),r(y.contactPointA,y.contactPointA,n.position),r(y.contactPointB,i,t.position),this.contactEquations.push(y),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(y)),1},s.prototype[b.CIRCLE|b.PARTICLE]=s.prototype.circleParticle=function(t,e,i,s,n,o,l,c,u){var d=P;if(r(d,l,i),a.squaredLength(d)>Math.pow(e.radius,2))return 0;if(u)return!0;var p=this.createContactEquation(t,n,e,o);return a.copy(p.normalA,d),a.normalize(p.normalA,p.normalA),a.scale(p.contactPointA,p.normalA,e.radius),h(p.contactPointA,p.contactPointA,i),r(p.contactPointA,p.contactPointA,t.position),r(p.contactPointB,l,n.position),this.contactEquations.push(p),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(p)),1};var $=new m({radius:1}),tt=a.create(),et=a.create(),it=a.create();s.prototype[b.PLANE|b.CAPSULE]=s.prototype.planeCapsule=function(t,e,i,s,n,o,r,l,c){var u=tt,d=et,p=$,f=it;a.set(u,-o.length/2,0),a.rotate(u,u,l),h(u,u,r),a.set(d,o.length/2,0),a.rotate(d,d,l),h(d,d,r),p.radius=o.radius;var y;this.enableFrictionReduction&&(y=this.enableFriction,this.enableFriction=!1);var g=this.circlePlane(n,p,u,0,t,e,i,s,c),m=this.circlePlane(n,p,d,0,t,e,i,s,c);if(this.enableFrictionReduction&&(this.enableFriction=y),c)return g||m;var v=g+m;return this.enableFrictionReduction&&v&&this.frictionEquations.push(this.createFrictionFromAverage(v)),v},s.prototype[b.CIRCLE|b.PLANE]=s.prototype.circlePlane=function(t,e,i,s,n,o,c,u,d){var p=t,f=e,y=i,g=n,m=o,v=c,b=u;b=b||0;var x=P,_=C,S=T;r(x,y,v),a.rotate(_,w,b);var A=l(_,x);if(A>f.radius)return 0;if(d)return!0;var E=this.createContactEquation(g,p,o,e);return a.copy(E.normalA,_),a.scale(E.contactPointB,E.normalA,-f.radius),h(E.contactPointB,E.contactPointB,y),r(E.contactPointB,E.contactPointB,p.position),a.scale(S,E.normalA,A),r(E.contactPointA,x,S),h(E.contactPointA,E.contactPointA,v),r(E.contactPointA,E.contactPointA,g.position),this.contactEquations.push(E),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(E)),1},s.prototype[b.CONVEX]=s.prototype[b.CONVEX|b.BOX]=s.prototype[b.BOX]=s.prototype.convexConvex=function(t,e,i,n,o,c,u,d,p,f){var y=P,g=C,m=T,v=S,b=A,x=E,_=I,w=M,R=O,B=0,f="number"==typeof f?f:0;if(!s.findSeparatingAxis(e,i,n,c,u,d,y))return 0;r(w,u,i),l(y,w)>0&&a.scale(y,y,-1);var L=s.getClosestEdge(e,n,y,!0),k=s.getClosestEdge(c,d,y);if(-1===L||-1===k)return 0;for(var D=0;D<2;D++){var F=L,G=k,U=e,N=c,j=i,W=u,X=n,H=d,V=t,Y=o;if(0===D){var q;q=F,F=G,G=q,q=U,U=N,N=q,q=j,j=W,W=q,q=X,X=H,H=q,q=V,V=Y,Y=q}for(var z=G;z=3){if(p)return!0;var et=this.createContactEquation(V,Y,U,N);B++;var Q=U.vertices[F%U.vertices.length],$=U.vertices[(F+1)%U.vertices.length];a.rotate(m,Q,X),a.rotate(v,$,X),h(m,m,j),h(v,v,j),r(b,v,m),a.rotate90cw(et.normalA,b),a.normalize(et.normalA,et.normalA),r(w,g,m);var tt=l(et.normalA,w);a.scale(_,et.normalA,tt),r(et.contactPointA,g,j),r(et.contactPointA,et.contactPointA,_),h(et.contactPointA,et.contactPointA,j),r(et.contactPointA,et.contactPointA,V.position),r(et.contactPointB,g,W),h(et.contactPointB,et.contactPointB,W),r(et.contactPointB,et.contactPointB,Y.position),this.contactEquations.push(et),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(et))}}}return this.enableFrictionReduction&&this.enableFriction&&B&&this.frictionEquations.push(this.createFrictionFromAverage(B)),B};var st=a.fromValues(0,0);s.projectConvexOntoAxis=function(t,e,i,s,n){var o=null,r=null,h,c,u=st;a.rotate(u,s,-i);for(var d=0;do)&&(o=c),(null===r||co){var p=r;r=o,o=p}var f=l(e,s);a.set(n,r+f,o+f)};var nt=a.fromValues(0,0),ot=a.fromValues(0,0),at=a.fromValues(0,0),rt=a.fromValues(0,0),ht=a.fromValues(0,0),lt=a.fromValues(0,0);s.findSeparatingAxis=function(t,e,i,n,o,h,l){var c=null,u=!1,d=!1,p=nt,f=ot,y=at,g=rt,m=ht,v=lt;if(t instanceof _&&n instanceof _)for(var b=0;2!==b;b++){var x=t,w=i;1===b&&(x=n,w=h);for(var P=0;2!==P;P++){0===P?a.set(g,0,1):1===P&&a.set(g,1,0),0!==w&&a.rotate(g,g,w),s.projectConvexOntoAxis(t,e,i,g,m),s.projectConvexOntoAxis(n,o,h,g,v);var C=m,T=v,S=!1;m[0]>v[0]&&(T=m,C=v,S=!0);var A=T[0]-C[1];u=A<=0,(null===c||A>c)&&(a.copy(l,g),c=A,d=u)}}else for(var b=0;2!==b;b++){var x=t,w=i;1===b&&(x=n,w=h);for(var P=0;P!==x.vertices.length;P++){a.rotate(f,x.vertices[P],w),a.rotate(y,x.vertices[(P+1)%x.vertices.length],w),r(p,y,f),a.rotate90cw(g,p),a.normalize(g,g),s.projectConvexOntoAxis(t,e,i,g,m),s.projectConvexOntoAxis(n,o,h,g,v);var C=m,T=v,S=!1;m[0]>v[0]&&(T=m,C=v,S=!0);var A=T[0]-C[1];u=A<=0,(null===c||A>c)&&(a.copy(l,g),c=A,d=u)}}return d};var ct=a.fromValues(0,0),ut=a.fromValues(0,0),dt=a.fromValues(0,0);s.getClosestEdge=function(t,e,i,s){var n=ct,o=ut,h=dt;a.rotate(n,i,-e),s&&a.scale(n,n,-1);for(var c=-1,u=t.vertices.length,d=-1,p=0;p!==u;p++){r(o,t.vertices[(p+1)%u],t.vertices[p%u]),a.rotate90cw(h,o),a.normalize(h,h);var f=l(h,n);(-1===c||f>d)&&(c=p%u,d=f)}return c};var pt=a.create(),ft=a.create(),yt=a.create(),gt=a.create(),mt=a.create(),vt=a.create(),bt=a.create();s.prototype[b.CIRCLE|b.HEIGHTFIELD]=s.prototype.circleHeightfield=function(t,e,i,s,n,o,l,c,u,d){var p=o.heights,d=d||e.radius,f=o.elementWidth,y=ft,g=pt,m=mt,v=bt,b=vt,x=yt,_=gt,w=Math.floor((i[0]-d-l[0])/f),P=Math.ceil((i[0]+d-l[0])/f);w<0&&(w=0),P>=p.length&&(P=p.length-1);for(var C=p[w],T=p[P],S=w;SC&&(C=p[S]);if(i[1]-d>C)return!u&&0;for(var A=!1,S=w;S=x[0]&&g[0]<_[0]&&E<=0){if(u)return!0;A=!0,a.scale(y,b,-E),a.add(m,g,y),a.copy(v,b);var I=this.createContactEquation(n,t,o,e);a.copy(I.normalA,v),a.scale(I.contactPointB,I.normalA,-d),h(I.contactPointB,I.contactPointB,i),r(I.contactPointB,I.contactPointB,t.position),a.copy(I.contactPointA,m),a.sub(I.contactPointA,I.contactPointA,n.position),this.contactEquations.push(I),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(I))}}if(A=!1,d>0)for(var S=w;S<=P;S++)if(a.set(x,S*f,p[S]),a.add(x,x,l),a.sub(y,i,x),a.squaredLength(y)=c.length&&(m=c.length-1);for(var v=c[g],b=c[m],x=g;xv&&(v=c[x]);if(t.aabb.lowerBound[1]>v)return!l&&0;for(var _=!1,w=0,x=g;x=0||o.containsPoint(this.from))&&this.intersectBody(t,n)}};var l=o.create();s.prototype.intersectBody=function(t,e){var i=this.checkCollisionResponse;if(!i||e.collisionResponse)for(var s=l,n=0,a=e.shapes.length;ne.boundingRadius*e.boundingRadius||(this._currentBody=o,this._currentShape=e,e.raycast(t,this,s,i),this._currentBody=this._currentShape=null)},s.prototype.getAABB=function(t){var e=this.to,i=this.from;o.set(t.lowerBound,Math.min(e[0],i[0]),Math.min(e[1],i[1])),o.set(t.upperBound,Math.max(e[0],i[0]),Math.max(e[1],i[1]))};var c=o.create();s.prototype.reportIntersection=function(t,e,i,n){var a=this.from,r=this.to,h=this._currentShape,l=this._currentBody;if(!(this.skipBackfaces&&o.dot(i,this.direction)>0))switch(this.mode){case s.ALL:t.set(i,h,l,e,n),this.callback(t);break;case s.CLOSEST:(e=0&&!(t[o].aabb.lowerBound[e]<=n.aabb.lowerBound[e]);o--)t[o+1]=t[o];t[o+1]=n}return t},s.prototype.sortList=function(){var t=this.axisList,e=this.axisIndex;s.sortAxisList(t,e)},s.prototype.getCollisionPairs=function(t){var e=this.axisList,i=this.result,s=this.axisIndex;i.length=0;for(var n=e.length;n--;){var a=e[n];a.aabbNeedsUpdate&&a.updateAABB()}this.sortList();for(var r=0,h=0|e.length;r!==h;r++)for(var l=e[r],c=r+1;cthis.upperLimit&&(r.maxForce=0,r.minForce=-this.maxForce,this.distance=this.upperLimit,d=!0),this.lowerLimitEnabled&&this.positioni)r.scale(n.normalA,l,-1),r.sub(n.contactPointA,c,a.position),r.sub(n.contactPointB,u,h.position),r.scale(f,l,i),r.add(n.contactPointA,n.contactPointA,f),-1===t.indexOf(n)&&t.push(n);else{var x=t.indexOf(n);-1!==x&&t.splice(x,1)}if(this.lowerLimitEnabled&&vf)g.angle=f,-1===n.indexOf(g)&&n.push(g);else{var b=n.indexOf(g);-1!==b&&n.splice(b,1)}if(this.lowerLimitEnabled&&v>1;if(e<3)return[];for(var i=[],n=[],o=0;o3;){var r=n[(o+0)%a],h=n[(o+1)%a],l=n[(o+2)%a],c=t[2*r],u=t[2*r+1],d=t[2*h],p=t[2*h+1],f=t[2*l],y=t[2*l+1],g=!1;if(s._convex(c,u,d,p,f,y)){g=!0;for(var m=0;m3*a)break}return i.push(n[0],n[1],n[2]),i},s._PointInTriangle=function(t,e,i,s,n,o,a,r){var h=a-i,l=r-s,c=n-i,u=o-s,d=t-i,p=e-s,f=h*h+l*l,y=h*c+l*u,g=h*d+l*p,m=c*c+u*u,v=c*d+u*p,b=1/(f*m-y*y),x=(m*g-y*v)*b,_=(f*v-y*g)*b;return x>=0&&_>=0&&x+_<1},s._convex=function(t,e,i,s,n,o){return(e-s)*(n-i)+(i-t)*(o-s)>=0},e.exports=s},{}],30:[function(t,e,i){var s=e.exports={},n=t("../utils/Utils");s.crossLength=function(t,e){return t[0]*e[1]-t[1]*e[0]},s.crossVZ=function(t,e,i){return s.rotate(t,e,-Math.PI/2),s.scale(t,t,i),t},s.crossZV=function(t,e,i){return s.rotate(t,i,Math.PI/2),s.scale(t,t,e),t},s.rotate=function(t,e,i){if(0!==i){var s=Math.cos(i),n=Math.sin(i),o=e[0],a=e[1];t[0]=s*o-n*a,t[1]=n*o+s*a}else t[0]=e[0],t[1]=e[1]},s.rotate90cw=function(t,e){var i=e[0],s=e[1];t[0]=s,t[1]=-i},s.toLocalFrame=function(t,e,i,n){s.copy(t,e),s.sub(t,t,i),s.rotate(t,t,-n)},s.toGlobalFrame=function(t,e,i,n){s.copy(t,e),s.rotate(t,t,n),s.add(t,t,i)},s.vectorToLocalFrame=function(t,e,i){s.rotate(t,e,-i)},s.vectorToGlobalFrame=function(t,e,i){s.rotate(t,e,i)},s.centroid=function(t,e,i,n){return s.add(t,e,i),s.add(t,t,n),s.scale(t,t,1/3),t},s.create=function(){var t=new n.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},s.clone=function(t){var e=new n.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},s.fromValues=function(t,e){var i=new n.ARRAY_TYPE(2);return i[0]=t,i[1]=e,i},s.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},s.set=function(t,e,i){return t[0]=e,t[1]=i,t},s.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},s.subtract=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},s.sub=s.subtract,s.multiply=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},s.mul=s.multiply,s.divide=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},s.div=s.divide,s.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},s.distance=function(t,e){var i=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(i*i+s*s)},s.dist=s.distance,s.squaredDistance=function(t,e){var i=e[0]-t[0],s=e[1]-t[1];return i*i+s*s},s.sqrDist=s.squaredDistance,s.length=function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},s.len=s.length,s.squaredLength=function(t){var e=t[0],i=t[1];return e*e+i*i},s.sqrLen=s.squaredLength,s.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},s.normalize=function(t,e){var i=e[0],s=e[1],n=i*i+s*s;return n>0&&(n=1/Math.sqrt(n),t[0]=e[0]*n,t[1]=e[1]*n),t},s.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},s.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},s.lerp=function(t,e,i,s){var n=e[0],o=e[1];return t[0]=n+s*(i[0]-n),t[1]=o+s*(i[1]-o),t},s.reflect=function(t,e,i){var s=e[0]*i[0]+e[1]*i[1];t[0]=e[0]-2*i[0]*s,t[1]=e[1]-2*i[1]*s},s.getLineSegmentsIntersection=function(t,e,i,n,o){var a=s.getLineSegmentsIntersectionFraction(e,i,n,o);return!(a<0)&&(t[0]=e[0]+a*(i[0]-e[0]),t[1]=e[1]+a*(i[1]-e[1]),!0)},s.getLineSegmentsIntersectionFraction=function(t,e,i,s){var n=e[0]-t[0],o=e[1]-t[1],a=s[0]-i[0],r=s[1]-i[1],h,l;return h=(-o*(t[0]-i[0])+n*(t[1]-i[1]))/(-a*o+n*r),l=(a*(t[1]-i[1])-r*(t[0]-i[0]))/(-a*o+n*r),h>=0&&h<=1&&l>=0&&l<=1?l:-1}},{"../utils/Utils":57}],31:[function(t,e,i){function s(t){t=t||{},c.call(this),this.id=t.id||++s._idCounter,this.world=null,this.shapes=[],this.mass=t.mass||0,this.invMass=0,this.inertia=0,this.invInertia=0,this.invMassSolve=0,this.invInertiaSolve=0,this.fixedRotation=!!t.fixedRotation,this.fixedX=!!t.fixedX,this.fixedY=!!t.fixedY,this.massMultiplier=n.create(),this.position=n.fromValues(0,0),t.position&&n.copy(this.position,t.position),this.interpolatedPosition=n.fromValues(0,0),this.interpolatedAngle=0,this.previousPosition=n.fromValues(0,0),this.previousAngle=0,this.velocity=n.fromValues(0,0),t.velocity&&n.copy(this.velocity,t.velocity),this.vlambda=n.fromValues(0,0),this.wlambda=0,this.angle=t.angle||0,this.angularVelocity=t.angularVelocity||0,this.force=n.create(),t.force&&n.copy(this.force,t.force),this.angularForce=t.angularForce||0,this.damping="number"==typeof t.damping?t.damping:.1,this.angularDamping="number"==typeof t.angularDamping?t.angularDamping:.1,this.type=s.STATIC,void 0!==t.type?this.type=t.type:t.mass?this.type=s.DYNAMIC:this.type=s.STATIC,this.boundingRadius=0,this.aabb=new l,this.aabbNeedsUpdate=!0,this.allowSleep=void 0===t.allowSleep||t.allowSleep,this.wantsToSleep=!1,this.sleepState=s.AWAKE,this.sleepSpeedLimit=void 0!==t.sleepSpeedLimit?t.sleepSpeedLimit:.2,this.sleepTimeLimit=void 0!==t.sleepTimeLimit?t.sleepTimeLimit:1,this.gravityScale=void 0!==t.gravityScale?t.gravityScale:1,this.collisionResponse=void 0===t.collisionResponse||t.collisionResponse,this.idleTime=0,this.timeLastSleepy=0,this.ccdSpeedThreshold=void 0!==t.ccdSpeedThreshold?t.ccdSpeedThreshold:-1,this.ccdIterations=void 0!==t.ccdIterations?t.ccdIterations:10,this.concavePath=null,this._wakeUpAfterNarrowphase=!1,this.updateMassProperties()}var n=t("../math/vec2"),o=t("poly-decomp"),a=t("../shapes/Convex"),r=t("../collision/RaycastResult"),h=t("../collision/Ray"),l=t("../collision/AABB"),c=t("../events/EventEmitter");e.exports=s,s.prototype=new c,s.prototype.constructor=s,s._idCounter=0,s.prototype.updateSolveMassProperties=function(){this.sleepState===s.SLEEPING||this.type===s.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve=0):(this.invMassSolve=this.invMass,this.invInertiaSolve=this.invInertia)},s.prototype.setDensity=function(t){var e=this.getArea();this.mass=e*t,this.updateMassProperties()},s.prototype.getArea=function(){for(var t=0,e=0;ei&&(i=a+r)}this.boundingRadius=i},s.prototype.addShape=function(t,e,i){if(t.body)throw new Error("A shape can only be added to one body.");t.body=this,e?n.copy(t.position,e):n.set(t.position,0,0),t.angle=i||0,this.shapes.push(t),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},s.prototype.removeShape=function(t){var e=this.shapes.indexOf(t);return-1!==e&&(this.shapes.splice(e,1),this.aabbNeedsUpdate=!0,t.body=null,!0)},s.prototype.updateMassProperties=function(){if(this.type===s.STATIC||this.type===s.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var t=this.shapes,e=t.length,i=this.mass/e,o=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var a=0;a0?1/o:0}this.invMass=1/this.mass,n.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}};var p=n.create();s.prototype.applyForce=function(t,e){if(n.add(this.force,this.force,t),e){var i=n.crossLength(e,t);this.angularForce+=i}};var f=n.create(),y=n.create(),g=n.create();s.prototype.applyForceLocal=function(t,e){e=e||g;var i=f,s=y;this.vectorToWorldFrame(i,t),this.vectorToWorldFrame(s,e),this.applyForce(i,s)};var m=n.create();s.prototype.applyImpulse=function(t,e){if(this.type===s.DYNAMIC){var i=m;if(n.scale(i,t,this.invMass),n.multiply(i,this.massMultiplier,i),n.add(this.velocity,i,this.velocity),e){var o=n.crossLength(e,t);o*=this.invInertia,this.angularVelocity+=o}}};var v=n.create(),b=n.create(),x=n.create();s.prototype.applyImpulseLocal=function(t,e){e=e||x;var i=v,s=b;this.vectorToWorldFrame(i,t),this.vectorToWorldFrame(s,e),this.applyImpulse(i,s)},s.prototype.toLocalFrame=function(t,e){n.toLocalFrame(t,e,this.position,this.angle)},s.prototype.toWorldFrame=function(t,e){n.toGlobalFrame(t,e,this.position,this.angle)},s.prototype.vectorToLocalFrame=function(t,e){n.vectorToLocalFrame(t,e,this.angle)},s.prototype.vectorToWorldFrame=function(t,e){n.vectorToGlobalFrame(t,e,this.angle)},s.prototype.fromPolygon=function(t,e){e=e||{};for(var i=this.shapes.length;i>=0;--i)this.removeShape(this.shapes[i]);var s=new o.Polygon;if(s.vertices=t,s.makeCCW(),"number"==typeof e.removeCollinearPoints&&s.removeCollinearPoints(e.removeCollinearPoints),void 0===e.skipSimpleCheck&&!s.isSimple())return!1;this.concavePath=s.vertices.slice(0);for(var i=0;i=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=s.AWAKE):(this.idleTime+=i,this.sleepState=s.SLEEPY),this.idleTime>this.sleepTimeLimit&&(e?this.wantsToSleep=!0:this.sleep())}},s.prototype.overlaps=function(t){return this.world.overlapKeeper.bodiesAreOverlapping(this,t)};var T=n.create(),S=n.create();s.prototype.integrate=function(t){var e=this.invMass,i=this.force,s=this.position,o=this.velocity;n.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*t),n.scale(T,i,t*e),n.multiply(T,this.massMultiplier,T),n.add(o,T,o),this.integrateToTimeOfImpact(t)||(n.scale(S,o,t),n.add(s,s,S),this.fixedRotation||(this.angle+=this.angularVelocity*t)),this.aabbNeedsUpdate=!0};var A=new r,E=new h({mode:h.ALL}),I=n.create(),M=n.create(),O=n.create(),R=n.create();s.prototype.integrateToTimeOfImpact=function(t){if(this.ccdSpeedThreshold<0||n.squaredLength(this.velocity)=l&&h=0&&(o.rotate(f,u,s),o.scale(f,f,2*v-1),e.reportIntersection(t,x,f,-1),t.shouldStop(e)))return}for(var _=Math.pow(this.radius,2)+Math.pow(m,2),v=0;v<2;v++){o.set(y,m*(2*v-1),0),o.toGlobalFrame(y,y,i,s);var w=Math.pow(a[0]-n[0],2)+Math.pow(a[1]-n[1],2),P=2*((a[0]-n[0])*(n[0]-y[0])+(a[1]-n[1])*(n[1]-y[1])),C=Math.pow(n[0]-y[0],2)+Math.pow(n[1]-y[1],2)-Math.pow(this.radius,2),x=Math.pow(P,2)-4*w*C;if(!(x<0))if(0===x){if(o.lerp(p,n,a,x),o.squaredDistance(p,i)>_&&(o.sub(f,p,y),o.normalize(f,f),e.reportIntersection(t,x,f,-1),t.shouldStop(e)))return}else{var T=Math.sqrt(x),S=1/(2*w),A=(-P-T)*S,E=(-P+T)*S;if(A>=0&&A<=1&&(o.lerp(p,n,a,A),o.squaredDistance(p,i)>_&&(o.sub(f,p,y),o.normalize(f,f),e.reportIntersection(t,A,f,-1),t.shouldStop(e))))return;if(E>=0&&E<=1&&(o.lerp(p,n,a,E),o.squaredDistance(p,i)>_&&(o.sub(f,p,y),o.normalize(f,f),e.reportIntersection(t,E,f,-1),t.shouldStop(e))))return}}}},{"../math/vec2":30,"./Shape":45}],39:[function(t,e,i){function s(t){"number"==typeof arguments[0]&&(t={radius:arguments[0]}),t=t||{},this.radius=t.radius||1,t.type=n.CIRCLE,n.call(this,t)}var n=t("./Shape"),o=t("../math/vec2");e.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(t){var e=this.radius;return t*e*e/2},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},s.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},s.prototype.computeAABB=function(t,e,i){var s=this.radius;o.set(t.upperBound,s,s),o.set(t.lowerBound,-s,-s),e&&(o.add(t.lowerBound,t.lowerBound,e),o.add(t.upperBound,t.upperBound,e))};var a=o.create(),r=o.create();s.prototype.raycast=function(t,e,i,s){var n=e.from,h=e.to,l=this.radius,c=Math.pow(h[0]-n[0],2)+Math.pow(h[1]-n[1],2),u=2*((h[0]-n[0])*(n[0]-i[0])+(h[1]-n[1])*(n[1]-i[1])),d=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2)-Math.pow(l,2),p=Math.pow(u,2)-4*c*d,f=a,y=r;if(!(p<0))if(0===p)o.lerp(f,n,h,p),o.sub(y,f,i),o.normalize(y,y),e.reportIntersection(t,p,y,-1);else{var g=Math.sqrt(p),m=1/(2*c),v=(-u-g)*m,b=(-u+g)*m;if(v>=0&&v<=1&&(o.lerp(f,n,h,v),o.sub(y,f,i),o.normalize(y,y),e.reportIntersection(t,v,y,-1),t.shouldStop(e)))return;b>=0&&b<=1&&(o.lerp(f,n,h,b),o.sub(y,f,i),o.normalize(y,y),e.reportIntersection(t,b,y,-1))}}},{"../math/vec2":30,"./Shape":45}],40:[function(t,e,i){function s(t){Array.isArray(arguments[0])&&(t={vertices:arguments[0],axes:arguments[1]}),t=t||{},this.vertices=[];for(var e=void 0!==t.vertices?t.vertices:[],i=0;ii)&&(i=a),(null===s||ai){var l=s;s=i,i=l}o.set(e,s,i)},s.prototype.projectOntoWorldAxis=function(t,e,i,s){var n=l;this.projectOntoLocalAxis(t,s),0!==i?o.rotate(n,t,i):n=t;var a=o.dot(e,n);o.set(s,s[0]+a,s[1]+a)},s.prototype.updateTriangles=function(){this.triangles.length=0;for(var t=[],e=0;ee&&(e=s)}this.boundingRadius=Math.sqrt(e)},s.triangleArea=function(t,e,i){return.5*((e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1]))},s.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var t=this.triangles,e=this.vertices,i=0;i!==t.length;i++){var n=t[i],o=e[n[0]],a=e[n[1]],r=e[n[2]],h=s.triangleArea(o,a,r);this.area+=h}},s.prototype.computeAABB=function(t,e,i){t.setFromPoints(this.vertices,e,i,0)};var b=o.create(),x=o.create(),_=o.create();s.prototype.raycast=function(t,e,i,s){var n=b,a=x,r=_,h=this.vertices;o.toLocalFrame(n,e.from,i,s),o.toLocalFrame(a,e.to,i,s);for(var l=h.length,c=0;c=0&&(o.sub(r,d,u),o.rotate(r,r,-Math.PI/2+s),o.normalize(r,r),e.reportIntersection(t,p,r,c))}}},{"../math/polyk":29,"../math/vec2":30,"./Shape":45,"poly-decomp":5}],41:[function(t,e,i){function s(t){if(Array.isArray(arguments[0])&&(t={heights:arguments[0]},"object"==typeof arguments[1]))for(var e in arguments[1])t[e]=arguments[1][e];t=t||{},this.heights=t.heights?t.heights.slice(0):[],this.maxValue=t.maxValue||null,this.minValue=t.minValue||null,this.elementWidth=t.elementWidth||.1,void 0!==t.maxValue&&void 0!==t.minValue||this.updateMaxMinValues(),t.type=o.HEIGHTFIELD,o.call(this,t)}function n(t,e,i,s,n){var o,a,r,h;o=i[0]-e[0],a=i[1]-e[1],r=n[0]-s[0],h=n[1]-s[1];var l,c;if(l=(-a*(e[0]-s[0])+o*(e[1]-s[1]))/(-r*a+o*h),c=(r*(e[1]-s[1])-h*(e[0]-s[0]))/(-r*a+o*h),l>=0&&l<=1&&c>=0&&c<=1){var u=e[0]+c*o,d=e[1]+c*a;return t[0]=u,t[1]=d,c}return-1}var o=t("./Shape"),a=t("../math/vec2"),r=t("../utils/Utils");e.exports=s,s.prototype=new o,s.prototype.constructor=s,s.prototype.updateMaxMinValues=function(){for(var t=this.heights,e=t[0],i=t[0],s=0;s!==t.length;s++){var n=t[s];n>e&&(e=n),n_){var w=x;x=_,_=w}for(var P=0;P=0&&(a.sub(y,m,g),a.rotate(y,y,s+Math.PI/2),a.normalize(y,y),e.reportIntersection(t,C,y,-1),t.shouldStop(e)))return}}},{"../math/vec2":30,"../utils/Utils":57,"./Shape":45}],42:[function(t,e,i){function s(t){"number"==typeof arguments[0]&&(t={length:arguments[0]}),t=t||{},this.length=t.length||1,t.type=n.LINE,n.call(this,t)}var n=t("./Shape"),o=t("../math/vec2");e.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(t){return t*Math.pow(this.length,2)/12},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var a=[o.create(),o.create()];s.prototype.computeAABB=function(t,e,i){var s=this.length/2;o.set(a[0],-s,0),o.set(a[1],s,0),t.setFromPoints(a,e,i,0)};var r=o.create(),h=o.create(),l=o.create(),c=o.create(),u=o.fromValues(0,1);s.prototype.raycast=function(t,e,i,s){var n=e.from,a=e.to,r=l,d=c,p=this.length/2;o.set(r,-p,0),o.set(d,p,0),o.toGlobalFrame(r,r,i,s),o.toGlobalFrame(d,d,i,s);var f=o.getLineSegmentsIntersectionFraction(r,d,n,a);if(f>=0){var y=h;o.rotate(y,u,s),e.reportIntersection(t,f,y,-1)}}},{"../math/vec2":30,"./Shape":45}],43:[function(t,e,i){function s(t){t=t||{},t.type=n.PARTICLE,n.call(this,t)}var n=t("./Shape"),o=t("../math/vec2");e.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(t){return 0},s.prototype.updateBoundingRadius=function(){this.boundingRadius=0},s.prototype.computeAABB=function(t,e,i){o.copy(t.lowerBound,e),o.copy(t.upperBound,e)}},{"../math/vec2":30,"./Shape":45}],44:[function(t,e,i){function s(t){t=t||{},t.type=n.PLANE,n.call(this,t)}var n=t("./Shape"),o=t("../math/vec2"),a=t("../utils/Utils");e.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(t){return 0},s.prototype.updateBoundingRadius=function(){this.boundingRadius=Number.MAX_VALUE},s.prototype.computeAABB=function(t,e,i){var s=i%(2*Math.PI),n=o.set,a=Number.MAX_VALUE,r=t.lowerBound,h=t.upperBound;0===s?(n(r,-a,-a),n(h,a,0)):s===Math.PI/2?(n(r,0,-a),n(h,a,a)):s===Math.PI?(n(r,-a,0),n(h,a,a)):s===3*Math.PI/2?(n(r,-a,-a),n(h,0,a)):(n(r,-a,-a),n(h,a,a)),o.add(r,r,e),o.add(h,h,e)},s.prototype.updateArea=function(){this.area=Number.MAX_VALUE};var r=o.create(),h=o.create(),l=o.create(),c=o.create(),u=o.create();s.prototype.raycast=function(t,e,i,s){var n=e.from,a=e.to,d=e.direction,p=r,f=h,y=l,g=c,m=u;o.set(g,0,1),o.rotate(g,g,s),o.sub(m,n,i);var v=o.dot(m,g);if(o.sub(m,a,i),!(v*o.dot(m,g)>0||o.squaredDistance(n,a)p*r&&(y=p*r-u),o[t]+=y,e.addToWlambda(y),y}},{"../equations/FrictionEquation":23,"../math/vec2":30,"../utils/Utils":57,"./Solver":47}],47:[function(t,e,i){function s(t,e){t=t||{},o.call(this),this.type=e,this.equations=[],this.equationSortFunction=t.equationSortFunction||!1}var n=t("../utils/Utils"),o=t("../events/EventEmitter");e.exports=s,s.prototype=new o,s.prototype.constructor=s,s.prototype.solve=function(t,e){throw new Error("Solver.solve should be implemented by subclasses!")};var a={bodies:[]};s.prototype.solveIsland=function(t,e){this.removeAllEquations(),e.equations.length&&(this.addEquations(e.equations),a.bodies.length=0,e.getBodies(a.bodies),a.bodies.length&&this.solve(t,a))},s.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},s.prototype.addEquation=function(t){t.enabled&&this.equations.push(t)},s.prototype.addEquations=function(t){for(var e=0,i=t.length;e!==i;e++){var s=t[e];s.enabled&&this.equations.push(s)}},s.prototype.removeEquation=function(t){var e=this.equations.indexOf(t);-1!==e&&this.equations.splice(e,1)},s.prototype.removeAllEquations=function(){this.equations.length=0},s.GS=1,s.ISLAND=2},{"../events/EventEmitter":26,"../utils/Utils":57}],48:[function(t,e,i){function s(){o.apply(this,arguments)}var n=t("../equations/ContactEquation"),o=t("./Pool");e.exports=s,s.prototype=new o,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(t){return t.bodyA=t.bodyB=null,this}},{"../equations/ContactEquation":21,"./Pool":55}],49:[function(t,e,i){function s(){o.apply(this,arguments)}var n=t("../equations/FrictionEquation"),o=t("./Pool");e.exports=s,s.prototype=new o,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(t){return t.bodyA=t.bodyB=null,this}},{"../equations/FrictionEquation":23,"./Pool":55}],50:[function(t,e,i){function s(){o.apply(this,arguments)}var n=t("../world/IslandNode"),o=t("./Pool");e.exports=s,s.prototype=new o,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(t){return t.reset(),this}},{"../world/IslandNode":60,"./Pool":55}],51:[function(t,e,i){function s(){o.apply(this,arguments)}var n=t("../world/Island"),o=t("./Pool");e.exports=s,s.prototype=new o,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(t){return t.reset(),this}},{"../world/Island":58,"./Pool":55}],52:[function(t,e,i){function s(){this.overlappingShapesLastState=new n,this.overlappingShapesCurrentState=new n,this.recordPool=new a({size:16}),this.tmpDict=new n,this.tmpArray1=[]}var n=t("./TupleDictionary"),o=t("./OverlapKeeperRecord"),a=t("./OverlapKeeperRecordPool"),r=t("./Utils");e.exports=s,s.prototype.tick=function(){for(var t=this.overlappingShapesLastState,e=this.overlappingShapesCurrentState,i=t.keys.length;i--;){var s=t.keys[i],n=t.getByKey(s),o=e.getByKey(s);n&&this.recordPool.release(n)}t.reset(),t.copy(e),e.reset()},s.prototype.setOverlapping=function(t,e,i,s){var n=this.overlappingShapesLastState,o=this.overlappingShapesCurrentState;if(!o.get(e.id,s.id)){var a=this.recordPool.get();a.set(t,e,i,s),o.set(e.id,s.id,a)}},s.prototype.getNewOverlaps=function(t){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,t)},s.prototype.getEndOverlaps=function(t){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,t)},s.prototype.bodiesAreOverlapping=function(t,e){for(var i=this.overlappingShapesCurrentState,s=i.keys.length;s--;){var n=i.keys[s],o=i.data[n];if(o.bodyA===t&&o.bodyB===e||o.bodyA===e&&o.bodyB===t)return!0}return!1},s.prototype.getDiff=function(t,e,i){var i=i||[],s=t,n=e;i.length=0;for(var o=n.keys.length;o--;){var a=n.keys[o],r=n.data[a];if(!r)throw new Error("Key "+a+" had no data!");s.data[a]||i.push(r)}return i},s.prototype.isNewOverlap=function(t,e){var i=0|t.id,s=0|e.id,n=this.overlappingShapesLastState,o=this.overlappingShapesCurrentState;return!n.get(i,s)&&!!o.get(i,s)},s.prototype.getNewBodyOverlaps=function(t){this.tmpArray1.length=0;var e=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(e,t)},s.prototype.getEndBodyOverlaps=function(t){this.tmpArray1.length=0;var e=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(e,t)},s.prototype.getBodyDiff=function(t,e){e=e||[];for(var i=this.tmpDict,s=t.length;s--;){var n=t[s];i.set(0|n.bodyA.id,0|n.bodyB.id,n)}for(s=i.keys.length;s--;){var n=i.getByKey(i.keys[s]);n&&e.push(n.bodyA,n.bodyB)}return i.reset(),e}},{"./OverlapKeeperRecord":53,"./OverlapKeeperRecordPool":54,"./TupleDictionary":56,"./Utils":57}],53:[function(t,e,i){function s(t,e,i,s){this.shapeA=e,this.shapeB=s,this.bodyA=t,this.bodyB=i}e.exports=s,s.prototype.set=function(t,e,i,n){s.call(this,t,e,i,n)}},{}],54:[function(t,e,i){function s(){o.apply(this,arguments)}var n=t("./OverlapKeeperRecord"),o=t("./Pool");e.exports=s,s.prototype=new o,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(t){return t.bodyA=t.bodyB=t.shapeA=t.shapeB=null,this}},{"./OverlapKeeperRecord":53,"./Pool":55}],55:[function(t,e,i){function s(t){t=t||{},this.objects=[],void 0!==t.size&&this.resize(t.size)}e.exports=s,s.prototype.resize=function(t){for(var e=this.objects;e.length>t;)e.pop();for(;e.length(0|e)?t<<16|65535&e:e<<16|65535&t)},s.prototype.getByKey=function(t){return t|=0,this.data[t]},s.prototype.get=function(t,e){return this.data[this.getKey(t,e)]},s.prototype.set=function(t,e,i){if(!i)throw new Error("No data!");var s=this.getKey(t,e);return this.data[s]||this.keys.push(s),this.data[s]=i,s},s.prototype.reset=function(){for(var t=this.data,e=this.keys,i=e.length;i--;)delete t[e[i]];e.length=0},s.prototype.copy=function(t){this.reset(),n.appendArray(this.keys,t.keys);for(var e=t.keys.length;e--;){var i=t.keys[e];this.data[i]=t.data[i]}}},{"./Utils":57}],57:[function(t,e,i){function s(){}e.exports=s,s.appendArray=function(t,e){if(e.length<15e4)t.push.apply(t,e);else for(var i=0,s=e.length;i!==s;++i)t.push(e[i])},s.splice=function(t,e,i){i=i||1;for(var s=e,n=t.length-i;s=t&&s=0;C-=2)for(var M=E.length-2;M>=0;M-=2)(I[C]===E[M]&&I[C+1]===E[M+1]||I[C+1]===E[M]&&I[C]===E[M+1])&&E.splice(M,2);var R=d.length;for(C=0;C!==R;C++){var B=d[C];if(!B.collideConnected)for(var M=E.length-2;M>=0;M-=2)(B.bodyA===E[M]&&B.bodyB===E[M+1]||B.bodyB===E[M]&&B.bodyA===E[M+1])&&E.splice(M,2)}this.postBroadphaseEvent.pairs=E,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,u.reset(this);for(var C=0,L=E.length;C!==L;C+=2)for(var k=E[C],D=E[C+1],F=0,G=k.shapes.length;F!==G;F++)for(var W=k.shapes[F],X=W.position,H=W.angle,V=0,q=D.shapes.length;V!==q;V++){var z=D.shapes[V],K=z.position,J=z.angle,Z=this.defaultContactMaterial;if(W.material&&z.material){var Q=this.getContactMaterial(W.material,z.material);Q&&(Z=Q)}this.runNarrowphase(u,k,W,X,H,D,z,K,J,Z,this.frictionGravity)}for(var C=0;C!==l;C++){var $=o[C];$._wakeUpAfterNarrowphase&&($.wakeUp(),$._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(Y);for(var tt=this.endContactEvent,V=Y.length;V--;){var et=Y[V];tt.shapeA=et.shapeA,tt.shapeB=et.shapeB,tt.bodyA=et.bodyA,tt.bodyB=et.bodyB,this.emit(tt)}Y.length=0}var it=this.preSolveEvent;it.contactEquations=u.contactEquations,it.frictionEquations=u.frictionEquations,this.emit(it),it.contactEquations=it.frictionEquations=null;var R=d.length;for(C=0;C!==R;C++)d[C].update();if(u.contactEquations.length||u.frictionEquations.length||R)if(this.islandSplit){for(w.equations.length=0,O.appendArray(w.equations,u.contactEquations),O.appendArray(w.equations,u.frictionEquations),C=0;C!==R;C++)O.appendArray(w.equations,d[C].equations);w.split(this);for(var C=0;C!==w.islands.length;C++){var st=w.islands[C];st.equations.length&&h.solveIsland(t,st)}}else{for(h.addEquations(u.contactEquations),h.addEquations(u.frictionEquations),C=0;C!==R;C++)h.addEquations(d[C].equations);this.solveConstraints&&h.solve(t,this),h.removeAllEquations()}for(var C=0;C!==l;C++){var $=o[C];$.integrate(t)}for(var C=0;C!==l;C++)o[C].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var nt=this.impactEvent,C=0;C!==u.contactEquations.length;C++){var ot=u.contactEquations[C];ot.firstImpact&&(nt.bodyA=ot.bodyA,nt.bodyB=ot.bodyB,nt.shapeA=ot.shapeA,nt.shapeB=ot.shapeB,nt.contactEquation=ot,this.emit(nt))}if(this.sleepMode===s.BODY_SLEEPING)for(C=0;C!==l;C++)o[C].sleepTick(this.time,!1,t);else if(this.sleepMode===s.ISLAND_SLEEPING&&this.islandSplit){for(C=0;C!==l;C++)o[C].sleepTick(this.time,!0,t);for(var C=0;C0,t.frictionCoefficient=c.friction;var f;f=e.type===y.STATIC||e.type===y.KINEMATIC?o.mass:o.type===y.STATIC||o.type===y.KINEMATIC?e.mass:e.mass*o.mass/(e.mass+o.mass),t.slipForce=c.friction*u*f,t.restitution=c.restitution,t.surfaceVelocity=c.surfaceVelocity,t.frictionStiffness=c.frictionStiffness,t.frictionRelaxation=c.frictionRelaxation,t.stiffness=c.stiffness,t.relaxation=c.relaxation,t.contactSkinSize=c.contactSkinSize,t.enabledEquations=e.collisionResponse&&o.collisionResponse&&i.collisionResponse&&a.collisionResponse;var g=t[i.type|a.type],m=0;if(g){var v=i.sensor||a.sensor,b=t.frictionEquations.length;m=i.type=2*Math.pow(o.sleepSpeedLimit,2)&&(e._wakeUpAfterNarrowphase=!0)}if(o.allowSleep&&o.type===y.DYNAMIC&&o.sleepState===y.SLEEPING&&e.sleepState===y.AWAKE&&e.type!==y.STATIC){r.squaredLength(e.velocity)+Math.pow(e.angularVelocity,2)>=2*Math.pow(e.sleepSpeedLimit,2)&&(o._wakeUpAfterNarrowphase=!0)}if(this.overlapKeeper.setOverlapping(e,i,o,a),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(i,a)){var _=this.beginContactEvent;if(_.shapeA=i,_.shapeB=a,_.bodyA=e,_.bodyB=o,_.contactEquations.length=0,"number"==typeof m)for(var w=t.contactEquations.length-m;w1)for(var w=t.frictionEquations.length-x;w=0;e--)this.removeConstraint(t[e]);for(var i=this.bodies,e=i.length-1;e>=0;e--)this.removeBody(i[e]);for(var n=this.springs,e=n.length-1;e>=0;e--)this.removeSpring(n[e]);for(var o=this.contactMaterials,e=o.length-1;e>=0;e--)this.removeContactMaterial(o[e]);s.apply(this)};var q=r.create(),z=r.fromValues(0,0),K=r.fromValues(0,0);s.prototype.hitTest=function(t,e,i){i=i||0;var s=new y({position:t}),n=new p,o=t,a=0,c=q,f=z,g=K;s.addShape(n);for(var m=this.narrowphase,v=[],b=0,x=e.length;b!==x;b++)for(var _=e[b],w=0,P=_.shapes.length;w!==P;w++){var C=_.shapes[w];r.rotate(c,C.position,_.angle),r.add(c,c,_.position);var T=C.angle+_.angle;(C instanceof h&&m.circleParticle(_,C,c,T,s,n,o,0,!0)||C instanceof l&&m.particleConvex(s,n,o,0,_,C,c,T,!0)||C instanceof u&&m.particlePlane(s,n,o,0,_,C,c,T,!0)||C instanceof d&&m.particleCapsule(s,n,o,0,_,C,c,T,!0)||C instanceof p&&r.squaredLength(r.sub(g,c,t)) -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* -* @overview -* -* Phaser - http://phaser.io -* -* v2.6.4 "Kore Springs" - Built: Thu Nov 16 2017 13:53:48 -* -* By Richard Davey http://www.photonstorm.com @photonstorm -* -* Phaser is a fun, free and fast 2D game framework for making HTML5 games -* for desktop and mobile web browsers, supporting Canvas and WebGL rendering. -* -* Phaser uses Pixi.js for rendering, created by Mat Groves http://matgroves.com @Doormat23 -* Phaser uses p2.js for full-body physics, created by Stefan Hedman https://github.com/schteppe/p2.js @schteppe -* Phaser contains a port of N+ Physics, converted by Richard Davey, original by http://www.metanetsoftware.com -* -* Many thanks to Adam Saltsman (@ADAMATOMIC) for releasing Flixel, from which both Phaser and my love of framework development originate. -* -* Follow development at http://phaser.io and on our forum -* -* "If you want your children to be intelligent, read them fairy tales." -* "If you want them to be more intelligent, read them more fairy tales." -* -- Albert Einstein -*/ -(function(){var i=this,s=s||{};/** -* @author Mat Groves http://matgroves.com @Doormat23 -* @author Richard Davey -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -return s.game=null,s.WEBGL_RENDERER=0,s.CANVAS_RENDERER=1,s.VERSION="v2.2.9",s._UID=0,"undefined"!=typeof Float32Array?(s.Float32Array=Float32Array,s.Uint16Array=Uint16Array,s.Uint32Array=Uint32Array,s.ArrayBuffer=ArrayBuffer):(s.Float32Array=Array,s.Uint16Array=Array),s.PI_2=2*Math.PI,s.RAD_TO_DEG=180/Math.PI,s.DEG_TO_RAD=Math.PI/180,s.RETINA_PREFIX="@2x",s.DisplayObject=function(){this.position=new s.Point(0,0),this.scale=new s.Point(1,1),this.pivot=new s.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 s.Matrix,this.worldPosition=new s.Point(0,0),this.worldScale=new s.Point(1,1),this.worldRotation=0,this.filterArea=null,this._sr=0,this._cr=1,this._bounds=new s.Rectangle(0,0,0,0),this._currentBounds=null,this._mask=null,this._cacheAsBitmap=!1,this._cacheIsDirty=!1},s.DisplayObject.prototype.constructor=s.DisplayObject,s.DisplayObject.prototype={destroy:function(){if(this.children){for(var t=this.children.length;t--;)this.children[t].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(t){if(!t&&!this.parent&&!this.game)return this;var e=this.parent;t?e=t:this.parent||(e=this.game.world);var i=e.worldTransform,n=this.worldTransform,o,a,r,h,l,c;return this.rotation%s.PI_2?(this.rotation!==this.rotationCache&&(this.rotationCache=this.rotation,this._sr=Math.sin(this.rotation),this._cr=Math.cos(this.rotation)),o=this._cr*this.scale.x,a=this._sr*this.scale.x,r=-this._sr*this.scale.y,h=this._cr*this.scale.y,l=this.position.x,c=this.position.y,(this.pivot.x||this.pivot.y)&&(l-=this.pivot.x*o+this.pivot.y*r,c-=this.pivot.x*a+this.pivot.y*h),n.a=o*i.a+a*i.c,n.b=o*i.b+a*i.d,n.c=r*i.a+h*i.c,n.d=r*i.b+h*i.d,n.tx=l*i.a+c*i.c+i.tx,n.ty=l*i.b+c*i.d+i.ty):(o=this.scale.x,h=this.scale.y,l=this.position.x-this.pivot.x*o,c=this.position.y-this.pivot.y*h,n.a=o*i.a,n.b=o*i.b,n.c=h*i.c,n.d=h*i.d,n.tx=l*i.a+c*i.c+i.tx,n.ty=l*i.b+c*i.d+i.ty),this.worldAlpha=this.alpha*e.worldAlpha,this.worldPosition.set(n.tx,n.ty),this.worldScale.set(this.scale.x*Math.sqrt(n.a*n.a+n.c*n.c),this.scale.y*Math.sqrt(n.b*n.b+n.d*n.d)),this.worldRotation=Math.atan2(-n.c,n.d),this._currentBounds=null,this.transformCallback&&this.transformCallback.call(this.transformCallbackContext,n,i),this},preUpdate:function(){},generateTexture:function(t,e,i){var n=this.getLocalBounds(),o=new s.RenderTexture(0|n.width,0|n.height,i,e,t);return s.DisplayObject._tempMatrix.tx=-n.x,s.DisplayObject._tempMatrix.ty=-n.y,o.render(this,s.DisplayObject._tempMatrix),o},updateCache:function(){return this._generateCachedSprite(),this},toGlobal:function(t){return this.updateTransform(),this.worldTransform.apply(t)},toLocal:function(t,e){return e&&(t=e.toGlobal(t)),this.updateTransform(),this.worldTransform.applyInverse(t)},_renderCachedSprite:function(t){this._cachedSprite.worldAlpha=this.worldAlpha,t.gl?s.Sprite.prototype._renderWebGL.call(this._cachedSprite,t):s.Sprite.prototype._renderCanvas.call(this._cachedSprite,t)},_generateCachedSprite:function(){this._cacheAsBitmap=!1;var t=this.getLocalBounds();if(t.width=Math.max(1,Math.ceil(t.width)),t.height=Math.max(1,Math.ceil(t.height)),this.updateTransform(),this._cachedSprite)this._cachedSprite.texture.resize(t.width,t.height);else{var e=new s.RenderTexture(t.width,t.height);this._cachedSprite=new s.Sprite(e),this._cachedSprite.worldTransform=this.worldTransform}var i=this._filters;this._filters=null,this._cachedSprite.filters=i,s.DisplayObject._tempMatrix.tx=-t.x,s.DisplayObject._tempMatrix.ty=-t.y,this._cachedSprite.texture.render(this,s.DisplayObject._tempMatrix,!0),this._cachedSprite.anchor.x=-t.x/t.width,this._cachedSprite.anchor.y=-t.y/t.height,this._filters=i,this._cacheAsBitmap=!0},_destroyCachedSprite:function(){this._cachedSprite&&(this._cachedSprite.texture.destroy(!0),this._cachedSprite=null)}},s.DisplayObject.prototype.displayObjectUpdateTransform=s.DisplayObject.prototype.updateTransform,Object.defineProperties(s.DisplayObject.prototype,{x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},worldVisible:{get:function(){if(this.visible){var t=this.parent;if(!t)return this.visible;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}return!1}},mask:{get:function(){return this._mask},set:function(t){this._mask&&(this._mask.isMask=!1),this._mask=t,t&&(this._mask.isMask=!0)}},filters:{get:function(){return this._filters},set:function(t){if(Array.isArray(t)){for(var e=[],i=0;i=0&&e<=this.children.length)return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),t;throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length)},s.DisplayObjectContainer.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),s=this.getChildIndex(e);if(i<0||s<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be a child of the caller.");this.children[i]=e,this.children[s]=t}},s.DisplayObjectContainer.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},s.DisplayObjectContainer.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The supplied index is out of bounds");var i=this.getChildIndex(t);this.children.splice(i,1),this.children.splice(e,0,t)},s.DisplayObjectContainer.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Supplied index "+t+" does not exist in the child list, or the supplied DisplayObject must be a child of the caller");return this.children[t]},s.DisplayObjectContainer.prototype.removeChild=function(t){var e=this.children.indexOf(t);if(-1!==e)return this.removeChildAt(e)},s.DisplayObjectContainer.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e&&(e.parent=void 0,this.children.splice(t,1)),e},s.DisplayObjectContainer.prototype.removeChildren=function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.children.length);var i=e-t;if(i>0&&i<=e){for(var s=this.children.splice(begin,i),n=0;nu?h:u,l=l>d?l:d)}var f=this._bounds;if(!p){f=new s.Rectangle;var y=f.x,g=f.width+f.x,m=f.y,v=f.height+f.y,b=this.worldTransform,x=b.a,_=b.b,w=b.c,P=b.d,C=b.tx,T=b.ty,S=x*g+w*v+C,A=P*v+_*g+T,E=x*y+w*v+C,I=P*v+_*y+T,M=x*y+w*m+C,O=P*m+_*y+T,R=x*g+w*m+C,B=P*m+_*g+T;h=S,l=A,a=S,r=A,a=Eh?E:h,h=M>h?M:h,h=R>h?R:h,l=I>l?I:l,l=O>l?O:l,l=B>l?B:l}if(f.x=a,f.y=r,f.width=h-a,f.height=l-r,e)for(t.worldTransform=o,n=0;nf?b:f,f=_>f?_:f,f=P>f?P:f,f=T>f?T:f,y=x>y?x:y,y=w>y?w:y,y=C>y?C:y,y=S>y?S:y}var A=this._bounds;return A.x=g,A.width=f-g,A.y=m,A.height=y-m,this._currentBounds=A,A},s.Sprite.prototype.getLocalBounds=function(){var t=this.worldTransform;this.worldTransform=s.identityMatrix;for(var e=0;e>16&255)/255,(t>>8&255)/255,(255&t)/255]},s.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},s.canUseNewCanvasBlendModes=function(){if(void 0===document)return!1;var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",e="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",i=new Image;i.src=t+"AP804Oa6"+e;var n=new Image;n.src=t+"/wCKxvRF"+e;var o=s.CanvasPool.create(this,6,1),a=o.getContext("2d");if(a.globalCompositeOperation="multiply",a.drawImage(i,0,0),a.drawImage(n,2,0),!a.getImageData(2,0,1,1))return!1;var r=a.getImageData(2,0,1,1).data;return s.CanvasPool.remove(this),255===r[0]&&0===r[1]&&0===r[2]},s.getNextPowerOfTwo=function(t){if(t>0&&0==(t&t-1))return t;for(var e=1;e0&&0==(t&t-1)&&e>0&&0==(e&e-1)},s.CanvasPool={create:function(t,e,i){var n=s.CanvasPool.getFirst(),o;if(-1===n){var a={parent:t,canvas:document.createElement("canvas")};s.CanvasPool.pool.push(a),o=a.canvas}else s.CanvasPool.pool[n].parent=t,o=s.CanvasPool.pool[n].canvas;return void 0!==e&&(o.width=e,o.height=i),o},getFirst:function(){for(var t=s.CanvasPool.pool,e=0;e=this.size&&(this.flush(),this.currentBaseTexture=i.baseTexture);var n=i._uvs;if(n){var o=t.anchor.x,a=t.anchor.y,r,h,l,c;if(i.trim){var u=i.trim;h=u.x-o*u.width,r=h+i.crop.width,c=u.y-a*u.height,l=c+i.crop.height}else r=i.frame.width*(1-o),h=i.frame.width*-o,l=i.frame.height*(1-a),c=i.frame.height*-a;var d=4*this.currentBatchSize*this.vertSize,p=i.baseTexture.resolution,f=s.a/p,y=s.b/p,g=s.c/p,m=s.d/p,v=s.tx,b=s.ty,x=this.colors,_=this.positions;this.renderSession.roundPixels?(_[d]=f*h+g*c+v|0,_[d+1]=m*c+y*h+b|0,_[d+5]=f*r+g*c+v|0,_[d+6]=m*c+y*r+b|0,_[d+10]=f*r+g*l+v|0,_[d+11]=m*l+y*r+b|0,_[d+15]=f*h+g*l+v|0,_[d+16]=m*l+y*h+b|0):(_[d]=f*h+g*c+v,_[d+1]=m*c+y*h+b,_[d+5]=f*r+g*c+v,_[d+6]=m*c+y*r+b,_[d+10]=f*r+g*l+v,_[d+11]=m*l+y*r+b,_[d+15]=f*h+g*l+v,_[d+16]=m*l+y*h+b),_[d+2]=n.x0,_[d+3]=n.y0,_[d+7]=n.x1,_[d+8]=n.y1,_[d+12]=n.x2,_[d+13]=n.y2,_[d+17]=n.x3,_[d+18]=n.y3;var w=t.tint;x[d+4]=x[d+9]=x[d+14]=x[d+19]=(w>>16)+(65280&w)+((255&w)<<16)+(255*t.worldAlpha<<24),this.sprites[this.currentBatchSize++]=t}},s.WebGLSpriteBatch.prototype.renderTilingSprite=function(t){var e=t.tilingTexture;this.currentBatchSize>=this.size&&(this.flush(),this.currentBaseTexture=e.baseTexture),t._uvs||(t._uvs=new s.TextureUvs);var i=t._uvs,n=e.baseTexture.width,o=e.baseTexture.height;t.tilePosition.x%=n*t.tileScaleOffset.x,t.tilePosition.y%=o*t.tileScaleOffset.y;var a=t.tilePosition.x/(n*t.tileScaleOffset.x),r=t.tilePosition.y/(o*t.tileScaleOffset.y),h=t.width/n/(t.tileScale.x*t.tileScaleOffset.x),l=t.height/o/(t.tileScale.y*t.tileScaleOffset.y);i.x0=0-a,i.y0=0-r,i.x1=1*h-a,i.y1=0-r,i.x2=1*h-a,i.y2=1*l-r,i.x3=0-a,i.y3=1*l-r;var c=t.tint,u=(c>>16)+(65280&c)+((255&c)<<16)+(255*t.worldAlpha<<24),d=this.positions,p=this.colors,f=t.width,y=t.height,g=t.anchor.x,m=t.anchor.y,v=f*(1-g),b=f*-g,x=y*(1-m),_=y*-m,w=4*this.currentBatchSize*this.vertSize,P=e.baseTexture.resolution,C=t.worldTransform,T=C.a/P,S=C.b/P,A=C.c/P,E=C.d/P,I=C.tx,M=C.ty;d[w++]=T*b+A*_+I,d[w++]=E*_+S*b+M,d[w++]=i.x0,d[w++]=i.y0,p[w++]=u,d[w++]=T*v+A*_+I,d[w++]=E*_+S*v+M,d[w++]=i.x1,d[w++]=i.y1,p[w++]=u,d[w++]=T*v+A*x+I,d[w++]=E*x+S*v+M,d[w++]=i.x2,d[w++]=i.y2,p[w++]=u,d[w++]=T*b+A*x+I,d[w++]=E*x+S*b+M,d[w++]=i.x3,d[w++]=i.y3,p[w++]=u,this.sprites[this.currentBatchSize++]=t},s.WebGLSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var t=this.gl,e;if(this.dirty){this.dirty=!1,t.activeTexture(t.TEXTURE0),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),e=this.defaultShader.shaders[t.id];var i=4*this.vertSize;t.vertexAttribPointer(e.aVertexPosition,2,t.FLOAT,!1,i,0),t.vertexAttribPointer(e.aTextureCoord,2,t.FLOAT,!1,i,8),t.vertexAttribPointer(e.colorAttribute,4,t.UNSIGNED_BYTE,!0,i,16)}if(this.currentBatchSize>.5*this.size)t.bufferSubData(t.ARRAY_BUFFER,0,this.vertices);else{var n=this.positions.subarray(0,4*this.currentBatchSize*this.vertSize);t.bufferSubData(t.ARRAY_BUFFER,0,n)}for(var o,a,r,h=0,l=0,c=null,u=this.renderSession.blendModeManager.currentBlendMode,d=null,p=!1,f=!1,y,g=0,m=this.currentBatchSize;g0&&(v=!1),(c!==o&&!v||p||f)&&(this.renderBatch(c,h,l),l=g,h=0,c=o,p&&(u=a,this.renderSession.blendModeManager.setBlendMode(u)),f)){d=r,e=d.shaders[t.id],e||(e=new s.PixiShader(t),e.fragmentSrc=d.fragmentSrc,e.uniforms=d.uniforms,e.init(),d.shaders[t.id]=e),this.renderSession.shaderManager.setShader(e),e.dirty&&e.syncUniforms();var b=this.renderSession.projection;t.uniform2f(e.projectionVector,b.x,b.y);var x=this.renderSession.offset;t.uniform2f(e.offsetVector,x.x,x.y)}h++}this.renderBatch(c,h,l),this.currentBatchSize=0}},s.WebGLSpriteBatch.prototype.renderBatch=function(t,e,i){if(0!==e){var s=this.gl;if(t._dirty[s.id]){if(!this.renderSession.renderer.updateTexture(t))return}else s.bindTexture(s.TEXTURE_2D,t._glTextures[s.id]);s.drawElements(s.TRIANGLES,6*e,s.UNSIGNED_SHORT,6*i*2),this.renderSession.drawCount++}},s.WebGLSpriteBatch.prototype.stop=function(){this.flush(),this.dirty=!0},s.WebGLSpriteBatch.prototype.start=function(){this.dirty=!0},s.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},s.WebGLFastSpriteBatch=function(t){this.vertSize=10,this.maxSize=6e3,this.size=this.maxSize;var e=4*this.size*this.vertSize,i=6*this.maxSize;this.vertices=new s.Float32Array(e),this.indices=new s.Uint16Array(i),this.vertexBuffer=null,this.indexBuffer=null,this.lastIndexCount=0;for(var n=0,o=0;n=this.size&&this.flush()}},s.WebGLFastSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var t=this.gl;if(this.currentBaseTexture._glTextures[t.id]||this.renderSession.renderer.updateTexture(this.currentBaseTexture,t),t.bindTexture(t.TEXTURE_2D,this.currentBaseTexture._glTextures[t.id]),this.currentBatchSize>.5*this.size)t.bufferSubData(t.ARRAY_BUFFER,0,this.vertices);else{var e=this.vertices.subarray(0,4*this.currentBatchSize*this.vertSize);t.bufferSubData(t.ARRAY_BUFFER,0,e)}t.drawElements(t.TRIANGLES,6*this.currentBatchSize,t.UNSIGNED_SHORT,0),this.currentBatchSize=0,this.renderSession.drawCount++}},s.WebGLFastSpriteBatch.prototype.stop=function(){this.flush()},s.WebGLFastSpriteBatch.prototype.start=function(){var t=this.gl;t.activeTexture(t.TEXTURE0),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var e=this.renderSession.projection;t.uniform2f(this.shader.projectionVector,e.x,e.y),t.uniformMatrix3fv(this.shader.uMatrix,!1,this.matrix);var i=4*this.vertSize;t.vertexAttribPointer(this.shader.aVertexPosition,2,t.FLOAT,!1,i,0),t.vertexAttribPointer(this.shader.aPositionCoord,2,t.FLOAT,!1,i,8),t.vertexAttribPointer(this.shader.aScale,2,t.FLOAT,!1,i,16),t.vertexAttribPointer(this.shader.aRotation,1,t.FLOAT,!1,i,24),t.vertexAttribPointer(this.shader.aTextureCoord,2,t.FLOAT,!1,i,28),t.vertexAttribPointer(this.shader.colorAttribute,1,t.FLOAT,!1,i,36)},s.WebGLFilterManager=function(){this.filterStack=[],this.offsetX=0,this.offsetY=0},s.WebGLFilterManager.prototype.constructor=s.WebGLFilterManager,s.WebGLFilterManager.prototype.setContext=function(t){this.gl=t,this.texturePool=[],this.initShaderBuffers()},s.WebGLFilterManager.prototype.begin=function(t,e){this.renderSession=t,this.defaultShader=t.shaderManager.defaultShader;var i=this.renderSession.projection;this.width=2*i.x,this.height=2*-i.y,this.buffer=e},s.WebGLFilterManager.prototype.pushFilter=function(t){var e=this.gl,i=this.renderSession.projection,n=this.renderSession.offset;t._filterArea=t.target.filterArea||t.target.getBounds(),t._previous_stencil_mgr=this.renderSession.stencilManager,this.renderSession.stencilManager=new s.WebGLStencilManager,this.renderSession.stencilManager.setContext(e),e.disable(e.STENCIL_TEST),this.filterStack.push(t);var o=t.filterPasses[0];this.offsetX+=t._filterArea.x,this.offsetY+=t._filterArea.y;var a=this.texturePool.pop();a?a.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution):a=new s.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),e.bindTexture(e.TEXTURE_2D,a.texture);var r=t._filterArea,h=o.padding;r.x-=h,r.y-=h,r.width+=2*h,r.height+=2*h,r.x<0&&(r.x=0),r.width>this.width&&(r.width=this.width),r.y<0&&(r.y=0),r.height>this.height&&(r.height=this.height),e.bindFramebuffer(e.FRAMEBUFFER,a.frameBuffer),e.viewport(0,0,r.width*this.renderSession.resolution,r.height*this.renderSession.resolution),i.x=r.width/2,i.y=-r.height/2,n.x=-r.x,n.y=-r.y,e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t._glFilterTexture=a},s.WebGLFilterManager.prototype.popFilter=function(){var t=this.gl,e=this.filterStack.pop(),i=e._filterArea,n=e._glFilterTexture,o=this.renderSession.projection,a=this.renderSession.offset;if(e.filterPasses.length>1){t.viewport(0,0,i.width*this.renderSession.resolution,i.height*this.renderSession.resolution),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),this.vertexArray[0]=0,this.vertexArray[1]=i.height,this.vertexArray[2]=i.width,this.vertexArray[3]=i.height,this.vertexArray[4]=0,this.vertexArray[5]=0,this.vertexArray[6]=i.width,this.vertexArray[7]=0,t.bufferSubData(t.ARRAY_BUFFER,0,this.vertexArray),t.bindBuffer(t.ARRAY_BUFFER,this.uvBuffer),this.uvArray[2]=i.width/this.width,this.uvArray[5]=i.height/this.height,this.uvArray[6]=i.width/this.width,this.uvArray[7]=i.height/this.height,t.bufferSubData(t.ARRAY_BUFFER,0,this.uvArray);var r=n,h=this.texturePool.pop();h||(h=new s.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution)),h.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),t.bindFramebuffer(t.FRAMEBUFFER,h.frameBuffer),t.clear(t.COLOR_BUFFER_BIT),t.disable(t.BLEND);for(var l=0;l0?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.applyFilterPass(d,i,p,f),this.texturePool.push(n),e._glFilterTexture=null},s.WebGLFilterManager.prototype.applyFilterPass=function(t,e,i,n){var o=this.gl,a=t.shaders[o.id];a||(a=new s.PixiShader(o),a.fragmentSrc=t.fragmentSrc,a.uniforms=t.uniforms,a.init(),t.shaders[o.id]=a),this.renderSession.shaderManager.setShader(a),o.uniform2f(a.projectionVector,i/2,-n/2),o.uniform2f(a.offsetVector,0,0),t.uniforms.dimensions&&(t.uniforms.dimensions.value[0]=this.width,t.uniforms.dimensions.value[1]=this.height,t.uniforms.dimensions.value[2]=this.vertexArray[0],t.uniforms.dimensions.value[3]=this.vertexArray[5]),a.syncUniforms(),o.bindBuffer(o.ARRAY_BUFFER,this.vertexBuffer),o.vertexAttribPointer(a.aVertexPosition,2,o.FLOAT,!1,0,0),o.bindBuffer(o.ARRAY_BUFFER,this.uvBuffer),o.vertexAttribPointer(a.aTextureCoord,2,o.FLOAT,!1,0,0),o.bindBuffer(o.ARRAY_BUFFER,this.colorBuffer),o.vertexAttribPointer(a.colorAttribute,2,o.FLOAT,!1,0,0),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,this.indexBuffer),o.drawElements(o.TRIANGLES,6,o.UNSIGNED_SHORT,0),this.renderSession.drawCount++},s.WebGLFilterManager.prototype.initShaderBuffers=function(){var t=this.gl;this.vertexBuffer=t.createBuffer(),this.uvBuffer=t.createBuffer(),this.colorBuffer=t.createBuffer(),this.indexBuffer=t.createBuffer(),this.vertexArray=new s.Float32Array([0,0,1,0,0,1,1,1]),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertexArray,t.STATIC_DRAW),this.uvArray=new s.Float32Array([0,0,1,0,0,1,1,1]),t.bindBuffer(t.ARRAY_BUFFER,this.uvBuffer),t.bufferData(t.ARRAY_BUFFER,this.uvArray,t.STATIC_DRAW),this.colorArray=new s.Float32Array([1,16777215,1,16777215,1,16777215,1,16777215]),t.bindBuffer(t.ARRAY_BUFFER,this.colorBuffer),t.bufferData(t.ARRAY_BUFFER,this.colorArray,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,1,3,2]),t.STATIC_DRAW)},s.WebGLFilterManager.prototype.destroy=function(){var t=this.gl;this.filterStack=null,this.offsetX=0,this.offsetY=0;for(var e=0;e=0;t--){var e=this._glTextures[t],i=s.glContexts[t];i&&e&&i.deleteTexture(e)}this._glTextures.length=0,this.dirty()},s.BaseTexture.fromCanvas=function(t,e){return 0===t.width&&(t.width=1),0===t.height&&(t.height=1),new s.BaseTexture(t,e)},s.TextureSilentFail=!1,s.Texture=function(t,e,i,n){this.noFrame=!1,e||(this.noFrame=!0,e=new s.Rectangle(0,0,1,1)),t instanceof s.Texture&&(t=t.baseTexture),this.baseTexture=t,this.frame=e,this.trim=n,this.valid=!1,this.isTiling=!1,this.requiresUpdate=!1,this.requiresReTint=!1,this._uvs=null,this.width=0,this.height=0,this.crop=i||new s.Rectangle(0,0,1,1),t.hasLoaded&&(this.noFrame&&(e=new s.Rectangle(0,0,t.width,t.height)),this.setFrame(e))},s.Texture.prototype.constructor=s.Texture,s.Texture.prototype.onBaseTextureLoaded=function(){var t=this.baseTexture;this.noFrame&&(this.frame=new s.Rectangle(0,0,t.width,t.height)),this.setFrame(this.frame)},s.Texture.prototype.destroy=function(t){t&&this.baseTexture.destroy(),this.valid=!1},s.Texture.prototype.setFrame=function(t){if(this.noFrame=!1,this.frame=t,this.width=t.width,this.height=t.height,this.crop.x=t.x,this.crop.y=t.y,this.crop.width=t.width,this.crop.height=t.height,!this.trim&&(t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height)){if(!s.TextureSilentFail)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);return void(this.valid=!1)}this.valid=t&&t.width&&t.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()},s.Texture.prototype._updateUvs=function(){this._uvs||(this._uvs=new s.TextureUvs);var t=this.crop,e=this.baseTexture.width,i=this.baseTexture.height;this._uvs.x0=t.x/e,this._uvs.y0=t.y/i,this._uvs.x1=(t.x+t.width)/e,this._uvs.y1=t.y/i,this._uvs.x2=(t.x+t.width)/e,this._uvs.y2=(t.y+t.height)/i,this._uvs.x3=t.x/e,this._uvs.y3=(t.y+t.height)/i},s.Texture.fromCanvas=function(t,e){var i=s.BaseTexture.fromCanvas(t,e);return new s.Texture(i)},s.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},s.RenderTexture=function(t,e,i,n,o){if(this.width=t||100,this.height=e||100,this.resolution=o||1,this.frame=new s.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.crop=new s.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.baseTexture=new s.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=n||s.scaleModes.DEFAULT,this.baseTexture.hasLoaded=!0,s.Texture.call(this,this.baseTexture,new s.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution)),this.renderer=i||s.defaultRenderer,this.renderer.type===s.WEBGL_RENDERER){var a=this.renderer.gl;this.baseTexture._dirty[a.id]=!1,this.textureBuffer=new s.FilterTexture(a,this.width,this.height,this.baseTexture.scaleMode),this.baseTexture._glTextures[a.id]=this.textureBuffer.texture,this.render=this.renderWebGL,this.projection=new s.Point(.5*this.width,.5*-this.height)}else this.render=this.renderCanvas,this.textureBuffer=new s.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()},s.RenderTexture.prototype=Object.create(s.Texture.prototype),s.RenderTexture.prototype.constructor=s.RenderTexture,s.RenderTexture.prototype.resize=function(t,e,i){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.frame.width=this.crop.width=t*this.resolution,this.frame.height=this.crop.height=e*this.resolution,i&&(this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution),this.renderer.type===s.WEBGL_RENDERER&&(this.projection.x=this.width/2,this.projection.y=-this.height/2),this.valid&&this.textureBuffer.resize(this.width,this.height))},s.RenderTexture.prototype.clear=function(){this.valid&&(this.renderer.type===s.WEBGL_RENDERER&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},s.RenderTexture.prototype.renderWebGL=function(t,e,i){if(this.valid&&0!==t.alpha){var s=t.worldTransform;s.identity(),s.translate(0,2*this.projection.y),e&&s.append(e),s.scale(1,-1);for(var n=0;n0){var _=this.canvasPadding/this.worldTransform.a,w=this.canvasPadding/this.worldTransform.d,P=(l+c+u)/3,C=(d+p+f)/3,T=l-P,S=d-C,A=Math.sqrt(T*T+S*S);l=P+T/A*(A+_),d=C+S/A*(A+w),T=c-P,S=p-C,A=Math.sqrt(T*T+S*S),c=P+T/A*(A+_),p=C+S/A*(A+w),T=u-P,S=f-C,A=Math.sqrt(T*T+S*S),u=P+T/A*(A+_),f=C+S/A*(A+w)}t.save(),t.beginPath(),t.moveTo(l,d),t.lineTo(c,p),t.lineTo(u,f),t.closePath(),t.clip();var E=y*b+v*m+g*x-b*m-v*g-y*x,I=l*b+v*u+c*x-b*u-v*c-l*x,M=y*c+l*m+g*u-c*m-l*g-y*u,O=y*b*u+v*c*m+l*g*x-l*b*m-v*g*u-y*c*x,R=d*b+v*f+p*x-b*f-v*p-d*x,B=y*p+d*m+g*f-p*m-d*g-y*f,L=y*b*f+v*p*m+d*g*x-d*b*m-v*g*f-y*p*x;t.transform(I/E,R/E,M/E,B/E,O/E,L/E),t.drawImage(a,0,0),t.restore()},s.Strip.prototype.renderStripFlat=function(t){var e=this.context,i=t.vertices,s=i.length/2;this.count++,e.beginPath();for(var n=1;nl?v:l,c=b>c?b:c}if(u===-1/0||c===1/0)return s.EmptyRectangle;var x=this._bounds;return x.x=u,x.width=l-u,x.y=d,x.height=c-d,this._currentBounds=x,x},s.Strip.DrawModes={TRIANGLE_STRIP:0,TRIANGLES:1},s.Rope=function(t,e){s.Strip.call(this,t),this.points=e,this.vertices=new s.Float32Array(4*e.length),this.uvs=new s.Float32Array(4*e.length),this.colors=new s.Float32Array(2*e.length),this.indices=new s.Uint16Array(2*e.length),this.refresh()},s.Rope.prototype=Object.create(s.Strip.prototype),s.Rope.prototype.constructor=s.Rope,s.Rope.prototype.refresh=function(){var t=this.points;if(!(t.length<1)){var e=this.uvs,i=t[0],s=this.indices,n=this.colors;this.count-=.2,e[0]=0,e[1]=0,e[2]=0,e[3]=1,n[0]=1,n[1]=1,s[0]=0,s[1]=1;for(var o=t.length,a,r,h,l=1;l1&&(l=1),c=Math.sqrt(n.x*n.x+n.y*n.y),u=this.texture.height/2,n.x/=c,n.y/=c,n.x*=u,n.y*=u,o[h]=r.x+n.x,o[h+1]=r.y+n.y,o[h+2]=r.x-n.x,o[h+3]=r.y-n.y,e=r;s.DisplayObjectContainer.prototype.updateTransform.call(this)}},s.Rope.prototype.setTexture=function(t){this.texture=t},s.TilingSprite=function(t,e,i){s.Sprite.call(this,t),this._width=e||128,this._height=i||128,this.tileScale=new s.Point(1,1),this.tileScaleOffset=new s.Point(1,1),this.tilePosition=new s.Point,this.renderable=!0,this.tint=16777215,this.textureDebug=!1,this.blendMode=s.blendModes.NORMAL,this.canvasBuffer=null,this.tilingTexture=null,this.tilePattern=null,this.refreshTexture=!0,this.frameWidth=0,this.frameHeight=0},s.TilingSprite.prototype=Object.create(s.Sprite.prototype),s.TilingSprite.prototype.constructor=s.TilingSprite,s.TilingSprite.prototype.setTexture=function(t){this.texture!==t&&(this.texture=t,this.refreshTexture=!0,this.cachedTint=16777215)},s.TilingSprite.prototype._renderWebGL=function(t){if(this.visible&&this.renderable&&0!==this.alpha){if(this._mask&&(t.spriteBatch.stop(),t.maskManager.pushMask(this.mask,t),t.spriteBatch.start()),this._filters&&(t.spriteBatch.flush(),t.filterManager.pushFilter(this._filterBlock)),this.refreshTexture){if(this.generateTilingTexture(!0,t),!this.tilingTexture)return;this.tilingTexture.needsUpdate&&(t.renderer.updateTexture(this.tilingTexture.baseTexture),this.tilingTexture.needsUpdate=!1)}t.spriteBatch.renderTilingSprite(this);for(var e=0;e_?p:_,_=y>_?y:_,_=m>_?m:_,_=b>_?b:_,w=f>w?f:w,w=g>w?g:w,w=v>w?v:w,w=x>w?x:w;var T=this._bounds;return T.x=P,T.width=_-P,T.y=C,T.height=w-C,this._currentBounds=T,T},s.TilingSprite.prototype.destroy=function(){s.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(s.TilingSprite.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(s.TilingSprite.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),void 0!==t&&t.exports&&(e=t.exports=s),e.PIXI=s,s}).call(this)},function(t,e,i){(function(i){/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* -* @overview -* -* Phaser - http://phaser.io -* -* v2.6.4 "Kore Springs" - Built: Thu Nov 16 2017 13:53:52 -* -* By Richard Davey http://www.photonstorm.com @photonstorm -* -* Phaser is a fun, free and fast 2D game framework for making HTML5 games -* for desktop and mobile web browsers, supporting Canvas and WebGL rendering. -* -* Phaser uses Pixi.js for rendering, created by Mat Groves http://matgroves.com @Doormat23 -* Phaser uses p2.js for full-body physics, created by Stefan Hedman https://github.com/schteppe/p2.js @schteppe -* Phaser contains a port of N+ Physics, converted by Richard Davey, original by http://www.metanetsoftware.com -* -* Many thanks to Adam Saltsman (@ADAMATOMIC) for releasing Flixel, from which both Phaser and my love of framework development originate. -* -* Follow development at http://phaser.io and on our forum -* -* "If you want your children to be intelligent, read them fairy tales." -* "If you want them to be more intelligent, read them more fairy tales." -* -- Albert Einstein -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -(function(){function s(t,e){this._scaleFactor=t,this._deltaMode=e,this.originalEvent=null}var n=this,o=o||{VERSION:"2.6.4",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(/** -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -Math.trunc||(Math.trunc=function t(e){return e<0?Math.ceil(e):Math.floor(e)}),Function.prototype.bind||(Function.prototype.bind=function(){var t=Array.prototype.slice;return function(e){function i(){var o=n.concat(t.call(arguments));s.apply(this instanceof i?this:e,o)}var s=this,n=t.call(arguments,1);if("function"!=typeof s)throw new TypeError;return i.prototype=function t(e){if(e&&(t.prototype=e),!(this instanceof t))return new t}(s.prototype),i}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var s=arguments.length>=2?arguments[1]:void 0,n=0;n -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Utils={reverseString:function(t){return t.split("").reverse().join("")},getProperty:function(t,e){for(var i=e.split("."),s=i.pop(),n=i.length,o=1,a=i[0];o0&&100*Math.random()<=t},randomChoice:function(t,e){return Math.random()<.5?t:e},parseDimension:function(t,e){var i=0,s=0;return"string"==typeof t?"%"===t.substr(-1)?(i=parseInt(t,10)/100,s=0===e?window.innerWidth*i:window.innerHeight*i):s=parseInt(t,10):s=t,s},pad:function(t,e,i,s){if(void 0===e)var e=0;if(void 0===i)var i=" ";if(void 0===s)var s=3;t=t.toString();var n=0;if(e+1>=t.length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var o=Math.ceil((n=e-t.length)/2),a=n-o;t=new Array(a+1).join(i)+t+new Array(o+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t},isPlainObject:function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},extend:function(){var t,e,i,s,n,a,r=arguments[0]||{},h=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[1]||{},h=2),l===h&&(r=this,--h);h -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Circle=function(t,e,i){t=t||0,e=e||0,i=i||0,this.x=t,this.y=e,this._diameter=i,this._radius=0,i>0&&(this._radius=.5*i),this.type=o.CIRCLE},o.Circle.prototype={circumference:function(){return Math.PI*this._radius*2},random:function(t){void 0===t&&(t=new o.Point);var e=2*Math.PI*Math.random(),i=Math.random()+Math.random(),s=i>1?2-i:i,n=s*Math.cos(e),a=s*Math.sin(e);return t.x=this.x+n*this.radius,t.y=this.y+a*this.radius,t},getBounds:function(){return new o.Rectangle(this.x-this.radius,this.y-this.radius,this.diameter,this.diameter)},setTo:function(t,e,i){return this.x=t,this.y=e,this._diameter=i,this._radius=.5*i,this},copyFrom:function(t){return this.setTo(t.x,t.y,t.diameter)},copyTo:function(t){return t.x=this.x,t.y=this.y,t.diameter=this._diameter,t},distance:function(t,e){var i=o.Math.distance(this.x,this.y,t.x,t.y);return e?Math.round(i):i},clone:function(t){return void 0===t||null===t?t=new o.Circle(this.x,this.y,this.diameter):t.setTo(this.x,this.y,this.diameter),t},contains:function(t,e){return o.Circle.contains(this,t,e)},circumferencePoint:function(t,e,i){return o.Circle.circumferencePoint(this,t,e,i)},offset:function(t,e){return this.x+=t,this.y+=e,this},offsetPoint:function(t){return this.offset(t.x,t.y)},toString:function(){return"[{Phaser.Circle (x="+this.x+" y="+this.y+" diameter="+this.diameter+" radius="+this.radius+")}]"}},o.Circle.prototype.constructor=o.Circle,Object.defineProperty(o.Circle.prototype,"diameter",{get:function(){return this._diameter},set:function(t){t>0&&(this._diameter=t,this._radius=.5*t)}}),Object.defineProperty(o.Circle.prototype,"radius",{get:function(){return this._radius},set:function(t){t>0&&(this._radius=t,this._diameter=2*t)}}),Object.defineProperty(o.Circle.prototype,"left",{get:function(){return this.x-this._radius},set:function(t){t>this.x?(this._radius=0,this._diameter=0):this.radius=this.x-t}}),Object.defineProperty(o.Circle.prototype,"right",{get:function(){return this.x+this._radius},set:function(t){tthis.y?(this._radius=0,this._diameter=0):this.radius=this.y-t}}),Object.defineProperty(o.Circle.prototype,"bottom",{get:function(){return this.y+this._radius},set:function(t){t0?Math.PI*this._radius*this._radius:0}}),Object.defineProperty(o.Circle.prototype,"empty",{get:function(){return 0===this._diameter},set:function(t){!0===t&&this.setTo(0,0,0)}}),o.Circle.contains=function(t,e,i){if(t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom){return(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}return!1},o.Circle.equals=function(t,e){return t.x===e.x&&t.y===e.y&&t.diameter===e.diameter},o.Circle.intersects=function(t,e){return o.Math.distance(t.x,t.y,e.x,e.y)<=t.radius+e.radius},o.Circle.circumferencePoint=function(t,e,i,s){return void 0===i&&(i=!1),void 0===s&&(s=new o.Point),!0===i&&(e=o.Math.degToRad(e)),s.x=t.x+t.radius*Math.cos(e),s.y=t.y+t.radius*Math.sin(e),s},o.Circle.intersectsRectangle=function(t,e){var i=Math.abs(t.x-e.x-e.halfWidth);if(i>e.halfWidth+t.radius)return!1;var s=Math.abs(t.y-e.y-e.halfHeight);if(s>e.halfHeight+t.radius)return!1;if(i<=e.halfWidth||s<=e.halfHeight)return!0;var n=i-e.halfWidth,o=s-e.halfHeight;return n*n+o*o<=t.radius*t.radius},PIXI.Circle=o.Circle,/** -* @author Richard Davey -* @author Chad Engler -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Ellipse=function(t,e,i,s){t=t||0,e=e||0,i=i||0,s=s||0,this.x=t,this.y=e,this.width=i,this.height=s,this.type=o.ELLIPSE},o.Ellipse.prototype={setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},getBounds:function(){return new o.Rectangle(this.x-this.width,this.y-this.height,this.width,this.height)},copyFrom:function(t){return this.setTo(t.x,t.y,t.width,t.height)},copyTo:function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},clone:function(t){return void 0===t||null===t?t=new o.Ellipse(this.x,this.y,this.width,this.height):t.setTo(this.x,this.y,this.width,this.height),t},contains:function(t,e){return o.Ellipse.contains(this,t,e)},random:function(t){void 0===t&&(t=new o.Point);var e=Math.random()*Math.PI*2,i=Math.random();return t.x=Math.sqrt(i)*Math.cos(e),t.y=Math.sqrt(i)*Math.sin(e),t.x=this.x+t.x*this.width/2,t.y=this.y+t.y*this.height/2,t},toString:function(){return"[{Phaser.Ellipse (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")}]"}},o.Ellipse.prototype.constructor=o.Ellipse,Object.defineProperty(o.Ellipse.prototype,"left",{get:function(){return this.x},set:function(t){this.x=t}}),Object.defineProperty(o.Ellipse.prototype,"right",{get:function(){return this.x+this.width},set:function(t){t -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Line=function(t,e,i,s){t=t||0,e=e||0,i=i||0,s=s||0,this.start=new o.Point(t,e),this.end=new o.Point(i,s),this.type=o.LINE},o.Line.prototype={setTo:function(t,e,i,s){return this.start.setTo(t,e),this.end.setTo(i,s),this},fromSprite:function(t,e,i){return void 0===i&&(i=!1),i?this.setTo(t.center.x,t.center.y,e.center.x,e.center.y):this.setTo(t.x,t.y,e.x,e.y)},fromAngle:function(t,e,i,s){return this.start.setTo(t,e),this.end.setTo(t+Math.cos(i)*s,e+Math.sin(i)*s),this},rotate:function(t,e){var i=(this.start.x+this.end.x)/2,s=(this.start.y+this.end.y)/2;return this.start.rotate(i,s,t,e),this.end.rotate(i,s,t,e),this},rotateAround:function(t,e,i,s){return this.start.rotate(t,e,i,s),this.end.rotate(t,e,i,s),this},intersects:function(t,e,i){return o.Line.intersectsPoints(this.start,this.end,t.start,t.end,e,i)},reflect:function(t){return o.Line.reflect(this,t)},midPoint:function(t){return void 0===t&&(t=new o.Point),t.x=(this.start.x+this.end.x)/2,t.y=(this.start.y+this.end.y)/2,t},centerOn:function(t,e){var i=(this.start.x+this.end.x)/2,s=(this.start.y+this.end.y)/2,n=t-i,o=e-s;this.start.add(n,o),this.end.add(n,o)},pointOnLine:function(t,e){return(t-this.start.x)*(this.end.y-this.start.y)==(this.end.x-this.start.x)*(e-this.start.y)},pointOnSegment:function(t,e){var i=Math.min(this.start.x,this.end.x),s=Math.max(this.start.x,this.end.x),n=Math.min(this.start.y,this.end.y),o=Math.max(this.start.y,this.end.y);return this.pointOnLine(t,e)&&t>=i&&t<=s&&e>=n&&e<=o},random:function(t){void 0===t&&(t=new o.Point);var e=Math.random();return t.x=this.start.x+e*(this.end.x-this.start.x),t.y=this.start.y+e*(this.end.y-this.start.y),t},coordinatesOnLine:function(t,e){void 0===t&&(t=1),void 0===e&&(e=[]);var i=Math.round(this.start.x),s=Math.round(this.start.y),n=Math.round(this.end.x),o=Math.round(this.end.y),a=Math.abs(n-i),r=Math.abs(o-s),h=i-r&&(c-=r,i+=h),d=0&&y<=1&&g>=0&&g<=1?a:null}return a},o.Line.intersects=function(t,e,i,s){return o.Line.intersectsPoints(t.start,t.end,e.start,e.end,i,s)},o.Line.intersectsRectangle=function(t,e){if(!o.Rectangle.intersects(t,e))return!1;var i=t.start.x,s=t.start.y,n=t.end.x,a=t.end.y,r=e.x,h=e.y,l=e.right,c=e.bottom,u=0;if(i>=r&&i<=l&&s>=h&&s<=c||n>=r&&n<=l&&a>=h&&a<=c)return!0;if(i=r){if((u=s+(a-s)*(r-i)/(n-i))>h&&u<=c)return!0}else if(i>l&&n<=l&&(u=s+(a-s)*(l-i)/(n-i))>=h&&u<=c)return!0;if(s=h){if((u=i+(n-i)*(h-s)/(a-s))>=r&&u<=l)return!0}else if(s>c&&a<=c&&(u=i+(n-i)*(c-s)/(a-s))>=r&&u<=l)return!0;return!1},o.Line.reflect=function(t,e){return 2*e.normalAngle-3.141592653589793-t.angle},/** -* @author Mat Groves http://matgroves.com/ @Doormat23 -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Matrix=function(t,e,i,s,n,a){void 0!==t&&null!==t||(t=1),void 0!==e&&null!==e||(e=0),void 0!==i&&null!==i||(i=0),void 0!==s&&null!==s||(s=1),void 0!==n&&null!==n||(n=0),void 0!==a&&null!==a||(a=0),this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=a,this.type=o.MATRIX},o.Matrix.prototype={fromArray:function(t){return this.setTo(t[0],t[1],t[3],t[4],t[2],t[5])},setTo:function(t,e,i,s,n,o){return this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=o,this},clone:function(t){return void 0===t||null===t?t=new o.Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty):(t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty),t},copyTo:function(t){return t.copyFrom(this),t},copyFrom:function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},toArray:function(t,e){return void 0===e&&(e=new PIXI.Float32Array(9)),t?(e[0]=this.a,e[1]=this.b,e[2]=0,e[3]=this.c,e[4]=this.d,e[5]=0,e[6]=this.tx,e[7]=this.ty,e[8]=1):(e[0]=this.a,e[1]=this.c,e[2]=this.tx,e[3]=this.b,e[4]=this.d,e[5]=this.ty,e[6]=0,e[7]=0,e[8]=1),e},apply:function(t,e){return void 0===e&&(e=new o.Point),e.x=this.a*t.x+this.c*t.y+this.tx,e.y=this.b*t.x+this.d*t.y+this.ty,e},applyInverse:function(t,e){void 0===e&&(e=new o.Point);var i=1/(this.a*this.d+this.c*-this.b),s=t.x,n=t.y;return e.x=this.d*i*s+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,e.y=this.a*i*n+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,e},translate:function(t,e){return this.tx+=t,this.ty+=e,this},scale:function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},rotate:function(t){var e=Math.cos(t),i=Math.sin(t),s=this.a,n=this.c,o=this.tx;return this.a=s*e-this.b*i,this.b=s*i+this.b*e,this.c=n*e-this.d*i,this.d=n*i+this.d*e,this.tx=o*e-this.ty*i,this.ty=o*i+this.ty*e,this},append:function(t){var e=this.a,i=this.b,s=this.c,n=this.d;return this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*n,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*n,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*n+this.ty,this},identity:function(){return this.setTo(1,0,0,1,0,0)}},o.identityMatrix=new o.Matrix,PIXI.Matrix=o.Matrix,PIXI.identityMatrix=o.identityMatrix,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Point=function(t,e){t=t||0,e=e||0,this.x=t,this.y=e,this.type=o.POINT},o.Point.prototype={copyFrom:function(t){return this.setTo(t.x,t.y)},invert:function(){return this.setTo(this.y,this.x)},setTo:function(t,e){return this.x=t||0,this.y=e||(0!==e?this.x:0),this},set:function(t,e){return this.x=t||0,this.y=e||(0!==e?this.x:0),this},add:function(t,e){return this.x+=t,this.y+=e,this},subtract:function(t,e){return this.x-=t,this.y-=e,this},multiply:function(t,e){return this.x*=t,this.y*=e,this},divide:function(t,e){return this.x/=t,this.y/=e,this},clampX:function(t,e){return this.x=o.Math.clamp(this.x,t,e),this},clampY:function(t,e){return this.y=o.Math.clamp(this.y,t,e),this},clamp:function(t,e){return this.x=o.Math.clamp(this.x,t,e),this.y=o.Math.clamp(this.y,t,e),this},clone:function(t){return void 0===t||null===t?t=new o.Point(this.x,this.y):t.setTo(this.x,this.y),t},copyTo:function(t){return t.x=this.x,t.y=this.y,t},distance:function(t,e){return o.Point.distance(this,t,e)},equals:function(t){return t.x===this.x&&t.y===this.y},angle:function(t,e){return void 0===e&&(e=!1),e?o.Math.radToDeg(Math.atan2(t.y-this.y,t.x-this.x)):Math.atan2(t.y-this.y,t.x-this.x)},rotate:function(t,e,i,s,n){return o.Point.rotate(this,t,e,i,s,n)},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(t){return this.normalize().multiply(t,t)},normalize:function(){if(!this.isZero()){var t=this.getMagnitude();this.x/=t,this.y/=t}return this},isZero:function(){return 0===this.x&&0===this.y},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},perp:function(){return this.setTo(-this.y,this.x)},rperp:function(){return this.setTo(this.y,-this.x)},normalRightHand:function(){return this.setTo(-1*this.y,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+")}]"}},o.Point.prototype.constructor=o.Point,o.Point.add=function(t,e,i){return void 0===i&&(i=new o.Point),i.x=t.x+e.x,i.y=t.y+e.y,i},o.Point.subtract=function(t,e,i){return void 0===i&&(i=new o.Point),i.x=t.x-e.x,i.y=t.y-e.y,i},o.Point.multiply=function(t,e,i){return void 0===i&&(i=new o.Point),i.x=t.x*e.x,i.y=t.y*e.y,i},o.Point.divide=function(t,e,i){return void 0===i&&(i=new o.Point),i.x=t.x/e.x,i.y=t.y/e.y,i},o.Point.equals=function(t,e){return t.x===e.x&&t.y===e.y},o.Point.angle=function(t,e){return Math.atan2(t.y-e.y,t.x-e.x)},o.Point.negative=function(t,e){return void 0===e&&(e=new o.Point),e.setTo(-t.x,-t.y)},o.Point.multiplyAdd=function(t,e,i,s){return void 0===s&&(s=new o.Point),s.setTo(t.x+e.x*i,t.y+e.y*i)},o.Point.interpolate=function(t,e,i,s){return void 0===s&&(s=new o.Point),s.setTo(t.x+(e.x-t.x)*i,t.y+(e.y-t.y)*i)},o.Point.perp=function(t,e){return void 0===e&&(e=new o.Point),e.setTo(-t.y,t.x)},o.Point.rperp=function(t,e){return void 0===e&&(e=new o.Point),e.setTo(t.y,-t.x)},o.Point.distance=function(t,e,i){var s=o.Math.distance(t.x,t.y,e.x,e.y);return i?Math.round(s):s},o.Point.project=function(t,e,i){void 0===i&&(i=new o.Point);var s=t.dot(e)/e.getMagnitudeSq();return 0!==s&&i.setTo(s*e.x,s*e.y),i},o.Point.projectUnit=function(t,e,i){void 0===i&&(i=new o.Point);var s=t.dot(e);return 0!==s&&i.setTo(s*e.x,s*e.y),i},o.Point.normalRightHand=function(t,e){return void 0===e&&(e=new o.Point),e.setTo(-1*t.y,t.x)},o.Point.normalize=function(t,e){void 0===e&&(e=new o.Point);var i=t.getMagnitude();return 0!==i&&e.setTo(t.x/i,t.y/i),e},o.Point.rotate=function(t,e,i,s,n,a){if(n&&(s=o.Math.degToRad(s)),void 0===a){t.subtract(e,i);var r=Math.sin(s),h=Math.cos(s),l=h*t.x-r*t.y,c=r*t.x+h*t.y;t.x=l+e,t.y=c+i}else{var u=s+Math.atan2(t.y-i,t.x-e);t.x=e+a*Math.cos(u),t.y=i+a*Math.sin(u)}return t},o.Point.centroid=function(t,e){if(void 0===e&&(e=new o.Point),"[object Array]"!==Object.prototype.toString.call(t))throw new Error("Phaser.Point. Parameter 'points' must be an array");var i=t.length;if(i<1)throw new Error("Phaser.Point. Parameter 'points' array must not be empty");if(1===i)return e.copyFrom(t[0]),e;for(var s=0;s -* @author Adrien Brault -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Polygon=function(){this.area=0,this._points=[],arguments.length>0&&this.setTo.apply(this,arguments),this.closed=!0,this.flattened=!1,this.type=o.POLYGON},o.Polygon.prototype={toNumberArray:function(t){void 0===t&&(t=[]);for(var e=0;e0){Array.isArray(t)||(t=Array.prototype.slice.call(arguments));for(var e=Number.MAX_VALUE,i=0,s=t.length;i -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Rectangle=function(t,e,i,s){t=t||0,e=e||0,i=i||0,s=s||0,this.x=t,this.y=e,this.width=i,this.height=s,this.type=o.RECTANGLE},o.Rectangle.prototype={offset:function(t,e){return this.x+=t,this.y+=e,this},offsetPoint:function(t){return this.offset(t.x,t.y)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},scale:function(t,e){return void 0===e&&(e=t),this.width*=t,this.height*=e,this},centerOn:function(t,e){return this.centerX=t,this.centerY=e,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(t){return this.setTo(t.x,t.y,t.width,t.height)},copyTo:function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},inflate:function(t,e){return o.Rectangle.inflate(this,t,e)},size:function(t){return o.Rectangle.size(this,t)},resize:function(t,e){return this.width=t,this.height=e,this},clone:function(t){return o.Rectangle.clone(this,t)},contains:function(t,e){return o.Rectangle.contains(this,t,e)},containsRect:function(t){return o.Rectangle.containsRect(t,this)},equals:function(t){return o.Rectangle.equals(this,t)},intersection:function(t,e){return o.Rectangle.intersection(this,t,e)},intersects:function(t){return o.Rectangle.intersects(this,t)},intersectsRaw:function(t,e,i,s,n){return o.Rectangle.intersectsRaw(this,t,e,i,s,n)},union:function(t,e){return o.Rectangle.union(this,t,e)},random:function(t){return void 0===t&&(t=new o.Point),t.x=this.randomX,t.y=this.randomY,t},getPoint:function(t,e){switch(void 0===e&&(e=new o.Point),t){default:case o.TOP_LEFT:return e.set(this.x,this.y);case o.TOP_CENTER:return e.set(this.centerX,this.y);case o.TOP_RIGHT:return e.set(this.right,this.y);case o.LEFT_CENTER:return e.set(this.x,this.centerY);case o.CENTER:return e.set(this.centerX,this.centerY);case o.RIGHT_CENTER:return e.set(this.right,this.centerY);case o.BOTTOM_LEFT:return e.set(this.x,this.bottom);case o.BOTTOM_CENTER:return e.set(this.centerX,this.bottom);case o.BOTTOM_RIGHT:return e.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(o.Rectangle.prototype,"halfWidth",{get:function(){return Math.round(this.width/2)}}),Object.defineProperty(o.Rectangle.prototype,"halfHeight",{get:function(){return Math.round(this.height/2)}}),Object.defineProperty(o.Rectangle.prototype,"bottom",{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}}),Object.defineProperty(o.Rectangle.prototype,"bottomLeft",{get:function(){return new o.Point(this.x,this.bottom)},set:function(t){this.x=t.x,this.bottom=t.y}}),Object.defineProperty(o.Rectangle.prototype,"bottomRight",{get:function(){return new o.Point(this.right,this.bottom)},set:function(t){this.right=t.x,this.bottom=t.y}}),Object.defineProperty(o.Rectangle.prototype,"left",{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}}),Object.defineProperty(o.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}}),Object.defineProperty(o.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}}),Object.defineProperty(o.Rectangle.prototype,"perimeter",{get:function(){return 2*this.width+2*this.height}}),Object.defineProperty(o.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(t){this.x=t-this.halfWidth}}),Object.defineProperty(o.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(t){this.y=t-this.halfHeight}}),Object.defineProperty(o.Rectangle.prototype,"randomX",{get:function(){return this.x+Math.random()*this.width}}),Object.defineProperty(o.Rectangle.prototype,"randomY",{get:function(){return this.y+Math.random()*this.height}}),Object.defineProperty(o.Rectangle.prototype,"top",{get:function(){return this.y},set:function(t){t>=this.bottom?(this.height=0,this.y=t):this.height=this.bottom-t}}),Object.defineProperty(o.Rectangle.prototype,"topLeft",{get:function(){return new o.Point(this.x,this.y)},set:function(t){this.x=t.x,this.y=t.y}}),Object.defineProperty(o.Rectangle.prototype,"topRight",{get:function(){return new o.Point(this.x+this.width,this.y)},set:function(t){this.right=t.x,this.y=t.y}}),Object.defineProperty(o.Rectangle.prototype,"empty",{get:function(){return!this.width||!this.height},set:function(t){!0===t&&this.setTo(0,0,0,0)}}),o.Rectangle.prototype.constructor=o.Rectangle,o.Rectangle.inflate=function(t,e,i){return t.x-=e,t.width+=2*e,t.y-=i,t.height+=2*i,t},o.Rectangle.inflatePoint=function(t,e){return o.Rectangle.inflate(t,e.x,e.y)},o.Rectangle.size=function(t,e){return void 0===e||null===e?e=new o.Point(t.width,t.height):e.setTo(t.width,t.height),e},o.Rectangle.clone=function(t,e){return void 0===e||null===e?e=new o.Rectangle(t.x,t.y,t.width,t.height):e.setTo(t.x,t.y,t.width,t.height),e},o.Rectangle.contains=function(t,e,i){return!(t.width<=0||t.height<=0)&&(e>=t.x&&e=t.y&&i=t&&n=e&&oe.volume)&&(t.x>=e.x&&t.y>=e.y&&t.righte.right||t.y>e.bottom)},o.Rectangle.intersectsRaw=function(t,e,i,s,n,o){return void 0===o&&(o=0),!(e>t.right+o||it.bottom+o||ni&&(i=t.x),t.xn&&(n=t.y),t.y -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.RoundedRectangle=function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=20),this.x=t,this.y=e,this.width=i,this.height=s,this.radius=n||20,this.type=o.ROUNDEDRECTANGLE},o.RoundedRectangle.prototype={clone:function(){return new o.RoundedRectangle(this.x,this.y,this.width,this.height,this.radius)},contains:function(t,e){if(this.width<=0||this.height<=0)return!1;var i=this.x;if(t>=i&&t<=i+this.width){var s=this.y;if(e>=s&&e<=s+this.height)return!0}return!1}},o.RoundedRectangle.prototype.constructor=o.RoundedRectangle,PIXI.RoundedRectangle=o.RoundedRectangle,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Camera=function(t,e,i,s,n,a){this.game=t,this.world=t.world,this.id=0,this.view=new o.Rectangle(i,s,n,a),this.bounds=new o.Rectangle(i,s,n,a),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 o.Point(1,1),this.onShakeComplete=new o.Signal,this.onFlashComplete=new o.Signal,this.onFadeComplete=new o.Signal,this.fx=null,this._targetPosition=new o.Point,this._edge=0,this._position=new o.Point,this._shake={intensity:0,duration:0,horizontal:!1,vertical:!1,shakeBounds:!0,x:0,y:0},this._fxDuration=0,this._fxType=0},o.Camera.FOLLOW_LOCKON=0,o.Camera.FOLLOW_PLATFORMER=1,o.Camera.FOLLOW_TOPDOWN=2,o.Camera.FOLLOW_TOPDOWN_TIGHT=3,o.Camera.SHAKE_BOTH=4,o.Camera.SHAKE_HORIZONTAL=5,o.Camera.SHAKE_VERTICAL=6,o.Camera.ENABLE_FX=!0,o.Camera.prototype={boot:function(){this.displayObject=this.game.world,this.scale=this.game.world.scale,this.game.camera=this,o.Graphics&&o.Camera.ENABLE_FX&&(this.fx=new o.Graphics(this.game),this.game.stage.addChild(this.fx))},preUpdate:function(){this.totalInView=0},follow:function(t,e,i,s){void 0===e&&(e=o.Camera.FOLLOW_LOCKON),void 0===i&&(i=1),void 0===s&&(s=1),this.target=t,this.lerp.set(i,s);var n;switch(e){case o.Camera.FOLLOW_PLATFORMER:var a=this.width/8,r=this.height/3;this.deadzone=new o.Rectangle((this.width-a)/2,(this.height-r)/2-.25*r,a,r);break;case o.Camera.FOLLOW_TOPDOWN:n=Math.max(this.width,this.height)/4,this.deadzone=new o.Rectangle((this.width-n)/2,(this.height-n)/2,n,n);break;case o.Camera.FOLLOW_TOPDOWN_TIGHT:n=Math.max(this.width,this.height)/8,this.deadzone=new o.Rectangle((this.width-n)/2,(this.height-n)/2,n,n);break;case o.Camera.FOLLOW_LOCKON:default:this.deadzone=null}},unfollow:function(){this.target=null},focusOn:function(t){this.setPosition(Math.round(t.x-this.view.halfWidth),Math.round(t.y-this.view.halfHeight))},focusOnXY:function(t,e){this.setPosition(Math.round(t-this.view.halfWidth),Math.round(e-this.view.halfHeight))},shake:function(t,e,i,s,n){return void 0===t&&(t=.05),void 0===e&&(e=500),void 0===i&&(i=!0),void 0===s&&(s=o.Camera.SHAKE_BOTH),void 0===n&&(n=!0),!(!i&&this._shake.duration>0)&&(this._shake.intensity=t,this._shake.duration=e,this._shake.shakeBounds=n,this._shake.x=0,this._shake.y=0,this._shake.horizontal=s===o.Camera.SHAKE_BOTH||s===o.Camera.SHAKE_HORIZONTAL,this._shake.vertical=s===o.Camera.SHAKE_BOTH||s===o.Camera.SHAKE_VERTICAL,!0)},flash:function(t,e,i){return void 0===t&&(t=16777215),void 0===e&&(e=500),void 0===i&&(i=!1),!(!this.fx||!i&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(t),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=1,this._fxDuration=e,this._fxType=0,!0)},fade:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=500),void 0===i&&(i=!1),!(!this.fx||!i&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(t),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=0,this._fxDuration=e,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._edgethis.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._edgethis.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 t=this.view.x+this._shake.x,e=this.view.right+this._shake.x,i=this.view.y+this._shake.y,s=this.view.bottom+this._shake.y;t<=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)),e>=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)),i<=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)),s>=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(t,e){this.view.x=t,this.view.y=e,this.bounds&&this.checkBounds()},setSize:function(t,e){this.view.width=t,this.view.height=e},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}},o.Camera.prototype.constructor=o.Camera,Object.defineProperty(o.Camera.prototype,"x",{get:function(){return this.view.x},set:function(t){this.view.x=t,this.bounds&&this.checkBounds()}}),Object.defineProperty(o.Camera.prototype,"y",{get:function(){return this.view.y},set:function(t){this.view.y=t,this.bounds&&this.checkBounds()}}),Object.defineProperty(o.Camera.prototype,"position",{get:function(){return this._position.set(this.view.x,this.view.y),this._position},set:function(t){void 0!==t.x&&(this.view.x=t.x),void 0!==t.y&&(this.view.y=t.y),this.bounds&&this.checkBounds()}}),Object.defineProperty(o.Camera.prototype,"width",{get:function(){return this.view.width},set:function(t){this.view.width=t}}),Object.defineProperty(o.Camera.prototype,"height",{get:function(){return this.view.height},set:function(t){this.view.height=t}}),Object.defineProperty(o.Camera.prototype,"shakeIntensity",{get:function(){return this._shake.intensity},set:function(t){this._shake.intensity=t}}),/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.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},o.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(){}},o.State.prototype.constructor=o.State,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.StateManager=function(t,e){this.game=t,this.states={},this._pendingState=null,void 0!==e&&null!==e&&(this._pendingState=e),this._clearWorld=!1,this._clearCache=!1,this._created=!1,this._args=[],this.current="",this.onStateChange=new o.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},o.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(t,e,i){void 0===i&&(i=!1);var s;return e instanceof o.State?s=e:"object"==typeof e?(s=e,s.game=this.game):"function"==typeof e&&(s=new e(this.game)),this.states[t]=s,i&&(this.game.isBooted?this.start(t):this._pendingState=t),s},remove:function(t){this.current===t&&(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[t]},start:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1),this.checkState(t)&&(this._pendingState=t,this._clearWorld=e,this._clearCache=i,arguments.length>3&&(this._args=Array.prototype.splice.call(arguments,3)))},restart:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),this._pendingState=this.current,this._clearWorld=t,this._clearCache=e,arguments.length>2&&(this._args=Array.prototype.slice.call(arguments,2))},dummy:function(){},preUpdate:function(){if(this._pendingState&&this.game.isBooted){var t=this.current;if(this.clearCurrentState(),this.setCurrentState(this._pendingState),this.onStateChange.dispatch(this.current,t),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(t){return!!this.states[t]&&!!(this.states[t].preload||this.states[t].create||this.states[t].update||this.states[t].render)},link:function(t){this.states[t].game=this.game,this.states[t].add=this.game.add,this.states[t].make=this.game.make,this.states[t].camera=this.game.camera,this.states[t].cache=this.game.cache,this.states[t].input=this.game.input,this.states[t].load=this.game.load,this.states[t].math=this.game.math,this.states[t].sound=this.game.sound,this.states[t].scale=this.game.scale,this.states[t].state=this,this.states[t].stage=this.game.stage,this.states[t].time=this.game.time,this.states[t].tweens=this.game.tweens,this.states[t].world=this.game.world,this.states[t].particles=this.game.particles,this.states[t].rnd=this.game.rnd,this.states[t].physics=this.game.physics,this.states[t].key=t},unlink:function(t){this.states[t]&&(this.states[t].game=null,this.states[t].add=null,this.states[t].make=null,this.states[t].camera=null,this.states[t].cache=null,this.states[t].input=null,this.states[t].load=null,this.states[t].math=null,this.states[t].sound=null,this.states[t].scale=null,this.states[t].state=null,this.states[t].stage=null,this.states[t].time=null,this.states[t].tweens=null,this.states[t].world=null,this.states[t].particles=null,this.states[t].rnd=null,this.states[t].physics=null)},setCurrentState:function(t){this.callbackContext=this.states[t],this.link(t),this.onInitCallback=this.states[t].init||this.dummy,this.onPreloadCallback=this.states[t].preload||null,this.onLoadRenderCallback=this.states[t].loadRender||null,this.onLoadUpdateCallback=this.states[t].loadUpdate||null,this.onCreateCallback=this.states[t].create||null,this.onUpdateCallback=this.states[t].update||null,this.onPreRenderCallback=this.states[t].preRender||null,this.onRenderCallback=this.states[t].render||null,this.onResizeCallback=this.states[t].resize||null,this.onPausedCallback=this.states[t].paused||null,this.onResumedCallback=this.states[t].resumed||null,this.onPauseUpdateCallback=this.states[t].pauseUpdate||null,this.onShutDownCallback=this.states[t].shutdown||this.dummy,""!==this.current&&this.game.physics.reset(),this.current=t,this._created=!1,this.onInitCallback.apply(this.callbackContext,this._args),t===this._pendingState&&(this._args=[]),this.game._kickstart=!0},getCurrentState:function(){return this.states[this.current]},loadComplete:function(){!1===this._created&&this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game),!1===this._created&&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(t){this._created&&this.onPreRenderCallback&&this.onPreRenderCallback.call(this.callbackContext,this.game,t)},resize:function(t,e){this.onResizeCallback&&this.onResizeCallback.call(this.callbackContext,t,e)},render:function(){this._created?this.onRenderCallback&&(this.game.renderType===o.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=""}},o.StateManager.prototype.constructor=o.StateManager,Object.defineProperty(o.StateManager.prototype,"created",{get:function(){return this._created}}),/** -* @author Miller Medeiros http://millermedeiros.github.com/js-signals/ -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Signal=function(){},o.Signal.prototype={_bindings:null,_prevParams:null,memorize:!1,_shouldPropagate:!0,active:!0,_boundDispatch:!1,validateListener:function(t,e){if("function"!=typeof t)throw new Error("Phaser.Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",e))},_registerListener:function(t,e,i,s,n){var a=this._indexOfListener(t,i),r;if(-1!==a){if(r=this._bindings[a],r.isOnce()!==e)throw new Error("You cannot add"+(e?"":"Once")+"() then add"+(e?"Once":"")+"() the same listener without removing the relationship first.")}else r=new o.SignalBinding(this,t,e,i,s,n),this._addBinding(r);return this.memorize&&this._prevParams&&r.execute(this._prevParams),r},_addBinding:function(t){this._bindings||(this._bindings=[]);var e=this._bindings.length;do{e--}while(this._bindings[e]&&t._priority<=this._bindings[e]._priority);this._bindings.splice(e+1,0,t)},_indexOfListener:function(t,e){if(!this._bindings)return-1;void 0===e&&(e=null);for(var i=this._bindings.length,s;i--;)if(s=this._bindings[i],s._listener===t&&s.context===e)return i;return-1},has:function(t,e){return-1!==this._indexOfListener(t,e)},add:function(t,e,i){this.validateListener(t,"add");var s=[];if(arguments.length>3)for(var n=3;n3)for(var n=3;n -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.SignalBinding=function(t,e,i,s,n,o){this._listener=e,i&&(this._isOnce=!0),null!=s&&(this.context=s),this._signal=t,n&&(this._priority=n),o&&o.length&&(this._args=o)},o.SignalBinding.prototype={context:null,_isOnce:!1,_priority:0,_args:null,callCount:0,active:!0,params:null,execute:function(t){var e,i;return this.active&&this._listener&&(i=this.params?this.params.concat(t):t,this._args&&(i=i.concat(this._args)),e=this._listener.apply(this.context,i),this.callCount++,this._isOnce&&this.detach()),e},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+"]"}},o.SignalBinding.prototype.constructor=o.SignalBinding,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Filter=function(t,e,i){this.game=t,this.type=o.WEBGL_FILTER,this.passes=[this],this.shaders=[],this.dirty=!0,this.padding=0,this.prevPoint=new o.Point;var s=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:[s.getFullYear(),s.getMonth(),s.getDate(),60*s.getHours()*60+60*s.getMinutes()+s.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}}},e)for(var n in e)this.uniforms[n]=e[n];this.fragmentSrc=i||""},o.Filter.prototype={init:function(){},setResolution:function(t,e){this.uniforms.resolution.value.x=t,this.uniforms.resolution.value.y=e},update:function(t){if(void 0!==t){var e=t.x/this.game.width,i=1-t.y/this.game.height;e===this.prevPoint.x&&i===this.prevPoint.y||(this.uniforms.mouse.value.x=e.toFixed(2),this.uniforms.mouse.value.y=i.toFixed(2),this.prevPoint.set(e,i))}this.uniforms.time.value=this.game.time.totalElapsedSeconds()},addToWorld:function(t,e,i,s,n,o){void 0===n&&(n=0),void 0===o&&(o=0),void 0!==i&&null!==i?this.width=i:i=this.width,void 0!==s&&null!==s?this.height=s:s=this.height;var a=this.game.add.image(t,e,"__default");return a.width=i,a.height=s,a.anchor.set(n,o),a.filters=[this],a},destroy:function(){this.game=null}},o.Filter.prototype.constructor=o.Filter,Object.defineProperty(o.Filter.prototype,"width",{get:function(){return this.uniforms.resolution.value.x},set:function(t){this.uniforms.resolution.value.x=t}}),Object.defineProperty(o.Filter.prototype,"height",{get:function(){return this.uniforms.resolution.value.y},set:function(t){this.uniforms.resolution.value.y=t}}),/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Plugin=function(t,e){void 0===e&&(e=null),this.game=t,this.parent=e,this.active=!1,this.visible=!1,this.hasPreUpdate=!1,this.hasUpdate=!1,this.hasPostUpdate=!1,this.hasRender=!1,this.hasPostRender=!1},o.Plugin.prototype={preUpdate:function(){},update:function(){},render:function(){},postRender:function(){},destroy:function(){this.game=null,this.parent=null,this.active=!1,this.visible=!1}},o.Plugin.prototype.constructor=o.Plugin,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.PluginManager=function(t){this.game=t,this.plugins=[],this._len=0,this._i=0},o.PluginManager.prototype={add:function(t){var e=Array.prototype.slice.call(arguments,1),i=!1;return"function"==typeof t?t=new t(this.game,this):(t.game=this.game,t.parent=this),"function"==typeof t.preUpdate&&(t.hasPreUpdate=!0,i=!0),"function"==typeof t.update&&(t.hasUpdate=!0,i=!0),"function"==typeof t.postUpdate&&(t.hasPostUpdate=!0,i=!0),"function"==typeof t.render&&(t.hasRender=!0,i=!0),"function"==typeof t.postRender&&(t.hasPostRender=!0,i=!0),i?((t.hasPreUpdate||t.hasUpdate||t.hasPostUpdate)&&(t.active=!0),(t.hasRender||t.hasPostRender)&&(t.visible=!0),this._len=this.plugins.push(t),"function"==typeof t.init&&t.init.apply(t,e),t):null},remove:function(t,e){for(void 0===e&&(e=!0),this._i=this._len;this._i--;)if(this.plugins[this._i]===t)return e&&t.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}},o.PluginManager.prototype.constructor=o.PluginManager,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Stage=function(t){this.game=t,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),t.config&&this.parseConfig(t.config)},o.Stage.prototype=Object.create(PIXI.DisplayObjectContainer.prototype),o.Stage.prototype.constructor=o.Stage,o.Stage.prototype.parseConfig=function(t){t.disableVisibilityChange&&(this.disableVisibilityChange=t.disableVisibilityChange),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)},o.Stage.prototype.boot=function(){o.DOM.getOffset(this.game.canvas,this.offset),o.Canvas.setUserSelect(this.game.canvas,"none"),o.Canvas.setTouchAction(this.game.canvas,"none"),this.checkVisibility()},o.Stage.prototype.preUpdate=function(){this.currentRenderOrderID=0;for(var t=0;t -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Group=function(t,e,i,s,n,a){void 0===s&&(s=!1),void 0===n&&(n=!1),void 0===a&&(a=o.Physics.ARCADE),this.game=t,void 0===e&&(e=t.world),this.name=i||"group",this.z=0,PIXI.DisplayObjectContainer.call(this),s?(this.game.stage.addChild(this),this.z=this.game.stage.children.length):e&&(e.addChild(this),this.z=e.children.length),this.type=o.GROUP,this.physicsType=o.GROUP,this.alive=!0,this.exists=!0,this.ignoreDestroy=!1,this.pendingDestroy=!1,this.classType=o.Sprite,this.cursor=null,this.inputEnableChildren=!1,this.onChildInputDown=new o.Signal,this.onChildInputUp=new o.Signal,this.onChildInputOver=new o.Signal,this.onChildInputOut=new o.Signal,this.enableBody=n,this.enableBodyDebug=!1,this.physicsBodyType=a,this.physicsSortDirection=null,this.onDestroy=new o.Signal,this.cursorIndex=0,this.fixedToCamera=!1,this.cameraOffset=new o.Point,this.hash=[],this._sortProperty="z"},o.Group.prototype=Object.create(PIXI.DisplayObjectContainer.prototype),o.Group.prototype.constructor=o.Group,o.Group.RETURN_NONE=0,o.Group.RETURN_TOTAL=1,o.Group.RETURN_CHILD=2,o.Group.RETURN_ALL=3,o.Group.SORT_ASCENDING=-1,o.Group.SORT_DESCENDING=1,o.Group.prototype.add=function(t,e,i){return void 0===e&&(e=!1),t.parent===this?t:(t.body&&t.parent&&t.parent.hash&&t.parent.removeFromHash(t),void 0===i?(t.z=this.children.length,this.addChild(t)):(this.addChildAt(t,i),this.updateZ()),this.enableBody&&t.hasOwnProperty("body")&&null===t.body?this.game.physics.enable(t,this.physicsBodyType):t.body&&this.addToHash(t),!this.inputEnableChildren||t.input&&!t.inputEnabled||(t.inputEnabled=!0),!e&&t.events&&t.events.onAddedToGroup$dispatch(t,this),null===this.cursor&&(this.cursor=t),t)},o.Group.prototype.addAt=function(t,e,i){this.add(t,i,e)},o.Group.prototype.addToHash=function(t){if(t.parent===this){if(-1===this.hash.indexOf(t))return this.hash.push(t),!0}return!1},o.Group.prototype.removeFromHash=function(t){if(t){var e=this.hash.indexOf(t);if(-1!==e)return this.hash.splice(e,1),!0}return!1},o.Group.prototype.addMultiple=function(t,e){if(t instanceof o.Group)t.moveAll(this,e);else if(Array.isArray(t))for(var i=0;i=this.children.length?-1:this.getChildAt(t)},o.Group.prototype.create=function(t,e,i,s,n,o){void 0===n&&(n=!0);var a=new this.classType(this.game,t,e,i,s);return a.exists=n,a.visible=n,a.alive=n,this.add(a,!1,o)},o.Group.prototype.createMultiple=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=!1),Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var n=this,o=[];return e.forEach(function(e){i.forEach(function(i){for(var a=0;athis.children.length||-1===t&&-1===e)return!1;for(var r=new o.Rectangle(0,0,i,s),h=t*i,l=e*s,c=a;cthis.children.length-1&&(t=0),this.cursor)return this.cursorIndex=t,this.cursor=this.children[this.cursorIndex],this.cursor},o.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},o.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},o.Group.prototype.swap=function(t,e){this.swapChildren(t,e),this.updateZ()},o.Group.prototype.bringToTop=function(t){return t.parent===this&&this.getIndex(t)0&&(this.remove(t,!1,!0),this.addAt(t,0,!0)),t},o.Group.prototype.moveUp=function(t){if(t.parent===this&&this.getIndex(t)0){var e=this.getIndex(t),i=this.getAt(e-1);i&&this.swap(t,i)}return t},o.Group.prototype.xy=function(t,e,i){if(t<0||t>this.children.length)return-1;this.getChildAt(t).x=e,this.getChildAt(t).y=i},o.Group.prototype.reverse=function(){this.children.reverse(),this.updateZ()},o.Group.prototype.getIndex=function(t){return this.children.indexOf(t)},o.Group.prototype.getByName=function(t){for(var e=0;e0))return!1;var o=e.length;return 1===o?0===s?t[e[0]]=i:1===s?t[e[0]]+=i:2===s?t[e[0]]-=i:3===s?t[e[0]]*=i:4===s&&(t[e[0]]/=i):2===o?0===s?t[e[0]][e[1]]=i:1===s?t[e[0]][e[1]]+=i:2===s?t[e[0]][e[1]]-=i:3===s?t[e[0]][e[1]]*=i:4===s&&(t[e[0]][e[1]]/=i):3===o?0===s?t[e[0]][e[1]][e[2]]=i:1===s?t[e[0]][e[1]][e[2]]+=i:2===s?t[e[0]][e[1]][e[2]]-=i:3===s?t[e[0]][e[1]][e[2]]*=i:4===s&&(t[e[0]][e[1]][e[2]]/=i):4===o&&(0===s?t[e[0]][e[1]][e[2]][e[3]]=i:1===s?t[e[0]][e[1]][e[2]][e[3]]+=i:2===s?t[e[0]][e[1]][e[2]][e[3]]-=i:3===s?t[e[0]][e[1]][e[2]][e[3]]*=i:4===s&&(t[e[0]][e[1]][e[2]][e[3]]/=i)),!0},o.Group.prototype.checkProperty=function(t,e,i,s){return void 0===s&&(s=!1),!(!o.Utils.getProperty(t,e)&&s)&&o.Utils.getProperty(t,e)===i},o.Group.prototype.set=function(t,e,i,s,n,o,a){if(void 0===a&&(a=!1),e=e.split("."),void 0===s&&(s=!1),void 0===n&&(n=!1),(!1===s||s&&t.alive)&&(!1===n||n&&t.visible))return this.setProperty(t,e,i,o,a)},o.Group.prototype.setAll=function(t,e,i,s,n,o){void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===o&&(o=!1),t=t.split("."),n=n||0;for(var a=0;a2){i=[];for(var s=2;s2){n=[];for(var o=2;o2){i=[null];for(var s=2;s2){i=[null];for(var s=2;s2){i=[null];for(var s=2;se[this._sortProperty]?1:t.ze[this._sortProperty]?-1:0},o.Group.prototype.iterate=function(t,e,i,s,n,a){if(0===this.children.length){if(i===o.Group.RETURN_TOTAL)return 0;if(i===o.Group.RETURN_ALL)return[]}var r=0;if(i===o.Group.RETURN_ALL)var h=[];for(var l=0;l0)return this.children[this.children.length-1]},o.Group.prototype.getBottom=function(){if(this.children.length>0)return this.children[0]},o.Group.prototype.getClosestTo=function(t,e,i){for(var s=Number.MAX_VALUE,n=0,a=null,r=0;rs&&(!e||e.call(i,h,n))&&(s=n,a=h)}return a},o.Group.prototype.countLiving=function(){return this.iterate("alive",!0,o.Group.RETURN_TOTAL)},o.Group.prototype.countDead=function(){return this.iterate("alive",!1,o.Group.RETURN_TOTAL)},o.Group.prototype.getRandom=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.children.length),0===e?null:o.ArrayUtils.getRandomItem(this.children,t,e)},o.Group.prototype.getRandomExists=function(t,e){var i=this.getAll("exists",!0,t,e);return this.game.rnd.pick(i)},o.Group.prototype.getAll=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=this.children.length);for(var n=[],o=i;o0&&t instanceof o.Group){do{t.add(this.children[0],e)}while(this.children.length>0);this.hash=[],this.cursor=null}return t},o.Group.prototype.removeAll=function(t,e,i){if(void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!1),0!==this.children.length){do{!e&&this.children[0].events&&this.children[0].events.onRemovedFromGroup$dispatch(this.children[0],this);var s=this.removeChild(this.children[0]);this.removeFromHash(s),t&&s&&s.destroy(!0,i)}while(this.children.length>0);this.hash=[],this.cursor=null}},o.Group.prototype.removeBetween=function(t,e,i,s){if(void 0===e&&(e=this.children.length-1),void 0===i&&(i=!1),void 0===s&&(s=!1),0!==this.children.length){if(t>e||t<0||e>this.children.length)return!1;for(var n=e;n>=t;){!s&&this.children[n].events&&this.children[n].events.onRemovedFromGroup$dispatch(this.children[n],this);var o=this.removeChild(this.children[n]);this.removeFromHash(o),i&&o&&o.destroy(!0),this.cursor===this.children[n]&&(this.cursor=null),n--}this.updateZ()}},o.Group.prototype.destroy=function(t,e){null===this.game||this.ignoreDestroy||(void 0===t&&(t=!0),void 0===e&&(e=!1),this.onDestroy.dispatch(this,t,e),this.removeAll(t),this.cursor=null,this.filters=null,this.pendingDestroy=!1,e||(this.parent&&this.parent.removeChild(this),this.game=null,this.exists=!1))},Object.defineProperty(o.Group.prototype,"total",{get:function(){return this.iterate("exists",!0,o.Group.RETURN_TOTAL)}}),Object.defineProperty(o.Group.prototype,"length",{get:function(){return this.children.length}}),Object.defineProperty(o.Group.prototype,"angle",{get:function(){return o.Math.radToDeg(this.rotation)},set:function(t){this.rotation=o.Math.degToRad(t)}}),Object.defineProperty(o.Group.prototype,"centerX",{get:function(){return this.getBounds(this.parent).centerX},set:function(t){var e=this.getBounds(this.parent),i=this.x-e.x;this.x=t+i-e.halfWidth}}),Object.defineProperty(o.Group.prototype,"centerY",{get:function(){return this.getBounds(this.parent).centerY},set:function(t){var e=this.getBounds(this.parent),i=this.y-e.y;this.y=t+i-e.halfHeight}}),Object.defineProperty(o.Group.prototype,"left",{get:function(){return this.getBounds(this.parent).left},set:function(t){var e=this.getBounds(this.parent),i=this.x-e.x;this.x=t+i}}),Object.defineProperty(o.Group.prototype,"right",{get:function(){return this.getBounds(this.parent).right},set:function(t){var e=this.getBounds(this.parent),i=this.x-e.x;this.x=t+i-e.width}}),Object.defineProperty(o.Group.prototype,"top",{get:function(){return this.getBounds(this.parent).top},set:function(t){var e=this.getBounds(this.parent),i=this.y-e.y;this.y=t+i}}),Object.defineProperty(o.Group.prototype,"bottom",{get:function(){return this.getBounds(this.parent).bottom},set:function(t){var e=this.getBounds(this.parent),i=this.y-e.y;this.y=t+i-e.height}}),/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.World=function(t){o.Group.call(this,t,null,"__world",!1),this.bounds=new o.Rectangle(0,0,t.width,t.height),this.camera=null,this._definedSize=!1,this._width=t.width,this._height=t.height,this.game.state.onStateChange.add(this.stateChange,this)},o.World.prototype=Object.create(o.Group.prototype),o.World.prototype.constructor=o.World,o.World.prototype.boot=function(){this.camera=new o.Camera(this.game,0,0,0,this.game.width,this.game.height),this.game.stage.addChild(this),this.camera.boot()},o.World.prototype.stateChange=function(){this.x=0,this.y=0,this.camera.reset()},o.World.prototype.setBounds=function(t,e,i,s){this._definedSize=!0,this._width=i,this._height=s,this.bounds.setTo(t,e,i,s),this.x=t,this.y=e,this.camera.bounds&&this.camera.bounds.setTo(t,e,Math.max(i,this.game.width),Math.max(s,this.game.height)),this.game.physics.setBoundsToWorld()},o.World.prototype.resize=function(t,e){this._definedSize&&(tthis.bounds.right&&(t.x=this.bounds.left)),n&&(t.y+t._currentBounds.heightthis.bounds.bottom&&(t.y=this.bounds.top))):(s&&t.x+ethis.bounds.right&&(t.x=this.bounds.left-e),n&&t.y+ethis.bounds.bottom&&(t.y=this.bounds.top-e))},Object.defineProperty(o.World.prototype,"width",{get:function(){return this.bounds.width},set:function(t){t -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Game=function(t,e,i,s,n,a,r,h){return this.id=o.GAMES.push(this)-1,this.config=null,this.physicsConfig=h,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=o.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=o.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 o.Signal,this.forceSingleUpdate=!0,this._nextFpsNotification=0,1===arguments.length&&"object"==typeof arguments[0]?this.parseConfig(arguments[0]):(this.config={enableDebug:!0},void 0!==t&&(this._width=t),void 0!==e&&(this._height=e),void 0!==i&&(this.renderType=i),void 0!==s&&(this.parent=s),void 0!==a&&(this.transparent=a),void 0!==r&&(this.antialias=r),this.rnd=new o.RandomDataGenerator([(Date.now()*Math.random()).toString()]),this.state=new o.StateManager(this,n)),this.device.whenReady(this.boot,this),this},o.Game.prototype={parseConfig:function(t){this.config=t,void 0===t.enableDebug&&(this.config.enableDebug=!0),t.width&&(this._width=t.width),t.height&&(this._height=t.height),t.renderer&&(this.renderType=t.renderer),t.parent&&(this.parent=t.parent),void 0!==t.transparent&&(this.transparent=t.transparent),void 0!==t.antialias&&(this.antialias=t.antialias),t.resolution&&(this.resolution=t.resolution),void 0!==t.preserveDrawingBuffer&&(this.preserveDrawingBuffer=t.preserveDrawingBuffer),t.physicsConfig&&(this.physicsConfig=t.physicsConfig);var e=[(Date.now()*Math.random()).toString()];t.seed&&(e=t.seed),this.rnd=new o.RandomDataGenerator(e);var i=null;t.state&&(i=t.state),this.state=new o.StateManager(this,i)},boot:function(){this.isBooted||(this.onPause=new o.Signal,this.onResume=new o.Signal,this.onBlur=new o.Signal,this.onFocus=new o.Signal,this.isBooted=!0,PIXI.game=this,this.math=o.Math,this.scale=new o.ScaleManager(this,this._width,this._height),this.stage=new o.Stage(this),this.setUpRenderer(),this.world=new o.World(this),this.add=new o.GameObjectFactory(this),this.make=new o.GameObjectCreator(this),this.cache=new o.Cache(this),this.load=new o.Loader(this),this.time=new o.Time(this),this.tweens=new o.TweenManager(this),this.input=new o.Input(this),this.sound=new o.SoundManager(this),this.physics=new o.Physics(this,this.physicsConfig),this.particles=new o.Particles(this),this.create=new o.Create(this),this.plugins=new o.PluginManager(this),this.net=new o.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 o.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 o.RequestAnimationFrame(this,this.config.forceSetTimeOut):this.raf=new o.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 t=o.VERSION,e="Canvas",i="HTML Audio",s=1;if(this.renderType===o.WEBGL?(e="WebGL",s++):this.renderType===o.HEADLESS&&(e="Headless"),this.device.webAudio&&(i="WebAudio",s++),this.device.chrome)for(var n=["%c %c %c @orange-games/phaser v"+t+" | Pixi.js | "+e+" | "+i+" %c %c %c http://phaser.io %c♥%c♥%c♥","background: #F47820","background: #ED873F","color: #ffffff; background: #DD6612;","background: #ED873F","background: #F47820","background: #ffffff"],a=0;a<3;a++)a1&&!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 e=1e3*this.time.slowMotion/this.time.desiredFps;this._deltaTime+=Math.max(Math.min(3*e,this.time.elapsed),0);var i=0;for(this.updatesThisFrame=Math.floor(this._deltaTime/e),this.forceSingleUpdate&&(this.updatesThisFrame=Math.min(1,this.updatesThisFrame));this._deltaTime>=e&&(this._deltaTime-=e,this.currentUpdateID=i,this.updateLogic(this.time.desiredFpsMult),i++,!this.forceSingleUpdate||1!==i);)this.time.refresh();i>this._lastCount?this._spiraling++:i -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Input=function(t){this.game=t,this.hitCanvas=null,this.hitContext=null,this.moveCallbacks=[],this.customCandidateHandler=null,this.customCandidateHandlerContext=null,this.pollRate=0,this.enabled=!0,this.multiInputOverride=o.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 o.ArraySet,this._localPoint=new o.Point,this._pollCounter=0,this._oldPosition=null,this._x=0,this._y=0},o.Input.MOUSE_OVERRIDES_TOUCH=0,o.Input.TOUCH_OVERRIDES_MOUSE=1,o.Input.MOUSE_TOUCH_COMBINE=2,o.Input.MAX_POINTERS=10,o.Input.prototype={boot:function(){this.mousePointer=new o.Pointer(this.game,0,o.PointerMode.CURSOR),this.addPointer(),this.addPointer(),this.mouse=new o.Mouse(this.game),this.touch=new o.Touch(this.game),this.mspointer=new o.MSPointer(this.game),o.Keyboard&&(this.keyboard=new o.Keyboard(this.game)),o.Gamepad&&(this.gamepad=new o.Gamepad(this.game)),this.onDown=new o.Signal,this.onUp=new o.Signal,this.onTap=new o.Signal,this.onHold=new o.Signal,this.scale=new o.Point(1,1),this.speed=new o.Point,this.position=new o.Point,this._oldPosition=new o.Point,this.circle=new o.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 t=this;this._onClickTrampoline=function(e){t.onClickTrampoline(e)},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(t,e){this.customCandidateHandler=t,this.customCandidateHandlerContext=e},addMoveCallback:function(t,e){this.moveCallbacks.push({callback:t,context:e})},deleteMoveCallback:function(t,e){for(var i=this.moveCallbacks.length;i--;)if(this.moveCallbacks[i].callback===t&&this.moveCallbacks[i].context===e)return void this.moveCallbacks.splice(i,1)},addPointer:function(){if(this.pointers.length>=o.Input.MAX_POINTERS)return null;var t=this.pointers.length+1,e=new o.Pointer(this.game,t,o.PointerMode.TOUCH);return this.pointers.push(e),this["pointer"+t]=e,e},update:function(){if(this.keyboard&&this.keyboard.update(),this.pollRate>0&&this._pollCounter=0&&this.countActivePointers(this.maxPointers)>=this.maxPointers)return null;if(!this.pointer1.active)return this.pointer1.start(t);if(!this.pointer2.active)return this.pointer2.start(t);for(var e=2;e0;i++){this.pointers[i].active&&e--}return t-e},getPointer:function(t){void 0===t&&(t=!1);for(var e=0;e=a&&this._localPoint.x=r&&this._localPoint.y=a&&this._localPoint.x=r&&this._localPoint.y0&&this._pollCounter -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Mouse=function(t){this.game=t,this.input=t.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 o.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},o.Mouse.NO_BUTTON=-1,o.Mouse.LEFT_BUTTON=0,o.Mouse.MIDDLE_BUTTON=1,o.Mouse.RIGHT_BUTTON=2,o.Mouse.BACK_BUTTON=3,o.Mouse.FORWARD_BUTTON=4,o.Mouse.WHEEL_UP=1,o.Mouse.WHEEL_DOWN=-1,o.Mouse.prototype={start:function(){if((!this.game.device.android||!1!==this.game.device.chrome)&&null===this._onMouseDown){var t=this;this._onMouseDown=function(e){return t.onMouseDown(e)},this._onMouseMove=function(e){return t.onMouseMove(e)},this._onMouseUp=function(e){return t.onMouseUp(e)},this._onMouseUpGlobal=function(e){return t.onMouseUpGlobal(e)},this._onMouseOutGlobal=function(e){return t.onMouseOutGlobal(e)},this._onMouseOut=function(e){return t.onMouseOut(e)},this._onMouseOver=function(e){return t.onMouseOver(e)},this._onMouseWheel=function(e){return t.onMouseWheel(e)};var e=this.game.canvas;e.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("mousemove",this._onMouseMove,!0),e.addEventListener("mouseup",this._onMouseUp,!0),this.game.device.cocoonJS||(window.addEventListener("mouseup",this._onMouseUpGlobal,!0),window.addEventListener("mouseout",this._onMouseOutGlobal,!0),e.addEventListener("mouseover",this._onMouseOver,!0),e.addEventListener("mouseout",this._onMouseOut,!0));var i=this.game.device.wheelEvent;i&&(e.addEventListener(i,this._onMouseWheel,!0),"mousewheel"===i?this._wheelEvent=new s(-.025,1):"DOMMouseScroll"===i&&(this._wheelEvent=new s(1,1)))}},onMouseDown:function(t){this.event=t,this.capture&&t.preventDefault(),this.mouseDownCallback&&this.mouseDownCallback.call(this.callbackContext,t),this.input.enabled&&this.enabled&&(t.identifier=0,this.input.mousePointer.start(t))},onMouseMove:function(t){this.event=t,this.capture&&t.preventDefault(),this.mouseMoveCallback&&this.mouseMoveCallback.call(this.callbackContext,t),this.input.enabled&&this.enabled&&(t.identifier=0,this.input.mousePointer.move(t))},onMouseUp:function(t){this.event=t,this.capture&&t.preventDefault(),this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,t),this.input.enabled&&this.enabled&&(t.identifier=0,this.input.mousePointer.stop(t))},onMouseUpGlobal:function(t){this.input.mousePointer.withinGame||(this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,t),t.identifier=0,this.input.mousePointer.stop(t))},onMouseOutGlobal:function(t){this.event=t,this.capture&&t.preventDefault(),this.input.mousePointer.withinGame=!1,this.input.enabled&&this.enabled&&(this.input.mousePointer.stop(t),this.input.mousePointer.leftButton.stop(t),this.input.mousePointer.rightButton.stop(t))},onMouseOut:function(t){this.event=t,this.capture&&t.preventDefault(),this.input.mousePointer.withinGame=!1,this.mouseOutCallback&&this.mouseOutCallback.call(this.callbackContext,t),this.input.enabled&&this.enabled&&this.stopOnGameOut&&(t.identifier=0,this.input.mousePointer.stop(t))},onMouseOver:function(t){this.event=t,this.capture&&t.preventDefault(),this.input.mousePointer.withinGame=!0,this.mouseOverCallback&&this.mouseOverCallback.call(this.callbackContext,t)},onMouseWheel:function(t){this._wheelEvent&&(t=this._wheelEvent.bindEvent(t)),this.event=t,this.capture&&t.preventDefault(),this.wheelDelta=o.Math.clamp(-t.deltaY,-1,1),this.mouseWheelCallback&&this.mouseWheelCallback.call(this.callbackContext,t)},requestPointerLock:function(){if(this.game.device.pointerLock){var t=this.game.canvas;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock();var e=this;this._pointerLockChange=function(t){return e.pointerLockChange(t)},document.addEventListener("pointerlockchange",this._pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this._pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this._pointerLockChange,!0)}},pointerLockChange:function(t){var e=this.game.canvas;document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e?(this.locked=!0,this.pointerLock.dispatch(!0,t)):(this.locked=!1,this.pointerLock.dispatch(!1,t))},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 t=this.game.canvas;t.removeEventListener("mousedown",this._onMouseDown,!0),t.removeEventListener("mousemove",this._onMouseMove,!0),t.removeEventListener("mouseup",this._onMouseUp,!0),t.removeEventListener("mouseover",this._onMouseOver,!0),t.removeEventListener("mouseout",this._onMouseOut,!0);var e=this.game.device.wheelEvent;e&&t.removeEventListener(e,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)}},o.Mouse.prototype.constructor=o.Mouse,s.prototype={},s.prototype.constructor=s,s.prototype.bindEvent=function(t){if(!s._stubsGenerated&&t){var e=function(t){return function(){var e=this.originalEvent[t];return"function"!=typeof e?e:e.bind(this.originalEvent)}};for(var i in t)i in s.prototype||Object.defineProperty(s.prototype,i,{get:e(i)});s._stubsGenerated=!0}return this.originalEvent=t,this},Object.defineProperties(s.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}}),/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.MSPointer=function(t){this.game=t,this.input=t.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},o.MSPointer.prototype={start:function(){if(null===this._onMSPointerDown){var t=this;if(this.game.device.mspointer){this._onMSPointerDown=function(e){return t.onPointerDown(e)},this._onMSPointerMove=function(e){return t.onPointerMove(e)},this._onMSPointerUp=function(e){return t.onPointerUp(e)},this._onMSPointerUpGlobal=function(e){return t.onPointerUpGlobal(e)},this._onMSPointerOut=function(e){return t.onPointerOut(e)},this._onMSPointerOver=function(e){return t.onPointerOver(e)};var e=this.game.canvas;e.addEventListener("MSPointerDown",this._onMSPointerDown,!1),e.addEventListener("MSPointerMove",this._onMSPointerMove,!1),e.addEventListener("MSPointerUp",this._onMSPointerUp,!1),e.addEventListener("pointerdown",this._onMSPointerDown,!1),e.addEventListener("pointermove",this._onMSPointerMove,!1),e.addEventListener("pointerup",this._onMSPointerUp,!1),e.style["-ms-content-zooming"]="none",e.style["-ms-touch-action"]="none",this.game.device.cocoonJS||(window.addEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),e.addEventListener("MSPointerOver",this._onMSPointerOver,!0),e.addEventListener("MSPointerOut",this._onMSPointerOut,!0),window.addEventListener("pointerup",this._onMSPointerUpGlobal,!0),e.addEventListener("pointerover",this._onMSPointerOver,!0),e.addEventListener("pointerout",this._onMSPointerOut,!0))}}},onPointerDown:function(t){this.event=t,this.capture&&t.preventDefault(),this.pointerDownCallback&&this.pointerDownCallback.call(this.callbackContext,t),this.input.enabled&&this.enabled&&(t.identifier=t.pointerId,"mouse"===t.pointerType||4===t.pointerType?this.input.mousePointer.start(t):this.input.startPointer(t))},onPointerMove:function(t){this.event=t,this.capture&&t.preventDefault(),this.pointerMoveCallback&&this.pointerMoveCallback.call(this.callbackContext,t),this.input.enabled&&this.enabled&&(t.identifier=t.pointerId,"mouse"===t.pointerType||4===t.pointerType?this.input.mousePointer.move(t):this.input.updatePointer(t))},onPointerUp:function(t){this.event=t,this.capture&&t.preventDefault(),this.pointerUpCallback&&this.pointerUpCallback.call(this.callbackContext,t),this.input.enabled&&this.enabled&&(t.identifier=t.pointerId,"mouse"===t.pointerType||4===t.pointerType?this.input.mousePointer.stop(t):this.input.stopPointer(t))},onPointerUpGlobal:function(t){if("mouse"!==t.pointerType&&4!==t.pointerType||this.input.mousePointer.withinGame){var e=this.input.getPointerFromIdentifier(t.identifier);e&&e.withinGame&&this.onPointerUp(t)}else this.onPointerUp(t)},onPointerOut:function(t){if(this.event=t,this.capture&&t.preventDefault(),"mouse"===t.pointerType||4===t.pointerType)this.input.mousePointer.withinGame=!1;else{var e=this.input.getPointerFromIdentifier(t.identifier);e&&(e.withinGame=!1)}this.input.mouse.mouseOutCallback&&this.input.mouse.mouseOutCallback.call(this.input.mouse.callbackContext,t),this.input.enabled&&this.enabled&&this.input.mouse.stopOnGameOut&&(t.identifier=0,e?e.stop(t):this.input.mousePointer.stop(t))},onPointerOver:function(t){if(this.event=t,this.capture&&t.preventDefault(),"mouse"===t.pointerType||4===t.pointerType)this.input.mousePointer.withinGame=!0;else{var e=this.input.getPointerFromIdentifier(t.identifier);e&&(e.withinGame=!0)}this.input.mouse.mouseOverCallback&&this.input.mouse.mouseOverCallback.call(this.input.mouse.callbackContext,t)},stop:function(){var t=this.game.canvas;t.removeEventListener("MSPointerDown",this._onMSPointerDown,!1),t.removeEventListener("MSPointerMove",this._onMSPointerMove,!1),t.removeEventListener("MSPointerUp",this._onMSPointerUp,!1),t.removeEventListener("pointerdown",this._onMSPointerDown,!1),t.removeEventListener("pointermove",this._onMSPointerMove,!1),t.removeEventListener("pointerup",this._onMSPointerUp,!1),window.removeEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),t.removeEventListener("MSPointerOver",this._onMSPointerOver,!0),t.removeEventListener("MSPointerOut",this._onMSPointerOut,!0),window.removeEventListener("pointerup",this._onMSPointerUpGlobal,!0),t.removeEventListener("pointerover",this._onMSPointerOver,!0),t.removeEventListener("pointerout",this._onMSPointerOut,!0)}},o.MSPointer.prototype.constructor=o.MSPointer,/** -* @author Richard Davey -* @author @karlmacklin -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.DeviceButton=function(t,e){this.parent=t,this.game=t.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=e,this.onDown=new o.Signal,this.onUp=new o.Signal,this.onFloat=new o.Signal},o.DeviceButton.prototype={start:function(t,e){this.isDown||(this.isDown=!0,this.isUp=!1,this.timeDown=this.game.time.time,this.repeats=0,this.event=t,this.value=e,t&&(this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.ctrlKey=t.ctrlKey),this.onDown.dispatch(this,e))},stop:function(t,e){this.isUp||(this.isDown=!1,this.isUp=!0,this.timeUp=this.game.time.time,this.event=t,this.value=e,t&&(this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.ctrlKey=t.ctrlKey),this.onUp.dispatch(this,e))},padFloat:function(t){this.value=t,this.onFloat.dispatch(this,t)},justPressed:function(t){return t=t||250,this.isDown&&this.timeDown+t>this.game.time.time},justReleased:function(t){return t=t||250,this.isUp&&this.timeUp+t>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}},o.DeviceButton.prototype.constructor=o.DeviceButton,Object.defineProperty(o.DeviceButton.prototype,"duration",{get:function(){return this.isUp?-1:this.game.time.time-this.timeDown}}),/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Pointer=function(t,e,i){this.game=t,this.id=e,this.type=o.POINTER,this.exists=!0,this.identifier=0,this.pointerId=null,this.pointerMode=i||o.PointerMode.CURSOR|o.PointerMode.CONTACT,this.target=null,this.button=null,this.leftButton=new o.DeviceButton(this,o.Pointer.LEFT_BUTTON),this.middleButton=new o.DeviceButton(this,o.Pointer.MIDDLE_BUTTON),this.rightButton=new o.DeviceButton(this,o.Pointer.RIGHT_BUTTON),this.backButton=new o.DeviceButton(this,o.Pointer.BACK_BUTTON),this.forwardButton=new o.DeviceButton(this,o.Pointer.FORWARD_BUTTON),this.eraserButton=new o.DeviceButton(this,o.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===e,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 o.Point,this.positionDown=new o.Point,this.positionUp=new o.Point,this.circle=new o.Circle(0,0,44),this._clickTrampolines=null,this._trampolineTargetObject=null},o.Pointer.NO_BUTTON=0,o.Pointer.LEFT_BUTTON=1,o.Pointer.RIGHT_BUTTON=2,o.Pointer.MIDDLE_BUTTON=4,o.Pointer.BACK_BUTTON=8,o.Pointer.FORWARD_BUTTON=16,o.Pointer.ERASER_BUTTON=32,o.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(t,e){o.Pointer.LEFT_BUTTON&t&&this.leftButton.start(e),o.Pointer.RIGHT_BUTTON&t&&this.rightButton.start(e),o.Pointer.MIDDLE_BUTTON&t&&this.middleButton.start(e),o.Pointer.BACK_BUTTON&t&&this.backButton.start(e),o.Pointer.FORWARD_BUTTON&t&&this.forwardButton.start(e),o.Pointer.ERASER_BUTTON&t&&this.eraserButton.start(e)},processButtonsUp:function(t,e){t===o.Mouse.LEFT_BUTTON&&this.leftButton.stop(e),t===o.Mouse.RIGHT_BUTTON&&this.rightButton.stop(e),t===o.Mouse.MIDDLE_BUTTON&&this.middleButton.stop(e),t===o.Mouse.BACK_BUTTON&&this.backButton.stop(e),t===o.Mouse.FORWARD_BUTTON&&this.forwardButton.stop(e),5===t&&this.eraserButton.stop(e)},updateButtons:function(t){this.button=t.button;var e="down"===t.type.toLowerCase().substr(-4);void 0!==t.buttons?e?this.processButtonsDown(t.buttons,t):this.processButtonsUp(t.button,t):e?this.leftButton.start(t):(this.leftButton.stop(t),this.rightButton.stop(t)),1===t.buttons&&t.ctrlKey&&this.leftButton.isDown&&(this.leftButton.stop(t),this.rightButton.start(t)),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(t){var e=this.game.input;return t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.isMouse?this.updateButtons(t):(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(t,!0),this.positionDown.setTo(this.x,this.y),(e.multiInputOverride===o.Input.MOUSE_OVERRIDES_TOUCH||e.multiInputOverride===o.Input.MOUSE_TOUCH_COMBINE||e.multiInputOverride===o.Input.TOUCH_OVERRIDES_MOUSE&&0===e.totalActivePointers)&&(e.x=this.x,e.y=this.y,e.position.setTo(this.x,this.y),e.onDown.dispatch(this,t),e.resetSpeed(this.x,this.y)),this._stateReset=!1,this.totalTouches++,null!==this.targetObject&&this.targetObject._touchedHandler(this),this},update:function(){var t=this.game.input;this.active&&(this.dirty&&(t.interactiveItems.total>0&&this.processInteractiveObjects(!1),this.dirty=!1),!1===this._holdSent&&this.duration>=t.holdRate&&((t.multiInputOverride===o.Input.MOUSE_OVERRIDES_TOUCH||t.multiInputOverride===o.Input.MOUSE_TOUCH_COMBINE||t.multiInputOverride===o.Input.TOUCH_OVERRIDES_MOUSE&&0===t.totalActivePointers)&&t.onHold.dispatch(this),this._holdSent=!0),t.recordPointerHistory&&this.game.time.time>=this._nextDrop&&(this._nextDrop=this.game.time.time+t.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>t.recordLimit&&this._history.shift()))},move:function(t,e){var i=this.game.input;if(!i.pollLocked){if(void 0===e&&(e=!1),void 0!==t.button&&(this.button=t.button),e&&this.isMouse&&this.updateButtons(t),this.clientX=t.clientX,this.clientY=t.clientY,this.pageX=t.pageX,this.pageY=t.pageY,this.screenX=t.screenX,this.screenY=t.screenY,this.isMouse&&i.mouse.locked&&!e&&(this.rawMovementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.rawMovementY=t.movementY||t.mozMovementY||t.webkitMovementY||0,this.movementX+=this.rawMovementX,this.movementY+=this.rawMovementY),this.x=(this.pageX-this.game.scale.offset.x)*i.scale.x,this.y=(this.pageY-this.game.scale.offset.y)*i.scale.y,this.position.setTo(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(i.multiInputOverride===o.Input.MOUSE_OVERRIDES_TOUCH||i.multiInputOverride===o.Input.MOUSE_TOUCH_COMBINE||i.multiInputOverride===o.Input.TOUCH_OVERRIDES_MOUSE&&0===i.totalActivePointers)&&(i.activePointer=this,i.x=this.x,i.y=this.y,i.position.setTo(i.x,i.y),i.circle.x=i.x,i.circle.y=i.y),this.withinGame=this.game.scale.bounds.contains(this.pageX,this.pageY),this.game.paused)return this;for(var s=i.moveCallbacks.length;s--;)i.moveCallbacks[s].callback.call(i.moveCallbacks[s].context,this,this.x,this.y,e);return null!==this.targetObject&&!0===this.targetObject.isDragged?!1===this.targetObject.update(this)&&(this.targetObject=null):i.interactiveItems.total>0&&this.processInteractiveObjects(e),this}},processInteractiveObjects:function(t){var e=0,i=-1,s=null,n=this.game.input.interactiveItems.first;for(this.interactiveCandidates=[];n;)n.checked=!1,n.validForInput(i,e,!1)&&(n.checked=!0,(t&&n.checkPointerDown(this,!0)||!t&&n.checkPointerOver(this,!0))&&(e=n.sprite.renderOrderID,i=n.priorityID,s=n,this.interactiveCandidates.push(n))),n=this.game.input.interactiveItems.next;for(n=this.game.input.interactiveItems.first;n;)!n.checked&&n.validForInput(i,e,!0)&&(t&&n.checkPointerDown(this,!1)||!t&&n.checkPointerOver(this,!1))&&(e=n.sprite.renderOrderID,i=n.priorityID,s=n,this.interactiveCandidates.push(n)),n=this.game.input.interactiveItems.next;return this.game.input.customCandidateHandler&&(s=this.game.input.customCandidateHandler.call(this.game.input.customCandidateHandlerContext,this,this.interactiveCandidates,s)),this.swapTarget(s,!1),null!==this.targetObject},swapTarget:function(t,e){void 0===e&&(e=!1),null===t?this.targetObject&&(this.targetObject._pointerOutHandler(this,e),this.targetObject=null):null===this.targetObject?(this.targetObject=t,t._pointerOverHandler(this,e)):this.targetObject===t?!1===t.update(this)&&(this.targetObject=null):(this.targetObject._pointerOutHandler(this,e),this.targetObject=t,this.targetObject._pointerOverHandler(this,e))},leave:function(t){this.withinGame=!1,this.move(t,!1)},stop:function(t){var e=this.game.input;return this._stateReset&&this.withinGame?void t.preventDefault():(this.timeUp=this.game.time.time,(e.multiInputOverride===o.Input.MOUSE_OVERRIDES_TOUCH||e.multiInputOverride===o.Input.MOUSE_TOUCH_COMBINE||e.multiInputOverride===o.Input.TOUCH_OVERRIDES_MOUSE&&0===e.totalActivePointers)&&(e.onUp.dispatch(this,t),this.duration>=0&&this.duration<=e.tapRate&&(this.timeUp-this.previousTapTime0&&(this.active=!1),this.withinGame=this.game.scale.bounds.contains(t.pageX,t.pageY),this.pointerId=null,this.identifier=null,this.positionUp.setTo(this.x,this.y),!1===this.isMouse&&e.currentPointers--,e.interactiveItems.callAll("_releasedHandler",this),this._clickTrampolines&&(this._trampolineTargetObject=this.targetObject),this.targetObject=null,this)},justPressed:function(t){return t=t||this.game.input.justPressedRate,!0===this.isDown&&this.timeDown+t>this.game.time.time},justReleased:function(t){return t=t||this.game.input.justReleasedRate,this.isUp&&this.timeUp+t>this.game.time.time},addClickTrampoline:function(t,e,i,s){if(this.isDown){for(var n=this._clickTrampolines=this._clickTrampolines||[],o=0;o -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Touch=function(t){this.game=t,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},o.Touch.prototype={start:function(){if(null===this._onTouchStart){var t=this;this.game.device.touch&&(this._onTouchStart=function(e){return t.onTouchStart(e)},this._onTouchMove=function(e){return t.onTouchMove(e)},this._onTouchEnd=function(e){return t.onTouchEnd(e)},this._onTouchEnter=function(e){return t.onTouchEnter(e)},this._onTouchLeave=function(e){return t.onTouchLeave(e)},this._onTouchCancel=function(e){return t.onTouchCancel(e)},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(t){t.preventDefault()},document.addEventListener("touchmove",this._documentTouchMove,!1)},addTouchLockCallback:function(t,e,i){void 0===i&&(i=!1),this.touchLockCallbacks.push({callback:t,context:e,onEnd:i})},removeTouchLockCallback:function(t,e){for(var i=this.touchLockCallbacks.length;i--;)if(this.touchLockCallbacks[i].callback===t&&this.touchLockCallbacks[i].context===e)return this.touchLockCallbacks.splice(i,1),!0;return!1},onTouchStart:function(t){for(var e=this.touchLockCallbacks.length;e--;){var i=this.touchLockCallbacks[e];!i.onEnd&&i.callback.call(i.context,this,t)&&this.touchLockCallbacks.splice(e,1)}if(this.event=t,this.game.input.enabled&&this.enabled){this.touchStartCallback&&this.touchStartCallback.call(this.callbackContext,t),this.preventDefault&&t.preventDefault();for(var e=0;e -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.InputHandler=function(t){this.sprite=t,this.game=t.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 o.Point,this.dragFromCenter=!1,this.dragStopBlocksInputUp=!1,this.dragStartPoint=new o.Point,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this.downPoint=new o.Point,this.snapPoint=new o.Point,this._dragPoint=new o.Point,this._dragPhase=!1,this._pendingDrag=!1,this._dragTimePass=!1,this._dragDistancePass=!1,this._wasEnabled=!1,this._tempPoint=new o.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})},o.InputHandler.prototype={start:function(t,e){if(t=t||0,void 0===e&&(e=!1),!1===this.enabled){this.game.input.interactiveItems.add(this),this.useHandCursor=e,this.priorityID=t;for(var i=0;i<10;i++)this._pointerData[i]={id:i,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 o.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 t=0;t<10;t++)this._pointerData[t]={id:t,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(){!1!==this.enabled&&(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(t,e,i){return void 0===i&&(i=!0),!(!this.enabled||0===this.sprite.scale.x||0===this.sprite.scale.y||this.priorityIDt||this.priorityID===t&&this.sprite.renderOrderID>e))},isPixelPerfect:function(){return this.pixelPerfectClick||this.pixelPerfectOver},pointerX:function(t){return t=t||0,this._pointerData[t].x},pointerY:function(t){return t=t||0,this._pointerData[t].y},pointerDown:function(t){return t=t||0,this._pointerData[t].isDown},pointerUp:function(t){return t=t||0,this._pointerData[t].isUp},pointerTimeDown:function(t){return t=t||0,this._pointerData[t].timeDown},pointerTimeUp:function(t){return t=t||0,this._pointerData[t].timeUp},pointerOver:function(t){if(!this.enabled)return!1;if(void 0===t){for(var e=0;e<10;e++)if(this._pointerData[e].isOver)return!0;return!1}return this._pointerData[t].isOver},pointerOut:function(t){if(!this.enabled)return!1;if(void 0!==t)return this._pointerData[t].isOut;for(var e=0;e<10;e++)if(this._pointerData[e].isOut)return!0},pointerTimeOver:function(t){return t=t||0,this._pointerData[t].timeOver},pointerTimeOut:function(t){return t=t||0,this._pointerData[t].timeOut},pointerDragged:function(t){return t=t||0,this._pointerData[t].isDragged},checkPointerDown:function(t,e){return!!(t.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,t,this._tempPoint)&&(void 0===e&&(e=!1),!(!e&&this.pixelPerfectClick)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPointerOver:function(t,e){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,t,this._tempPoint)&&(void 0===e&&(e=!1),!(!e&&this.pixelPerfectOver)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPixel:function(t,e,i){if(this.sprite.texture.baseTexture.source){if(null===t&&null===e){this.game.input.getLocalPosition(this.sprite,i,this._tempPoint);var t=this._tempPoint.x,e=this._tempPoint.y}if(0!==this.sprite.anchor.x&&(t-=-this.sprite.texture.frame.width*this.sprite.anchor.x),0!==this.sprite.anchor.y&&(e-=-this.sprite.texture.frame.height*this.sprite.anchor.y),t+=this.sprite.texture.frame.x,e+=this.sprite.texture.frame.y,this.sprite.texture.trim&&(t-=this.sprite.texture.trim.x,e-=this.sprite.texture.trim.y,tthis.sprite.texture.crop.right||ethis.sprite.texture.crop.bottom))return this._dx=t,this._dy=e,!1;this._dx=t,this._dy=e,this.game.input.hitContext.clearRect(0,0,1,1),this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source,t,e,1,1,0,0,1,1);if(this.game.input.hitContext.getImageData(0,0,1,1).data[3]>=this.pixelPerfectAlpha)return!0}return!1},update:function(t){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=o.Math.distance(t.x,t.y,this.downPoint.x,this.downPoint.y)>=this.dragDistanceThreshold),this._dragDistancePass&&this._dragTimePass&&this.startDrag(t),!0):this.draggable&&this._draggedPointerID===t.id?this.updateDrag(t,!1):this._pointerData[t.id].isOver?this.checkPointerOver(t)?(this._pointerData[t.id].x=t.x-this.sprite.x,this._pointerData[t.id].y=t.y-this.sprite.y,!0):(this._pointerOutHandler(t),!1):void 0:(this._pointerOutHandler(t),!1)},_pointerOverHandler:function(t,e){if(null!==this.sprite){var i=this._pointerData[t.id];if(!1===i.isOver||t.dirty){var s=!1===i.isOver;i.isOver=!0,i.isOut=!1,i.timeOver=this.game.time.time,i.x=t.x-this.sprite.x,i.y=t.y-this.sprite.y,this.useHandCursor&&!1===i.isDragged&&(this.game.canvas.style.cursor="pointer",this._setHandCursor=!0),!e&&s&&this.sprite&&this.sprite.events&&this.sprite.events.onInputOver$dispatch(this.sprite,t),this.sprite.parent&&this.sprite.parent.type===o.GROUP&&this.sprite.parent.onChildInputOver.dispatch(this.sprite,t)}}},_pointerOutHandler:function(t,e){if(null!==this.sprite){var i=this._pointerData[t.id];i.isOver=!1,i.isOut=!0,i.timeOut=this.game.time.time,this.useHandCursor&&!1===i.isDragged&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),!e&&this.sprite&&this.sprite.events&&(this.sprite.events.onInputOut$dispatch(this.sprite,t),this.sprite&&this.sprite.parent&&this.sprite.parent.type===o.GROUP&&this.sprite.parent.onChildInputOut.dispatch(this.sprite,t))}},_touchedHandler:function(t){if(null!==this.sprite){var e=this._pointerData[t.id];if(!e.isDown&&e.isOver){if(this.pixelPerfectClick&&!this.checkPixel(null,null,t))return;if(e.isDown=!0,e.isUp=!1,e.timeDown=this.game.time.time,this.downPoint.set(t.x,t.y),t.dirty=!0,this.sprite&&this.sprite.events&&(this.sprite.events.onInputDown$dispatch(this.sprite,t),this.sprite&&this.sprite.parent&&this.sprite.parent.type===o.GROUP&&this.sprite.parent.onChildInputDown.dispatch(this.sprite,t),null===this.sprite))return;this.draggable&&!1===this.isDragged&&(0===this.dragTimeThreshold&&0===this.dragDistanceThreshold?this.startDrag(t):(this._pendingDrag=!0,this._dragDistancePass=0===this.dragDistanceThreshold,this.dragTimeThreshold>0?(this._dragTimePass=!1,this.game.time.events.add(this.dragTimeThreshold,this.dragTimeElapsed,this,t)):this._dragTimePass=!0)),this.bringToTop&&this.sprite.bringToTop()}}},dragTimeElapsed:function(t){this._dragTimePass=!0,this._pendingDrag&&this.sprite&&this._dragDistancePass&&this.startDrag(t)},_releasedHandler:function(t){if(null!==this.sprite){var e=this._pointerData[t.id];if(e.isDown&&t.isUp){e.isDown=!1,e.isUp=!0,e.timeUp=this.game.time.time,e.downDuration=e.timeUp-e.timeDown;var i=this.checkPointerOver(t);this.sprite&&this.sprite.events&&(this.dragStopBlocksInputUp&&(!this.dragStopBlocksInputUp||this.draggable&&this.isDragged&&this._draggedPointerID===t.id)||this.sprite.events.onInputUp$dispatch(this.sprite,t,i),this.sprite&&this.sprite.parent&&this.sprite.parent.type===o.GROUP&&this.sprite.parent.onChildInputUp.dispatch(this.sprite,t,i),i&&(i=this.checkPointerOver(t))),e.isOver=i,!i&&this.useHandCursor&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),t.dirty=!0,this._pendingDrag=!1,this.draggable&&this.isDragged&&this._draggedPointerID===t.id&&this.stopDrag(t)}}},updateDrag:function(t,e){if(void 0===e&&(e=!1),t.isUp)return this.stopDrag(t),!1;var i=this.globalToLocalX(t.x)+this._dragPoint.x+this.dragOffset.x,s=this.globalToLocalY(t.y)+this._dragPoint.y+this.dragOffset.y;if(this.sprite.fixedToCamera)this.allowHorizontalDrag&&(this.sprite.cameraOffset.x=i),this.allowVerticalDrag&&(this.sprite.cameraOffset.y=s),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 n=this.game.camera.x-this._pointerData[t.id].camX,o=this.game.camera.y-this._pointerData[t.id].camY;this.allowHorizontalDrag&&(this.sprite.x=i+n),this.allowVerticalDrag&&(this.sprite.y=s+o),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,t,i,s,this.snapPoint,e),!0},justOver:function(t,e){return t=t||0,e=e||500,this._pointerData[t].isOver&&this.overDuration(t)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height)):(this.sprite.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.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.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height)):(this.sprite.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.boundsSprite.bottom&&(this.sprite.y=this.boundsSprite.bottom-(this.sprite.height-this.sprite.offsetY)))}},o.InputHandler.prototype.constructor=o.InputHandler,/** -* @author @karlmacklin -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Gamepad=function(t){this.game=t,this._gamepadIndexMap={},this._rawPads=[],this._active=!1,this.enabled=!0,this._gamepadSupportAvailable=!!navigator.webkitGetGamepads||!!navigator.webkitGamepads||-1!==navigator.userAgent.indexOf("Firefox/")||!!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 o.SinglePad(t,this),new o.SinglePad(t,this),new o.SinglePad(t,this),new o.SinglePad(t,this)]},o.Gamepad.prototype={addCallbacks:function(t,e){void 0!==e&&(this.onConnectCallback="function"==typeof e.onConnect?e.onConnect:this.onConnectCallback,this.onDisconnectCallback="function"==typeof e.onDisconnect?e.onDisconnect:this.onDisconnectCallback,this.onDownCallback="function"==typeof e.onDown?e.onDown:this.onDownCallback,this.onUpCallback="function"==typeof e.onUp?e.onUp:this.onUpCallback,this.onAxisCallback="function"==typeof e.onAxis?e.onAxis:this.onAxisCallback,this.onFloatCallback="function"==typeof e.onFloat?e.onFloat:this.onFloatCallback,this.callbackContext=t)},start:function(){if(!this._active){this._active=!0;var t=this;this._onGamepadConnected=function(e){return t.onGamepadConnected(e)},this._onGamepadDisconnected=function(e){return t.onGamepadDisconnected(e)},window.addEventListener("gamepadconnected",this._onGamepadConnected,!1),window.addEventListener("gamepaddisconnected",this._onGamepadDisconnected,!1)}},onGamepadConnected:function(t){var e=t.gamepad;this._rawPads.push(e),this._gamepads[e.index].connect(e)},onGamepadDisconnected:function(t){var e=t.gamepad;for(var i in this._rawPads)this._rawPads[i].index===e.index&&this._rawPads.splice(i,1);this._gamepads[e.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 t=navigator.getGamepads();else if(navigator.webkitGetGamepads)var t=navigator.webkitGetGamepads();else if(navigator.webkitGamepads)var t=navigator.webkitGamepads();if(t){this._rawPads=[];for(var e=!1,i=0;i -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.SinglePad=function(t,e){this.game=t,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=e,this._rawPad=null,this._prevTimestamp=null,this._buttons=[],this._buttonsLen=0,this._axes=[],this._axesLen=0},o.SinglePad.prototype={addCallbacks:function(t,e){void 0!==e&&(this.onConnectCallback="function"==typeof e.onConnect?e.onConnect:this.onConnectCallback,this.onDisconnectCallback="function"==typeof e.onDisconnect?e.onDisconnect:this.onDisconnectCallback,this.onDownCallback="function"==typeof e.onDown?e.onDown:this.onDownCallback,this.onUpCallback="function"==typeof e.onUp?e.onUp:this.onUpCallback,this.onAxisCallback="function"==typeof e.onAxis?e.onAxis:this.onAxisCallback,this.onFloatCallback="function"==typeof e.onFloat?e.onFloat:this.onFloatCallback,this.callbackContext=t)},getButton:function(t){return this._buttons[t]?this._buttons[t]: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 t=0;t0&&s>this.deadZone||s<0&&s<-this.deadZone?this.processAxisChange(i,s):this.processAxisChange(i,0)}this._prevTimestamp=this._rawPad.timestamp}},connect:function(t){var e=!this.connected;this.connected=!0,this.index=t.index,this._rawPad=t,this._buttons=[],this._buttonsLen=t.buttons.length,this._axes=[],this._axesLen=t.axes.length;for(var i=0;i -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Key=function(t,e){this.game=t,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=e,this.onDown=new o.Signal,this.onHoldCallback=null,this.onHoldContext=null,this.onUp=new o.Signal,this._justDown=!1,this._justUp=!1},o.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(t){this._enabled&&(this.event=t,this.isDown||(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.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(t){this._enabled&&(this.event=t,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(t){void 0===t&&(t=!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,t&&(this.onDown.removeAll(),this.onUp.removeAll(),this.onHoldCallback=null,this.onHoldContext=null)},downDuration:function(t){return void 0===t&&(t=50),this.isDown&&this.duration -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Keyboard=function(t){this.game=t,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},o.Keyboard.prototype={addCallbacks:function(t,e,i,s){this.callbackContext=t,void 0!==e&&null!==e&&(this.onDownCallback=e),void 0!==i&&null!==i&&(this.onUpCallback=i),void 0!==s&&null!==s&&(this.onPressCallback=s)},addKey:function(t){return this._keys[t]||(this._keys[t]=new o.Key(this.game,t),this.addKeyCapture(t)),this._keys[t]},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},removeKey:function(t){this._keys[t]&&(this._keys[t]=null,this.removeKeyCapture(t))},createCursorKeys:function(){return this.addKeys({up:o.KeyCode.UP,down:o.KeyCode.DOWN,left:o.KeyCode.LEFT,right:o.KeyCode.RIGHT})},start:function(){if(!this.game.device.cocoonJS&&null===this._onKeyDown){var t=this;this._onKeyDown=function(e){return t.processKeyDown(e)},this._onKeyUp=function(e){return t.processKeyUp(e)},this._onKeyPress=function(e){return t.processKeyPress(e)},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(t){if("object"==typeof t)for(var e in t)this._capture[t[e]]=!0;else this._capture[t]=!0},removeKeyCapture:function(t){delete this._capture[t]},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(t){if(this.event=t,this.game.input.enabled&&this.enabled){var e=t.keyCode;this._capture[e]&&t.preventDefault(),this._keys[e]||(this._keys[e]=new o.Key(this.game,e)),this._keys[e].processKeyDown(t),this._k=e,this.onDownCallback&&this.onDownCallback.call(this.callbackContext,t)}},processKeyPress:function(t){this.pressEvent=t,this.game.input.enabled&&this.enabled&&this.onPressCallback&&this.onPressCallback.call(this.callbackContext,String.fromCharCode(t.charCode),t)},processKeyUp:function(t){if(this.event=t,this.game.input.enabled&&this.enabled){var e=t.keyCode;this._capture[e]&&t.preventDefault(),this._keys[e]||(this._keys[e]=new o.Key(this.game,e)),this._keys[e].processKeyUp(t),this.onUpCallback&&this.onUpCallback.call(this.callbackContext,t)}},reset:function(t){void 0===t&&(t=!0),this.event=null;for(var e=this._keys.length;e--;)this._keys[e]&&this._keys[e].reset(t)},downDuration:function(t,e){return this._keys[t]?this._keys[t].downDuration(e):null},upDuration:function(t,e){return this._keys[t]?this._keys[t].upDuration(e):null},isDown:function(t){return this._keys[t]?this._keys[t].isDown:null}},Object.defineProperty(o.Keyboard.prototype,"lastChar",{get:function(){return 32===this.event.charCode?"":String.fromCharCode(this.pressEvent.charCode)}}),Object.defineProperty(o.Keyboard.prototype,"lastKey",{get:function(){return this._keys[this._k]}}),o.Keyboard.prototype.constructor=o.Keyboard,o.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 r in o.KeyCode)o.KeyCode.hasOwnProperty(r)&&!r.match(/[a-z]/)&&(o.Keyboard[r]=o.KeyCode[r]);/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component=function(){},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Angle=function(){},o.Component.Angle.prototype={angle:{get:function(){return o.Math.wrapAngle(o.Math.radToDeg(this.rotation))},set:function(t){this.rotation=o.Math.degToRad(o.Math.wrapAngle(t))}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Animation=function(){},o.Component.Animation.prototype={play:function(t,e,i,s){if(this.animations)return this.animations.play(t,e,i,s)}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.AutoCull=function(){},o.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)}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Bounds=function(){},o.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(t){this.x=t+this.offsetX-.5*this.width}},centerY:{get:function(){return this.y-this.offsetY+.5*this.height},set:function(t){this.y=t+this.offsetY-.5*this.height}},left:{get:function(){return this.x-this.offsetX},set:function(t){this.x=t+this.offsetX}},right:{get:function(){return this.x+this.width-this.offsetX},set:function(t){this.x=t-this.width+this.offsetX}},top:{get:function(){return this.y-this.offsetY},set:function(t){this.y=t+this.offsetY}},bottom:{get:function(){return this.y+this.height-this.offsetY},set:function(t){this.y=t-this.height+this.offsetY}},alignIn:function(t,e,i,s){switch(void 0===i&&(i=0),void 0===s&&(s=0),e){default:case o.TOP_LEFT:this.left=t.left-i,this.top=t.top-s;break;case o.TOP_CENTER:this.centerX=t.centerX+i,this.top=t.top-s;break;case o.TOP_RIGHT:this.right=t.right+i,this.top=t.top-s;break;case o.LEFT_CENTER:this.left=t.left-i,this.centerY=t.centerY+s;break;case o.CENTER:this.centerX=t.centerX+i,this.centerY=t.centerY+s;break;case o.RIGHT_CENTER:this.right=t.right+i,this.centerY=t.centerY+s;break;case o.BOTTOM_LEFT:this.left=t.left-i,this.bottom=t.bottom+s;break;case o.BOTTOM_CENTER:this.centerX=t.centerX+i,this.bottom=t.bottom+s;break;case o.BOTTOM_RIGHT:this.right=t.right+i,this.bottom=t.bottom+s}return this},alignTo:function(t,e,i,s){switch(void 0===i&&(i=0),void 0===s&&(s=0),e){default:case o.TOP_LEFT:this.left=t.left-i,this.bottom=t.top-s;break;case o.TOP_CENTER:this.centerX=t.centerX+i,this.bottom=t.top-s;break;case o.TOP_RIGHT:this.right=t.right+i,this.bottom=t.top-s;break;case o.LEFT_TOP:this.right=t.left-i,this.top=t.top-s;break;case o.LEFT_CENTER:this.right=t.left-i,this.centerY=t.centerY+s;break;case o.LEFT_BOTTOM:this.right=t.left-i,this.bottom=t.bottom+s;break;case o.RIGHT_TOP:this.left=t.right+i,this.top=t.top-s;break;case o.RIGHT_CENTER:this.left=t.right+i,this.centerY=t.centerY+s;break;case o.RIGHT_BOTTOM:this.left=t.right+i,this.bottom=t.bottom+s;break;case o.BOTTOM_LEFT:this.left=t.left-i,this.top=t.bottom+s;break;case o.BOTTOM_CENTER:this.centerX=t.centerX+i,this.top=t.bottom+s;break;case o.BOTTOM_RIGHT:this.right=t.right+i,this.top=t.bottom+s}return this}},o.Group.prototype.alignIn=o.Component.Bounds.prototype.alignIn,o.Group.prototype.alignTo=o.Component.Bounds.prototype.alignTo,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.BringToTop=function(){},o.Component.BringToTop.prototype.bringToTop=function(){return this.parent&&this.parent.bringToTop(this),this},o.Component.BringToTop.prototype.sendToBack=function(){return this.parent&&this.parent.sendToBack(this),this},o.Component.BringToTop.prototype.moveUp=function(){return this.parent&&this.parent.moveUp(this),this},o.Component.BringToTop.prototype.moveDown=function(){return this.parent&&this.parent.moveDown(this),this},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Core=function(){},o.Component.Core.install=function(t){o.Utils.mixinPrototype(this,o.Component.Core.prototype),this.components={};for(var e=0;e -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Crop=function(){},o.Component.Crop.prototype={cropRect:null,_crop:null,crop:function(t,e){void 0===e&&(e=!1),t?(e&&null!==this.cropRect?this.cropRect.setTo(t.x,t.y,t.width,t.height):e&&null===this.cropRect?this.cropRect=new o.Rectangle(t.x,t.y,t.width,t.height):this.cropRect=t,this.updateCrop()):(this._crop=null,this.cropRect=null,this.resetFrame())},updateCrop:function(){if(this.cropRect){var t=this.texture.crop.x,e=this.texture.crop.y,i=this.texture.crop.width,s=this.texture.crop.height;this._crop=o.Rectangle.clone(this.cropRect,this._crop),this._crop.x+=this._frame.x,this._crop.y+=this._frame.y;var n=Math.max(this._frame.x,this._crop.x),a=Math.max(this._frame.y,this._crop.y),r=Math.min(this._frame.right,this._crop.right)-n,h=Math.min(this._frame.bottom,this._crop.bottom)-a;this.texture.crop.x=n,this.texture.crop.y=a,this.texture.crop.width=r,this.texture.crop.height=h,this.texture.frame.width=Math.min(r,this.cropRect.width),this.texture.frame.height=Math.min(h,this.cropRect.height),this.texture.width=this.texture.frame.width,this.texture.height=this.texture.frame.height,this.texture._updateUvs(),16777215===this.tint||t===n&&e===a&&i===r&&s===h||(this.texture.requiresReTint=!0)}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Delta=function(){},o.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}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Destroy=function(){},o.Component.Destroy.prototype={destroyPhase:!1,destroy:function(t,e){if(null!==this.game&&!this.destroyPhase){void 0===t&&(t=!0),void 0===e&&(e=!1),this.destroyPhase=!0,this.events&&this.events.onDestroy$dispatch(this),this.parent&&(this.parent instanceof o.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 i=this.children.length;if(t)for(;i--;)this.children[i].destroy(t);else for(;i--;)this.removeChild(this.children[i]);this._crop&&(this._crop=null,this.cropRect=null),this._frame&&(this._frame=null),o.Video&&this.key instanceof o.Video&&this.key.onChangeSource.remove(this.resizeFrame,this),o.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(),e&&this.texture.destroy(!0),this.destroyPhase=!1,this.pendingDestroy=!1}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Events=function(t){this.parent=t},o.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},o.Events.prototype.constructor=o.Events;for(var h in o.Events.prototype)o.Events.prototype.hasOwnProperty(h)&&0===h.indexOf("on")&&null===o.Events.prototype[h]&&function(t,e){"use strict";Object.defineProperty(o.Events.prototype,t,{get:function(){return this[e]||(this[e]=new o.Signal)}}),o.Events.prototype[t+"$dispatch"]=function(){return this[e]?this[e].dispatch.apply(this[e],arguments):null}}(h,"_"+h);/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.FixedToCamera=function(){},o.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)},o.Component.FixedToCamera.prototype={_fixedToCamera:!1,fixedToCamera:{get:function(){return this._fixedToCamera},set:function(t){t?(this._fixedToCamera=!0,this.cameraOffset.set(this.x,this.y)):this._fixedToCamera=!1}},cameraOffset:new o.Point},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Health=function(){},o.Component.Health.prototype={health:1,maxHealth:100,damage:function(t){return this.alive&&(this.health-=t,this.health<=0&&this.kill()),this},setHealth:function(t){return this.health=t,this.health>this.maxHealth&&(this.health=this.maxHealth),this},heal:function(t){return this.alive&&(this.health+=t,this.health>this.maxHealth&&(this.health=this.maxHealth)),this}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.InCamera=function(){},o.Component.InCamera.prototype={inCamera:{get:function(){return this.game.world.camera.view.intersects(this._bounds)}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.InputEnabled=function(){},o.Component.InputEnabled.prototype={input:null,inputEnabled:{get:function(){return this.input&&this.input.enabled},set:function(t){t?null===this.input?(this.input=new o.InputHandler(this),this.input.start()):this.input&&!this.input.enabled&&this.input.start():this.input&&this.input.enabled&&this.input.stop()}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.InWorld=function(){},o.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},o.Component.InWorld.prototype={checkWorldBounds:!1,outOfBoundsKill:!1,outOfCameraBoundsKill:!1,_outOfBoundsFired:!1,inWorld:{get:function(){return this.game.world.bounds.intersects(this.getBounds())}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.LifeSpan=function(){},o.Component.LifeSpan.preUpdate=function(){return!(this.lifespan>0&&(this.lifespan-=this.game.time.physicsElapsedMS,this.lifespan<=0))||(this.kill(),!1)},o.Component.LifeSpan.prototype={alive:!0,lifespan:0,revive:function(t){return void 0===t&&(t=100),this.alive=!0,this.exists=!0,this.visible=!0,"function"==typeof this.setHealth&&this.setHealth(t),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}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.LoadTexture=function(){},o.Component.LoadTexture.prototype={customRender:!1,_frame:null,loadTexture:function(t,e,i){t===o.PENDING_ATLAS?(t=e,e=0):e=e||0,(i||void 0===i)&&this.animations&&this.animations.stop(),this.key=t,this.customRender=!1;var s=this.game.cache,n=!0,a=!this.texture.baseTexture.scaleMode;if(o.RenderTexture&&t instanceof o.RenderTexture)this.key=t.key,this.setTexture(t);else if(o.BitmapData&&t instanceof o.BitmapData)this.customRender=!0,this.setTexture(t.texture),n=s.hasFrameData(t.key,o.Cache.BITMAPDATA)?!this.animations.loadFrameData(s.getFrameData(t.key,o.Cache.BITMAPDATA),e):!this.animations.loadFrameData(t.frameData,0);else if(o.Video&&t instanceof o.Video){this.customRender=!0;var r=t.texture.valid;this.setTexture(t.texture),this.setFrame(t.texture.frame.clone()),t.onChangeSource.add(this.resizeFrame,this),this.texture.valid=r}else if(o.Tilemap&&t instanceof o.TilemapLayer)this.setTexture(PIXI.Texture.fromCanvas(t.canvas));else if(t instanceof PIXI.Texture)this.setTexture(t);else{var h=s.getImage(t,!0);this.key=h.key,this.setTexture(new PIXI.Texture(h.base)),this.texture.baseTexture.skipRender="__default"===t,n=!this.animations.loadFrameData(h.frameData,e)}n&&(this._frame=o.Rectangle.clone(this.texture.frame)),a||(this.texture.baseTexture.scaleMode=1)},setFrame:function(t){this._frame=t,this.texture.frame.x=t.x,this.texture.frame.y=t.y,this.texture.frame.width=t.width,this.texture.frame.height=t.height,this.texture.crop.x=t.x,this.texture.crop.y=t.y,this.texture.crop.width=t.width,this.texture.crop.height=t.height,t.trimmed?(this.texture.trim?(this.texture.trim.x=t.spriteSourceSizeX,this.texture.trim.y=t.spriteSourceSizeY,this.texture.trim.width=t.sourceSizeW,this.texture.trim.height=t.sourceSizeH):this.texture.trim={x:t.spriteSourceSizeX,y:t.spriteSourceSizeY,width:t.sourceSizeW,height:t.sourceSizeH},this.texture.width=t.sourceSizeW,this.texture.height=t.sourceSizeH,this.texture.frame.width=t.sourceSizeW,this.texture.frame.height=t.sourceSizeH):!t.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(t,e,i){this.texture.frame.resize(e,i),this.texture.setFrame(this.texture.frame)},resetFrame:function(){this._frame&&this.setFrame(this._frame)},frame:{get:function(){return this.animations.frame},set:function(t){this.animations.frame=t}},frameName:{get:function(){return this.animations.frameName},set:function(t){this.animations.frameName=t}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Overlap=function(){},o.Component.Overlap.prototype={overlap:function(t){return o.Rectangle.intersects(this.getBounds(),t.getBounds())}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.PhysicsBody=function(){},o.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))},o.Component.PhysicsBody.postUpdate=function(){this.exists&&this.body&&this.body.postUpdate()},o.Component.PhysicsBody.prototype={body:null,x:{get:function(){return this.position.x},set:function(t){this.position.x=t,this.body&&!this.body.dirty&&(this.body._reset=!0)}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t,this.body&&!this.body.dirty&&(this.body._reset=!0)}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Reset=function(){},o.Component.Reset.prototype.reset=function(t,e,i){return void 0===i&&(i=1),this.world.set(t,e),this.position.set(t,e),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=i),this.components.PhysicsBody&&this.body&&this.body.reset(t,e,!1,!1),this},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.ScaleMinMax=function(){},o.Component.ScaleMinMax.prototype={transformCallback:null,transformCallbackContext:this,scaleMin:null,scaleMax:null,checkTransform:function(t){this.scaleMin&&(t.athis.scaleMax.x&&(t.a=this.scaleMax.x),t.d>this.scaleMax.y&&(t.d=this.scaleMax.y))},setScaleMinMax:function(t,e,i,s){void 0===e?e=i=s=t:void 0===i&&(i=s=e,e=t),null===t?this.scaleMin=null:this.scaleMin?this.scaleMin.set(t,e):this.scaleMin=new o.Point(t,e),null===i?this.scaleMax=null:this.scaleMax?this.scaleMax.set(i,s):this.scaleMax=new o.Point(i,s),null===this.scaleMin?this.transformCallback=null:(this.transformCallback=this.checkTransform,this.transformCallbackContext=this)}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Component.Smoothed=function(){},o.Component.Smoothed.prototype={smoothed:{get:function(){return!this.texture.baseTexture.scaleMode},set:function(t){t?this.texture&&(this.texture.baseTexture.scaleMode=0):this.texture&&(this.texture.baseTexture.scaleMode=1)}}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.GameObjectFactory=function(t){this.game=t,this.world=this.game.world},o.GameObjectFactory.prototype={existing:function(t){return this.world.add(t)},weapon:function(t,e,i,s){var n=this.game.plugins.add(o.Weapon);return n.createBullets(t,e,i,s),n},image:function(t,e,i,s,n){return void 0===n&&(n=this.world),n.add(new o.Image(this.game,t,e,i,s))},sprite:function(t,e,i,s,n){return void 0===n&&(n=this.world),n.create(t,e,i,s)},creature:function(t,e,i,s,n){void 0===n&&(n=this.world);var a=new o.Creature(this.game,t,e,i,s);return n.add(a),a},tween:function(t){return this.game.tweens.create(t)},group:function(t,e,i,s,n){return new o.Group(this.game,t,e,i,s,n)},physicsGroup:function(t,e,i,s){return new o.Group(this.game,e,i,s,!0,t)},spriteBatch:function(t,e,i){return void 0===t&&(t=null),void 0===e&&(e="group"),void 0===i&&(i=!1),new o.SpriteBatch(this.game,t,e,i)},audio:function(t,e,i,s){return this.game.sound.add(t,e,i,s)},sound:function(t,e,i,s){return this.game.sound.add(t,e,i,s)},audioSprite:function(t){return this.game.sound.addSprite(t)},tileSprite:function(t,e,i,s,n,a,r){return void 0===r&&(r=this.world),r.add(new o.TileSprite(this.game,t,e,i,s,n,a))},rope:function(t,e,i,s,n,a){return void 0===a&&(a=this.world),a.add(new o.Rope(this.game,t,e,i,s,n))},text:function(t,e,i,s,n){return void 0===n&&(n=this.world),n.add(new o.Text(this.game,t,e,i,s))},button:function(t,e,i,s,n,a,r,h,l,c){return void 0===c&&(c=this.world),c.add(new o.Button(this.game,t,e,i,s,n,a,r,h,l))},graphics:function(t,e,i){return void 0===i&&(i=this.world),i.add(new o.Graphics(this.game,t,e))},emitter:function(t,e,i){return this.game.particles.add(new o.Particles.Arcade.Emitter(this.game,t,e,i))},retroFont:function(t,e,i,s,n,a,r,h,l){return new o.RetroFont(this.game,t,e,i,s,n,a,r,h,l)},bitmapText:function(t,e,i,s,n,a){return void 0===a&&(a=this.world),a.add(new o.BitmapText(this.game,t,e,i,s,n))},tilemap:function(t,e,i,s,n){return new o.Tilemap(this.game,t,e,i,s,n)},renderTexture:function(t,e,i,s){void 0!==i&&""!==i||(i=this.game.rnd.uuid()),void 0===s&&(s=!1);var n=new o.RenderTexture(this.game,t,e,i);return s&&this.game.cache.addRenderTexture(i,n),n},video:function(t,e){return new o.Video(this.game,t,e)},bitmapData:function(t,e,i,s){void 0===s&&(s=!1),void 0!==i&&""!==i||(i=this.game.rnd.uuid());var n=new o.BitmapData(this.game,i,t,e);return s&&this.game.cache.addBitmapData(i,n),n},filter:function(t){var e=Array.prototype.slice.call(arguments,1),t=new o.Filter[t](this.game);return t.init.apply(t,e),t},plugin:function(t){return this.game.plugins.add(t)}},o.GameObjectFactory.prototype.constructor=o.GameObjectFactory,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.GameObjectCreator=function(t){this.game=t,this.world=this.game.world},o.GameObjectCreator.prototype={image:function(t,e,i,s){return new o.Image(this.game,t,e,i,s)},sprite:function(t,e,i,s){return new o.Sprite(this.game,t,e,i,s)},tween:function(t){return new o.Tween(t,this.game,this.game.tweens)},group:function(t,e,i,s,n){return new o.Group(this.game,t,e,i,s,n)},spriteBatch:function(t,e,i){return void 0===e&&(e="group"),void 0===i&&(i=!1),new o.SpriteBatch(this.game,t,e,i)},audio:function(t,e,i,s){return this.game.sound.add(t,e,i,s)},audioSprite:function(t){return this.game.sound.addSprite(t)},sound:function(t,e,i,s){return this.game.sound.add(t,e,i,s)},tileSprite:function(t,e,i,s,n,a){return new o.TileSprite(this.game,t,e,i,s,n,a)},rope:function(t,e,i,s,n){return new o.Rope(this.game,t,e,i,s,n)},text:function(t,e,i,s){return new o.Text(this.game,t,e,i,s)},button:function(t,e,i,s,n,a,r,h,l){return new o.Button(this.game,t,e,i,s,n,a,r,h,l)},graphics:function(t,e){return new o.Graphics(this.game,t,e)},emitter:function(t,e,i){return new o.Particles.Arcade.Emitter(this.game,t,e,i)},retroFont:function(t,e,i,s,n,a,r,h,l){return new o.RetroFont(this.game,t,e,i,s,n,a,r,h,l)},bitmapText:function(t,e,i,s,n,a){return new o.BitmapText(this.game,t,e,i,s,n,a)},tilemap:function(t,e,i,s,n){return new o.Tilemap(this.game,t,e,i,s,n)},renderTexture:function(t,e,i,s){void 0!==i&&""!==i||(i=this.game.rnd.uuid()),void 0===s&&(s=!1);var n=new o.RenderTexture(this.game,t,e,i);return s&&this.game.cache.addRenderTexture(i,n),n},bitmapData:function(t,e,i,s){void 0===s&&(s=!1),void 0!==i&&""!==i||(i=this.game.rnd.uuid());var n=new o.BitmapData(this.game,i,t,e);return s&&this.game.cache.addBitmapData(i,n),n},filter:function(t){var e=Array.prototype.slice.call(arguments,1),t=new o.Filter[t](this.game);return t.init.apply(t,e),t}},o.GameObjectCreator.prototype.constructor=o.GameObjectCreator,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Sprite=function(t,e,i,s,n){e=e||0,i=i||0,s=s||null,n=n||null,this.type=o.SPRITE,this.physicsType=o.SPRITE,PIXI.Sprite.call(this,o.Cache.DEFAULT),o.Component.Core.init.call(this,t,e,i,s,n)},o.Sprite.prototype=Object.create(PIXI.Sprite.prototype),o.Sprite.prototype.constructor=o.Sprite,o.Component.Core.install.call(o.Sprite.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","Health","InCamera","InputEnabled","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),o.Sprite.prototype.preUpdatePhysics=o.Component.PhysicsBody.preUpdate,o.Sprite.prototype.preUpdateLifeSpan=o.Component.LifeSpan.preUpdate,o.Sprite.prototype.preUpdateInWorld=o.Component.InWorld.preUpdate,o.Sprite.prototype.preUpdateCore=o.Component.Core.preUpdate,o.Sprite.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Image=function(t,e,i,s,n){e=e||0,i=i||0,s=s||null,n=n||null,this.type=o.IMAGE,PIXI.Sprite.call(this,o.Cache.DEFAULT),o.Component.Core.init.call(this,t,e,i,s,n)},o.Image.prototype=Object.create(PIXI.Sprite.prototype),o.Image.prototype.constructor=o.Image,o.Component.Core.install.call(o.Image.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Destroy","FixedToCamera","InputEnabled","LifeSpan","LoadTexture","Overlap","Reset","ScaleMinMax","Smoothed"]),o.Image.prototype.preUpdateInWorld=o.Component.InWorld.preUpdate,o.Image.prototype.preUpdateCore=o.Component.Core.preUpdate,o.Image.prototype.preUpdate=function(){return!!this.preUpdateInWorld()&&this.preUpdateCore()},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Button=function(t,e,i,s,n,a,r,h,l,c){e=e||0,i=i||0,s=s||null,n=n||null,a=a||this,o.Image.call(this,t,e,i,s,h),this.type=o.BUTTON,this.physicsType=o.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 o.Signal,this.onInputOut=new o.Signal,this.onInputDown=new o.Signal,this.onInputUp=new o.Signal,this.onOverMouseOnly=!0,this.justReleasedPreventsOver=o.PointerMode.TOUCH,this.freezeFrames=!1,this.forceOut=!1,this.inputEnabled=!0,this.input.start(0,!0),this.input.useHandCursor=!0,this.setFrames(r,h,l,c),null!==n&&this.onInputUp.add(n,a),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)},o.Button.prototype=Object.create(o.Image.prototype),o.Button.prototype.constructor=o.Button;var l="Over",c="Out",u="Down",d="Up";o.Button.prototype.clearFrames=function(){this.setFrames(null,null,null,null)},o.Button.prototype.removedFromWorld=function(){this.inputEnabled=!1},o.Button.prototype.setStateFrame=function(t,e,i){var s="_on"+t+"Frame";null!==e?(this[s]=e,i&&this.changeStateFrame(t)):this[s]=null},o.Button.prototype.changeStateFrame=function(t){if(this.freezeFrames)return!1;var e="_on"+t+"Frame",i=this[e];return"string"==typeof i?(this.frameName=i,!0):"number"==typeof i&&(this.frame=i,!0)},o.Button.prototype.setFrames=function(t,e,i,s){this.setStateFrame("Over",t,this.input.pointerOver()),this.setStateFrame("Out",e,!this.input.pointerOver()),this.setStateFrame("Down",i,this.input.pointerDown()),this.setStateFrame("Up",s,this.input.pointerUp())},o.Button.prototype.setStateSound=function(t,e,i){var s="on"+t+"Sound",n="on"+t+"SoundMarker";e instanceof o.Sound||e instanceof o.AudioSprite?(this[s]=e,this[n]="string"==typeof i?i:""):(this[s]=null,this[n]="")},o.Button.prototype.playStateSound=function(t){var e="on"+t+"Sound",i=this[e];if(i){var s="on"+t+"SoundMarker",n=this[s];return i.play(n),!0}return!1},o.Button.prototype.setSounds=function(t,e,i,s,n,o,a,r){this.setStateSound("Over",t,e),this.setStateSound("Out",n,o),this.setStateSound("Down",i,s),this.setStateSound("Up",a,r)},o.Button.prototype.setOverSound=function(t,e){this.setStateSound("Over",t,e)},o.Button.prototype.setOutSound=function(t,e){this.setStateSound("Out",t,e)},o.Button.prototype.setDownSound=function(t,e){this.setStateSound("Down",t,e)},o.Button.prototype.setUpSound=function(t,e){this.setStateSound("Up",t,e)},o.Button.prototype.onInputOverHandler=function(t,e){e.justReleased()&&(this.justReleasedPreventsOver&e.pointerMode)===e.pointerMode||(this.changeStateFrame("Over"),this.onOverMouseOnly&&!e.isMouse||(this.playStateSound("Over"),this.onInputOver&&this.onInputOver.dispatch(this,e)))},o.Button.prototype.onInputOutHandler=function(t,e){this.changeStateFrame("Out"),this.playStateSound("Out"),this.onInputOut&&this.onInputOut.dispatch(this,e)},o.Button.prototype.onInputDownHandler=function(t,e){this.changeStateFrame("Down"),this.playStateSound("Down"),this.onInputDown&&this.onInputDown.dispatch(this,e)},o.Button.prototype.onInputUpHandler=function(t,e,i){if(this.playStateSound("Up"),this.onInputUp&&this.onInputUp.dispatch(this,e,i),!this.freezeFrames)if(!0===this.forceOut||(this.forceOut&e.pointerMode)===e.pointerMode)this.changeStateFrame("Out");else{var s=this.changeStateFrame("Up");s||(i?this.changeStateFrame("Over"):this.changeStateFrame("Out"))}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.SpriteBatch=function(t,e,i,s){void 0!==e&&null!==e||(e=t.world),PIXI.SpriteBatch.call(this),o.Group.call(this,t,e,i,s),this.type=o.SPRITEBATCH},o.SpriteBatch.prototype=o.Utils.extend(!0,o.SpriteBatch.prototype,PIXI.SpriteBatch.prototype,o.Group.prototype),o.SpriteBatch.prototype.constructor=o.SpriteBatch,/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.BitmapData=function(t,e,i,s,n){void 0!==i&&0!==i||(i=256),void 0!==s&&0!==s||(s=256),void 0===n&&(n=!1),this.game=t,this.key=e,this.width=i,this.height=s,this.canvas=o.Canvas.create(this,i,s,null,n),this.context=this.canvas.getContext("2d",{alpha:!0}),this.ctx=this.context,this.smoothProperty=t.renderType===o.CANVAS?t.renderer.renderSession.smoothProperty:o.Canvas.getSmoothingPrefix(this.context),this.imageData=this.context.getImageData(0,0,i,s),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 o.FrameData,this.textureFrame=this.frameData.addFrame(new o.Frame(0,0,0,i,s,"bitmapData")),this.texture.frame=this.textureFrame,this.type=o.BITMAPDATA,this.disableTextureUpload=!1,this.dirty=!1,this.cls=this.clear,this._image=null,this._pos=new o.Point,this._size=new o.Point,this._scale=new o.Point,this._rotate=0,this._alpha={prev:1,current:1},this._anchor=new o.Point,this._tempR=0,this._tempG=0,this._tempB=0,this._circle=new o.Circle,this._swapCanvas=void 0},o.BitmapData.prototype={move:function(t,e,i){return 0!==t&&this.moveH(t,i),0!==e&&this.moveV(e,i),this},moveH:function(t,e){void 0===e&&(e=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var i=this._swapCanvas,s=i.getContext("2d"),n=this.height,o=this.canvas;if(s.clearRect(0,0,this.width,this.height),t<0){t=Math.abs(t);var a=this.width-t;e&&s.drawImage(o,0,0,t,n,a,0,t,n),s.drawImage(o,t,0,a,n,0,0,a,n)}else{var a=this.width-t;e&&s.drawImage(o,a,0,t,n,0,0,t,n),s.drawImage(o,0,0,a,n,t,0,a,n)}return this.clear(),this.copy(this._swapCanvas)},moveV:function(t,e){void 0===e&&(e=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var i=this._swapCanvas,s=i.getContext("2d"),n=this.width,o=this.canvas;if(s.clearRect(0,0,this.width,this.height),t<0){t=Math.abs(t);var a=this.height-t;e&&s.drawImage(o,0,0,n,t,0,a,n,t),s.drawImage(o,0,t,n,a,0,0,n,a)}else{var a=this.height-t;e&&s.drawImage(o,0,a,n,t,0,0,n,t),s.drawImage(o,0,0,n,a,0,t,n,a)}return this.clear(),this.copy(this._swapCanvas)},add:function(t){if(Array.isArray(t))for(var e=0;e=0&&t<=this.width&&e>=0&&e<=this.height&&(o.Device.LITTLE_ENDIAN?this.pixels[e*this.width+t]=a<<24|n<<16|s<<8|i:this.pixels[e*this.width+t]=i<<24|s<<16|n<<8|a,r&&(this.context.putImageData(this.imageData,0,0),this.dirty=!0)),this},setPixel:function(t,e,i,s,n,o){return this.setPixel32(t,e,i,s,n,255,o)},getPixel:function(t,e,i){i||(i=o.Color.createColor());var s=~~(t+e*this.width);return s*=4,i.r=this.data[s],i.g=this.data[++s],i.b=this.data[++s],i.a=this.data[++s],i},getPixel32:function(t,e){if(t>=0&&t<=this.width&&e>=0&&e<=this.height)return this.pixels[e*this.width+t]},getPixelRGB:function(t,e,i,s,n){return o.Color.unpackPixel(this.getPixel32(t,e),i,s,n)},getPixels:function(t){return this.context.getImageData(t.x,t.y,t.width,t.height)},getFirstPixel:function(t){void 0===t&&(t=0);var e=o.Color.createColor(),i=0,s=0,n=1,a=!1;1===t?(n=-1,s=this.height):3===t&&(n=-1,i=this.width);do{o.Color.unpackPixel(this.getPixel32(i,s),e),0===t||1===t?++i===this.width&&(i=0,((s+=n)>=this.height||s<=0)&&(a=!0)):2!==t&&3!==t||++s===this.height&&(s=0,((i+=n)>=this.width||i<=0)&&(a=!0))}while(0===e.a&&!a);return e.x=i,e.y=s,e},getBounds:function(t){return void 0===t&&(t=new o.Rectangle),t.x=this.getFirstPixel(2).x,t.x===this.width?t.setTo(0,0,0,0):(t.y=this.getFirstPixel(0).y,t.width=this.getFirstPixel(3).x-t.x+1,t.height=this.getFirstPixel(1).y-t.y+1,t)},addToWorld:function(t,e,i,s,n,o){n=n||1,o=o||1;var a=this.game.add.image(t,e,this);return a.anchor.set(i,s),a.scale.set(n,o),a},copy:function(t,e,i,s,n,a,r,h,l,c,u,d,p,f,y,g,m){if(void 0!==t&&null!==t||(t=this),(t instanceof o.RenderTexture||t instanceof PIXI.RenderTexture)&&(t=t.getCanvas()),this._image=t,t instanceof o.Sprite||t instanceof o.Image||t instanceof o.Text||t instanceof PIXI.Sprite)this._pos.set(t.texture.crop.x,t.texture.crop.y),this._size.set(t.texture.crop.width,t.texture.crop.height),this._scale.set(t.scale.x,t.scale.y),this._anchor.set(t.anchor.x,t.anchor.y),this._rotate=t.rotation,this._alpha.current=t.alpha,t.texture instanceof o.RenderTexture||t.texture instanceof PIXI.RenderTexture?this._image=t.texture.getCanvas():this._image=t.texture.baseTexture.source,void 0!==a&&null!==a||(a=t.x),void 0!==r&&null!==r||(r=t.y),t.texture.trim&&(a+=t.texture.trim.x-t.anchor.x*t.texture.trim.width,r+=t.texture.trim.y-t.anchor.y*t.texture.trim.height),16777215!==t.tint&&(t.cachedTint!==t.tint&&(t.cachedTint=t.tint,t.tintedTexture=PIXI.CanvasTinter.getTintedTexture(t,t.tint)),this._image=t.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,t instanceof o.BitmapData)this._image=t.canvas;else if("string"==typeof t){if(null===(t=this.game.cache.getImage(t)))return;this._image=t}this._size.set(this._image.width,this._image.height)}if(void 0!==e&&null!==e||(e=0),void 0!==i&&null!==i||(i=0),s&&(this._size.x=s),n&&(this._size.y=n),void 0!==a&&null!==a||(a=e),void 0!==r&&null!==r||(r=i),void 0!==h&&null!==h||(h=this._size.x),void 0!==l&&null!==l||(l=this._size.y),"number"==typeof c&&(this._rotate=c),"number"==typeof u&&(this._anchor.x=u),"number"==typeof d&&(this._anchor.y=d),"number"==typeof p&&(this._scale.x=p),"number"==typeof f&&(this._scale.y=f),"number"==typeof y&&(this._alpha.current=y),void 0===g&&(g=null),void 0===m&&(m=!1),!(this._alpha.current<=0||0===this._scale.x||0===this._scale.y||0===this._size.x||0===this._size.y)){var v=this.context;return this._alpha.prev=v.globalAlpha,v.save(),v.globalAlpha=this._alpha.current,g&&(this.op=g),m&&(a|=0,r|=0),v.translate(a,r),v.scale(this._scale.x,this._scale.y),v.rotate(this._rotate),v.drawImage(this._image,this._pos.x+e,this._pos.y+i,this._size.x,this._size.y,-h*this._anchor.x,-l*this._anchor.y,h,l),v.restore(),v.globalAlpha=this._alpha.prev,this.dirty=!0,this}},copyTransform:function(t,e,i){if(void 0===e&&(e=null),void 0===i&&(i=!1),!t.hasOwnProperty("worldTransform")||!t.worldVisible||0===t.worldAlpha)return this;var s=t.worldTransform;if(this._pos.set(t.texture.crop.x,t.texture.crop.y),this._size.set(t.texture.crop.width,t.texture.crop.height),0===s.a||0===s.d||0===this._size.x||0===this._size.y)return this;t.texture instanceof o.RenderTexture||t.texture instanceof PIXI.RenderTexture?this._image=t.texture.getCanvas():this._image=t.texture.baseTexture.source;var n=s.tx,a=s.ty;t.texture.trim&&(n+=t.texture.trim.x-t.anchor.x*t.texture.trim.width,a+=t.texture.trim.y-t.anchor.y*t.texture.trim.height),16777215!==t.tint&&(t.cachedTint!==t.tint&&(t.cachedTint=t.tint,t.tintedTexture=PIXI.CanvasTinter.getTintedTexture(t,t.tint)),this._image=t.tintedTexture,this._pos.set(0)),i&&(n|=0,a|=0);var r=this.context;return this._alpha.prev=r.globalAlpha,r.save(),r.globalAlpha=this._alpha.current,e&&(this.op=e),r[this.smoothProperty]=t.texture.baseTexture.scaleMode===PIXI.scaleModes.LINEAR,r.setTransform(s.a,s.b,s.c,s.d,n,a),r.drawImage(this._image,this._pos.x,this._pos.y,this._size.x,this._size.y,-this._size.x*t.anchor.x,-this._size.y*t.anchor.y,this._size.x,this._size.y),r.restore(),r.globalAlpha=this._alpha.prev,this.dirty=!0,this},copyRect:function(t,e,i,s,n,o,a){return this.copy(t,e.x,e.y,e.width,e.height,i,s,e.width,e.height,0,0,0,1,1,n,o,a)},draw:function(t,e,i,s,n,o,a){return this.copy(t,null,null,null,null,e,i,s,n,null,null,null,null,null,null,o,a)},drawGroup:function(t,e,i){return t.total>0&&t.forEachExists(this.drawGroupProxy,this,e,i),this},drawGroupProxy:function(t,e,i){if(t.hasOwnProperty("texture")&&this.copyTransform(t,e,i),t.type===o.GROUP&&t.exists)this.drawGroup(t,e,i);else if(t.hasOwnProperty("children")&&t.children.length>0)for(var s=0;se.width&&(s=e.width);var n=this.context;return n.fillStyle=n.createPattern(e,i),this._circle=new o.Circle(t.start.x,t.start.y,e.height),this._circle.circumferencePoint(t.angle-1.5707963267948966,!1,this._pos),n.save(),n.translate(this._pos.x,this._pos.y),n.rotate(t.angle),n.fillRect(0,0,s,e.height),n.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(o.BitmapData.prototype,"smoothed",{get:function(){o.Canvas.getSmoothingEnabled(this.context)},set:function(t){o.Canvas.setSmoothingEnabled(this.context,t)}}),Object.defineProperty(o.BitmapData.prototype,"op",{get:function(){return this.context.globalCompositeOperation},set:function(t){this.context.globalCompositeOperation=t}}),o.BitmapData.getTransform=function(t,e,i,s,n,o){return"number"!=typeof t&&(t=0),"number"!=typeof e&&(e=0),"number"!=typeof i&&(i=1),"number"!=typeof s&&(s=1),"number"!=typeof n&&(n=0),"number"!=typeof o&&(o=0),{sx:i,sy:s,scaleX:i,scaleY:s,skewX:n,skewY:o,translateX:t,translateY:e,tx:t,ty:e}},o.BitmapData.prototype.constructor=o.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(t,e,i){return this.lineWidth=t||0,this.lineColor=e||0,this.lineAlpha=void 0===i?1:i,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(t,e){return this.drawShape(new PIXI.Polygon([t,e])),this},PIXI.Graphics.prototype.lineTo=function(t,e){return this.currentPath||this.moveTo(0,0),this.currentPath.shape.points.push(t,e),this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.quadraticCurveTo=function(t,e,i,s){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var n,o,a=20,r=this.currentPath.shape.points;0===r.length&&this.moveTo(0,0);for(var h=r[r.length-2],l=r[r.length-1],c=0,u=1;u<=a;++u)c=u/a,n=h+(t-h)*c,o=l+(e-l)*c,r.push(n+(t+(i-t)*c-n)*c,o+(e+(s-e)*c-o)*c);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.bezierCurveTo=function(t,e,i,s,n,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);for(var a=20,r,h,l,c,u,d=this.currentPath.shape.points,p=d[d.length-2],f=d[d.length-1],y=0,g=1;g<=a;++g)y=g/a,r=1-y,h=r*r,l=h*r,c=y*y,u=c*y,d.push(l*p+3*h*y*t+3*r*c*i+u*n,l*f+3*h*y*e+3*r*c*s+u*o);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arcTo=function(t,e,i,s,n){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,a=o[o.length-2],r=o[o.length-1],h=r-e,l=a-t,c=s-e,u=i-t,d=Math.abs(h*u-l*c);if(d<1e-8||0===n)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var p=h*h+l*l,f=c*c+u*u,y=h*c+l*u,g=n*Math.sqrt(p)/d,m=n*Math.sqrt(f)/d,v=g*y/p,b=m*y/f,x=g*u+m*l,_=g*c+m*h,w=l*(m+v),P=h*(m+v),C=u*(g+b),T=c*(g+b),S=Math.atan2(P-_,w-x),A=Math.atan2(T-_,C-x);this.arc(x+t,_+e,n,S,A,l*c>u*h)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arc=function(t,e,i,s,n,o,a){if(s===n)return this;void 0===o&&(o=!1),void 0===a&&(a=40),!o&&n<=s?n+=2*Math.PI:o&&s<=n&&(s+=2*Math.PI);var r=o?-1*(s-n):n-s,h=Math.ceil(Math.abs(r)/(2*Math.PI))*a;if(0===r)return this;var l=t+Math.cos(s)*i,c=e+Math.sin(s)*i;o&&this.filling?this.moveTo(t,e):this.moveTo(l,c);for(var u=this.currentPath.shape.points,d=r/(2*h),p=2*d,f=Math.cos(d),y=Math.sin(d),g=h-1,m=g%1/g,v=0;v<=g;v++){var b=v+m*v,x=d+s+p*b,_=Math.cos(x),w=-Math.sin(x);u.push((f*_+y*w)*i+t,(f*-w+y*_)*i+e)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.beginFill=function(t,e){return this.filling=!0,this.fillColor=t||0,this.fillAlpha=void 0===e?1:e,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(t,e,i,s){return this.drawShape(new PIXI.Rectangle(t,e,i,s)),this},PIXI.Graphics.prototype.drawRoundedRect=function(t,e,i,s,n){return this.drawShape(new PIXI.RoundedRectangle(t,e,i,s,n)),this},PIXI.Graphics.prototype.drawCircle=function(t,e,i){return this.drawShape(new PIXI.Circle(t,e,i)),this},PIXI.Graphics.prototype.drawEllipse=function(t,e,i,s){return this.drawShape(new PIXI.Ellipse(t,e,i,s)),this},PIXI.Graphics.prototype.drawPolygon=function(t){(t instanceof o.Polygon||t instanceof PIXI.Polygon)&&(t=t.points);var e=t;if(!Array.isArray(e)){e=new Array(arguments.length);for(var i=0;i_?y:_,_=m>_?m:_,_=b>_?b:_,w=g>w?g:w,w=v>w?v:w,w=x>w?x:w,this._bounds.x=P,this._bounds.width=_-P,this._bounds.y=C,this._bounds.height=w-C,this._currentBounds=this._bounds}return this._currentBounds},PIXI.Graphics.prototype.getLocalBounds=function(){var t=this.worldTransform;this.worldTransform=PIXI.identityMatrix;for(var e=0;ee?r+l:e,i=hs?h+c:s;else if(p===PIXI.Graphics.CIRC)r=n.x,h=n.y,l=n.radius+f/2,c=n.radius+f/2,t=r-le?r+l:e,i=h-cs?h+c:s;else if(p===PIXI.Graphics.ELIP)r=n.x,h=n.y,l=n.width+f/2,c=n.height+f/2,t=r-le?r+l:e,i=h-cs?h+c:s;else{a=n.points;for(var y=0;ye?r+f:e,i=h-fs?h+f:s}}else t=0,e=0,i=0,s=0;var g=this.boundsPadding;this._localBounds.x=t-g,this._localBounds.width=e-t+2*g,this._localBounds.y=i-g,this._localBounds.height=s-i+2*g},PIXI.Graphics.prototype._generateCachedSprite=function(){var t=this.getLocalBounds();if(this._cachedSprite)this._cachedSprite.buffer.resize(t.width,t.height);else{var e=new PIXI.CanvasBuffer(t.width,t.height),i=PIXI.Texture.fromCanvas(e.canvas);this._cachedSprite=new PIXI.Sprite(i),this._cachedSprite.buffer=e,this._cachedSprite.worldTransform=this.worldTransform}this._cachedSprite.anchor.x=-t.x/t.width,this._cachedSprite.anchor.y=-t.y/t.height,this._cachedSprite.buffer.context.translate(-t.x,-t.y),this.worldAlpha=1,PIXI.CanvasGraphics.renderGraphics(this,this._cachedSprite.buffer.context),this._cachedSprite.alpha=this.alpha},PIXI.Graphics.prototype.updateCachedSpriteTexture=function(){var t=this._cachedSprite,e=t.texture,i=t.buffer.canvas;e.baseTexture.width=i.width,e.baseTexture.height=i.height,e.crop.width=e.frame.width=i.width,e.crop.height=e.frame.height=i.height,t._width=i.width,t._height=i.height,e.baseTexture.dirty()},PIXI.Graphics.prototype.destroyCachedSprite=function(){this._cachedSprite.texture.destroy(!0),this._cachedSprite=null},PIXI.Graphics.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null,t instanceof o.Polygon&&(t=t.clone(),t.flatten());var e=new PIXI.GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===PIXI.Graphics.POLY&&(e.shape.closed=this.filling,this.currentPath=e),this.dirty=!0,this._boundsDirty=!0,e},Object.defineProperty(PIXI.Graphics.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(t){this._cacheAsBitmap=t,this._cacheAsBitmap?this._generateCachedSprite():this.destroyCachedSprite(),this.dirty=!0,this.webGLDirty=!0}}),PIXI.GraphicsData=function(t,e,i,s,n,o,a){this.lineWidth=t,this.lineColor=e,this.lineAlpha=i,this._lineTint=e,this.fillColor=s,this.fillAlpha=n,this._fillTint=s,this.fill=o,this.shape=a,this.type=a.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(t,e,i){i=i||2;var s=e&&e.length,n=s?e[0]*i:t.length,o=PIXI.EarCut.linkedList(t,0,n,i,!0),a=[];if(!o)return a;var r,h,l,c,u,d,p;if(s&&(o=PIXI.EarCut.eliminateHoles(t,e,o,i)),t.length>80*i){r=l=t[0],h=c=t[1];for(var f=i;fl&&(l=u),d>c&&(c=d);p=Math.max(l-r,c-h)}return PIXI.EarCut.earcutLinked(o,a,i,r,h,p),a},PIXI.EarCut.linkedList=function(t,e,i,s,n){var o=0,a,r,h;for(a=e,r=i-s;a0)for(a=e;a=e;a-=s)h=PIXI.EarCut.insertNode(a,t[a],t[a+1],h);return h},PIXI.EarCut.filterPoints=function(t,e){if(!t)return t;e||(e=t);var i=t,s;do{if(s=!1,i.steiner||!PIXI.EarCut.equals(i,i.next)&&0!==PIXI.EarCut.area(i.prev,i,i.next))i=i.next;else{if(PIXI.EarCut.removeNode(i),(i=e=i.prev)===i.next)return null;s=!0}}while(s||i!==e);return e},PIXI.EarCut.earcutLinked=function(t,e,i,s,n,o,a){if(t){!a&&o&&PIXI.EarCut.indexCurve(t,s,n,o);for(var r=t,h,l;t.prev!==t.next;)if(h=t.prev,l=t.next,o?PIXI.EarCut.isEarHashed(t,s,n,o):PIXI.EarCut.isEar(t))e.push(h.i/i),e.push(t.i/i),e.push(l.i/i),PIXI.EarCut.removeNode(t),t=l.next,r=l.next;else if((t=l)===r){a?1===a?(t=PIXI.EarCut.cureLocalIntersections(t,e,i),PIXI.EarCut.earcutLinked(t,e,i,s,n,o,2)):2===a&&PIXI.EarCut.splitEarcut(t,e,i,s,n,o):PIXI.EarCut.earcutLinked(PIXI.EarCut.filterPoints(t),e,i,s,n,o,1);break}}},PIXI.EarCut.isEar=function(t){var e=t.prev,i=t,s=t.next;if(PIXI.EarCut.area(e,i,s)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(PIXI.EarCut.pointInTriangle(e.x,e.y,i.x,i.y,s.x,s.y,n.x,n.y)&&PIXI.EarCut.area(n.prev,n,n.next)>=0)return!1;n=n.next}return!0},PIXI.EarCut.isEarHashed=function(t,e,i,s){var n=t.prev,o=t,a=t.next;if(PIXI.EarCut.area(n,o,a)>=0)return!1;for(var r=n.xo.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,c=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,u=PIXI.EarCut.zOrder(r,h,e,i,s),d=PIXI.EarCut.zOrder(l,c,e,i,s),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&PIXI.EarCut.pointInTriangle(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&PIXI.EarCut.area(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&PIXI.EarCut.pointInTriangle(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&PIXI.EarCut.area(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0},PIXI.EarCut.cureLocalIntersections=function(t,e,i){var s=t;do{var n=s.prev,o=s.next.next;PIXI.EarCut.intersects(n,s,s.next,o)&&PIXI.EarCut.locallyInside(n,o)&&PIXI.EarCut.locallyInside(o,n)&&(e.push(n.i/i),e.push(s.i/i),e.push(o.i/i),PIXI.EarCut.removeNode(s),PIXI.EarCut.removeNode(s.next),s=t=o),s=s.next}while(s!==t);return s},PIXI.EarCut.splitEarcut=function(t,e,i,s,n,o){var a=t;do{for(var r=a.next.next;r!==a.prev;){if(a.i!==r.i&&PIXI.EarCut.isValidDiagonal(a,r)){var h=PIXI.EarCut.splitPolygon(a,r);return a=PIXI.EarCut.filterPoints(a,a.next),h=PIXI.EarCut.filterPoints(h,h.next),PIXI.EarCut.earcutLinked(a,e,i,s,n,o),void PIXI.EarCut.earcutLinked(h,e,i,s,n,o)}r=r.next}a=a.next}while(a!==t)},PIXI.EarCut.eliminateHoles=function(t,e,i,s){var n=[],o,a,r,h,l;for(o=0,a=e.length;o=i.next.y){var r=i.x+(n-i.y)*(i.next.x-i.x)/(i.next.y-i.y);r<=s&&r>o&&(o=r,a=i.x=i.x&&i.x>=a.x&&PIXI.EarCut.pointInTriangle(na.x)&&PIXI.EarCut.locallyInside(i,t)&&(a=i,l=c),i=i.next;return a},PIXI.EarCut.indexCurve=function(t,e,i,s){var n=t;do{null===n.z&&(n.z=PIXI.EarCut.zOrder(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,PIXI.EarCut.sortLinked(n)},PIXI.EarCut.sortLinked=function(t){var e,i,s,n,o,a,r,h,l=1;do{for(i=t,t=null,o=null,a=0;i;){for(a++,s=i,r=0,e=0;e0||h>0&&s;)0===r?(n=s,s=s.nextZ,h--):0!==h&&s?i.z<=s.z?(n=i,i=i.nextZ,r--):(n=s,s=s.nextZ,h--):(n=i,i=i.nextZ,r--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;i=s}o.nextZ=null,l*=2}while(a>1);return t},PIXI.EarCut.zOrder=function(t,e,i,s,n){return t=32767*(t-i)/n,e=32767*(e-s)/n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},PIXI.EarCut.getLeftmost=function(t){var e=t,i=t;do{e.x=0&&(t-a)*(s-r)-(i-a)*(e-r)>=0&&(i-a)*(o-r)-(n-a)*(s-r)>=0},PIXI.EarCut.isValidDiagonal=function(t,e){return PIXI.EarCut.equals(t,e)||t.next.i!==e.i&&t.prev.i!==e.i&&!PIXI.EarCut.intersectsPolygon(t,e)&&PIXI.EarCut.locallyInside(t,e)&&PIXI.EarCut.locallyInside(e,t)&&PIXI.EarCut.middleInside(t,e)},PIXI.EarCut.area=function(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)},PIXI.EarCut.equals=function(t,e){return t.x===e.x&&t.y===e.y},PIXI.EarCut.intersects=function(t,e,i,s){return PIXI.EarCut.area(t,e,i)>0!=PIXI.EarCut.area(t,e,s)>0&&PIXI.EarCut.area(i,s,t)>0!=PIXI.EarCut.area(i,s,e)>0},PIXI.EarCut.intersectsPolygon=function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&PIXI.EarCut.intersects(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1},PIXI.EarCut.locallyInside=function(t,e){return PIXI.EarCut.area(t.prev,t,t.next)<0?PIXI.EarCut.area(t,e,t.next)>=0&&PIXI.EarCut.area(t,t.prev,e)>=0:PIXI.EarCut.area(t,e,t.prev)<0||PIXI.EarCut.area(t,t.next,e)<0},PIXI.EarCut.middleInside=function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{i.y>o!=i.next.y>o&&n<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s},PIXI.EarCut.splitPolygon=function(t,e){var i=new PIXI.EarCut.Node(t.i,t.x,t.y),s=new PIXI.EarCut.Node(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,o.next=s,s.prev=o,s},PIXI.EarCut.insertNode=function(t,e,i,s){var n=new PIXI.EarCut.Node(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n},PIXI.EarCut.removeNode=function(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)},PIXI.EarCut.Node=function(t,e,i){this.i=t,this.x=e,this.y=i,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(t,e){var i=e.gl,s=e.projection,n=e.offset,o=e.shaderManager.primitiveShader,a;t.dirty&&PIXI.WebGLGraphics.updateGraphics(t,i);for(var r=t._webGL[i.id],h=0;h=PIXI.WebGLGraphics.stencilBufferLimit)if(a.points.length<2*PIXI.WebGLGraphics.stencilBufferLimit){o=PIXI.WebGLGraphics.switchMode(i,0);var r=PIXI.WebGLGraphics.buildPoly(a,o);r||(o=PIXI.WebGLGraphics.switchMode(i,1),PIXI.WebGLGraphics.buildComplexPoly(a,o))}else o=PIXI.WebGLGraphics.switchMode(i,1),PIXI.WebGLGraphics.buildComplexPoly(a,o);a.lineWidth>0&&(o=PIXI.WebGLGraphics.switchMode(i,0),PIXI.WebGLGraphics.buildLine(a,o))}else o=PIXI.WebGLGraphics.switchMode(i,0),a.type===PIXI.Graphics.RECT?PIXI.WebGLGraphics.buildRectangle(a,o):a.type===PIXI.Graphics.CIRC||a.type===PIXI.Graphics.ELIP?PIXI.WebGLGraphics.buildCircle(a,o):a.type===PIXI.Graphics.RREC&&PIXI.WebGLGraphics.buildRoundedRectangle(a,o);i.lastIndex++}for(s=0;s19600?(O=A-I,R=E-M,j=Math.sqrt(O*O+R*R),O/=j,R/=j,O*=p,R*=p,h.push(P-O,C-R),h.push(g,m,v,y),h.push(P+O,C+R),h.push(g,m,v,y),h.push(P-O,C-R),h.push(g,m,v,y),u++):(h.push(b,x),h.push(g,m,v,y),h.push(P-(b-P),C-(x-C)),h.push(g,m,v,y)));for(_=s[2*(c-2)],w=s[2*(c-2)+1],P=s[2*(c-1)],C=s[2*(c-1)+1],A=-(w-C),E=_-P,j=Math.sqrt(A*A+E*E),A/=j,E/=j,A*=p,E*=p,h.push(P-A,C-E),h.push(g,m,v,y),h.push(P+A,C+E),h.push(g,m,v,y),l.push(d),i=0;io?h:o,a=lr?l:r;i.push(n,a,o,a,o,r,n,r);var u=i.length/2;for(c=0;cS?S:T,e.beginPath(),e.moveTo(_,w+T),e.lineTo(_,w+C-T),e.quadraticCurveTo(_,w+C,_+T,w+C),e.lineTo(_+P-T,w+C),e.quadraticCurveTo(_+P,w+C,_+P,w+C-T),e.lineTo(_+P,w+T),e.quadraticCurveTo(_+P,w,_+P-T,w),e.lineTo(_+T,w),e.quadraticCurveTo(_,w,_,w+T),e.closePath(),(n.fillColor||0===n.fillColor)&&(e.globalAlpha=n.fillAlpha*i,e.fillStyle="#"+("00000"+(0|a).toString(16)).substr(-6),e.fill()),n.lineWidth&&(e.globalAlpha=n.lineAlpha*i,e.strokeStyle="#"+("00000"+(0|r).toString(16)).substr(-6),e.stroke())}}},PIXI.CanvasGraphics.renderGraphicsMask=function(t,e){var i=t.graphicsData.length;if(0!==i){e.beginPath();for(var s=0;sC?C:P,e.moveTo(b,x+P),e.lineTo(b,x+w-P),e.quadraticCurveTo(b,x+w,b+P,x+w),e.lineTo(b+_-P,x+w),e.quadraticCurveTo(b+_,x+w,b+_,x+w-P),e.lineTo(b+_,x+P),e.quadraticCurveTo(b+_,x,b+_-P,x),e.lineTo(b+P,x),e.quadraticCurveTo(b,x,b,x+P),e.closePath()}}}},PIXI.CanvasGraphics.updateGraphicsTint=function(t){if(16777215!==t.tint)for(var e=(t.tint>>16&255)/255,i=(t.tint>>8&255)/255,s=(255&t.tint)/255,n=0;n>16&255)/255*e*255<<16)+((a>>8&255)/255*i*255<<8)+(255&a)/255*s*255,o._lineTint=((r>>16&255)/255*e*255<<16)+((r>>8&255)/255*i*255<<8)+(255&r)/255*s*255}},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Graphics=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),this.type=o.GRAPHICS,this.physicsType=o.SPRITE,this.anchor=new o.Point,PIXI.Graphics.call(this),o.Component.Core.init.call(this,t,e,i,"",null)},o.Graphics.prototype=Object.create(PIXI.Graphics.prototype),o.Graphics.prototype.constructor=o.Graphics,o.Component.Core.install.call(o.Graphics.prototype,["Angle","AutoCull","Bounds","Destroy","FixedToCamera","InputEnabled","InWorld","LifeSpan","PhysicsBody","Reset"]),o.Graphics.prototype.preUpdatePhysics=o.Component.PhysicsBody.preUpdate,o.Graphics.prototype.preUpdateLifeSpan=o.Component.LifeSpan.preUpdate,o.Graphics.prototype.preUpdateInWorld=o.Component.InWorld.preUpdate,o.Graphics.prototype.preUpdateCore=o.Component.Core.preUpdate,o.Graphics.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},o.Graphics.prototype.postUpdate=function(){o.Component.PhysicsBody.postUpdate.call(this),o.Component.FixedToCamera.postUpdate.call(this),this._boundsDirty&&(this.updateLocalBounds(),this._boundsDirty=!1);for(var t=0;t0&&this.drawPolygon(i)}else this.drawPolygon(i)},o.Graphics.prototype.drawTriangles=function(t,e,i){void 0===i&&(i=!1);var s=new o.Point,n=new o.Point,a=new o.Point,r=[],h;if(e)if(t[0]instanceof o.Point)for(h=0;h -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.RenderTexture=function(t,e,i,s,n,a){void 0===s&&(s=""),void 0===n&&(n=o.scaleModes.DEFAULT),void 0===a&&(a=1),this.game=t,this.key=s,this.type=o.RENDERTEXTURE,this._tempMatrix=new PIXI.Matrix,PIXI.RenderTexture.call(this,e,i,this.game.renderer,n,a),this.render=o.RenderTexture.prototype.render},o.RenderTexture.prototype=Object.create(PIXI.RenderTexture.prototype),o.RenderTexture.prototype.constructor=o.RenderTexture,o.RenderTexture.prototype.renderXY=function(t,e,i,s){t.updateTransform(),this._tempMatrix.copyFrom(t.worldTransform),this._tempMatrix.tx=e,this._tempMatrix.ty=i,this.renderer.type===PIXI.WEBGL_RENDERER?this.renderWebGL(t,this._tempMatrix,s):this.renderCanvas(t,this._tempMatrix,s)},o.RenderTexture.prototype.renderRawXY=function(t,e,i,s){this._tempMatrix.identity().translate(e,i),this.renderer.type===PIXI.WEBGL_RENDERER?this.renderWebGL(t,this._tempMatrix,s):this.renderCanvas(t,this._tempMatrix,s)},o.RenderTexture.prototype.render=function(t,e,i){void 0===e||null===e?this._tempMatrix.copyFrom(t.worldTransform):this._tempMatrix.copyFrom(e),this.renderer.type===PIXI.WEBGL_RENDERER?this.renderWebGL(t,this._tempMatrix,i):this.renderCanvas(t,this._tempMatrix,i)},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Text=function(t,e,i,s,n){e=e||0,i=i||0,s=void 0===s||null===s?"":s.toString(),n=o.Utils.extend({},n),this.type=o.TEXT,this.physicsType=o.SPRITE,this.padding=new o.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=t.renderer.resolution,this._text=s,this._fontComponents=null,this._lineSpacing=0,this._charCount=0,this._width=0,this._height=0,o.Sprite.call(this,t,e,i,PIXI.Texture.fromCanvas(this.canvas)),this.setStyle(n),""!==s&&this.updateText()},o.Text.prototype=Object.create(o.Sprite.prototype),o.Text.prototype.constructor=o.Text,o.Text.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},o.Text.prototype.update=function(){},o.Text.prototype.destroy=function(t){this.texture.destroy(!0),o.Component.Destroy.prototype.destroy.call(this,t)},o.Text.prototype.setShadow=function(t,e,i,s,n,o){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="rgba(0, 0, 0, 1)"),void 0===s&&(s=0),void 0===n&&(n=!0),void 0===o&&(o=!0),this.style.shadowOffsetX=t,this.style.shadowOffsetY=e,this.style.shadowColor=i,this.style.shadowBlur=s,this.style.shadowStroke=n,this.style.shadowFill=o,this.dirty=!0,this},o.Text.prototype.setStyle=function(t,e){void 0===e&&(e=!1),t=t||{},t.font=t.font||"bold 20pt Arial",t.backgroundColor=t.backgroundColor||null,t.fill=t.fill||"black",t.align=t.align||"left",t.boundsAlignH=t.boundsAlignH||"left",t.boundsAlignV=t.boundsAlignV||"top",t.stroke=t.stroke||"black",t.strokeThickness=t.strokeThickness||0,t.wordWrap=t.wordWrap||!1,t.wordWrapWidth=t.wordWrapWidth||100,t.maxLines=t.maxLines||0,t.shadowOffsetX=t.shadowOffsetX||0,t.shadowOffsetY=t.shadowOffsetY||0,t.shadowColor=t.shadowColor||"rgba(0,0,0,0)",t.shadowBlur=t.shadowBlur||0,t.tabs=t.tabs||0;var i=this.fontToComponents(t.font);return t.fontStyle&&(i.fontStyle=t.fontStyle),t.fontVariant&&(i.fontVariant=t.fontVariant),t.fontWeight&&(i.fontWeight=t.fontWeight),t.fontSize&&("number"==typeof t.fontSize&&(t.fontSize=t.fontSize+"px"),i.fontSize=t.fontSize),this._fontComponents=i,t.font=this.componentsToFont(this._fontComponents),this.style=t,this.dirty=!0,e&&this.updateText(),this},o.Text.prototype.updateText=function(){this.texture.baseTexture.resolution=this._res,this.context.font=this.style.font;var t=this.text;this.style.wordWrap&&(t=this.runWordWrap(this.text));var e=t.split(/(?:\r\n|\r|\n)/),i=this.style.tabs,s=[],n=0,o=this.determineFontProperties(this.style.font),a=e.length;this.style.maxLines>0&&this.style.maxLines0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?h+=this.measureLine(e[r]):h+=this.context.measureText(e[r]).width,this.style.wordWrap&&(h-=this.context.measureText(" ").width)}else{var l=e[r].split(/(?:\t)/),h=this.padding.x+this.style.strokeThickness;if(Array.isArray(i))for(var c=0,u=0;u0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.measureLine(l[u]):Math.ceil(this.context.measureText(l[u]).width),u>0&&(c+=i[u-1]),h=c+d}else for(var u=0;u0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?h+=this.measureLine(l[u]):h+=Math.ceil(this.context.measureText(l[u]).width);var p=this.game.math.snapToCeil(h,i)-h;h+=p}}s[r]=Math.ceil(h),n=Math.max(n,s[r])}this.canvas.width=n*this._res;var f=o.fontSize+this.style.strokeThickness+this.padding.y,y=f*a,g=this._lineSpacing;g<0&&Math.abs(g)>f&&(g=-f),0!==g&&(y+=g>0?g*e.length:g*(e.length-1)),this.canvas.height=y*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 m,v;for(this._charCount=0,r=0;r0&&(v+=g*r),"right"===this.style.align?m+=n-s[r]:"center"===this.style.align&&(m+=(n-s[r])/2),this.autoRound&&(m=Math.round(m),v=Math.round(v)),this.colors.length>0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.updateLine(e[r],m,v):(this.style.stroke&&this.style.strokeThickness&&(this.updateShadow(this.style.shadowStroke),0===i?this.context.strokeText(e[r],m,v):this.renderTabLine(e[r],m,v,!1)),this.style.fill&&(this.updateShadow(this.style.shadowFill),0===i?this.context.fillText(e[r],m,v):this.renderTabLine(e[r],m,v,!0)));this.updateTexture(),this.dirty=!1},o.Text.prototype.renderTabLine=function(t,e,i,s){var n=t.split(/(?:\t)/),o=this.style.tabs,a=0;if(Array.isArray(o))for(var r=0,h=0;h0&&(r+=o[h-1]),a=e+r,s?this.context.fillText(n[h],a,i):this.context.strokeText(n[h],a,i);else for(var h=0;h0||this.fontStyles.length>0){var n=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(n.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(n.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(n)}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)),e+=this.context.measureText(s).width,this._charCount++}return Math.ceil(e)},o.Text.prototype.updateLine=function(t,e,i){for(var s=0;s0||this.fontStyles.length>0){var o=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(o.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(o.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(o)}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(n,e,i)),this.style.fill&&(this.colors[this._charCount]&&(this.context.fillStyle=this.colors[this._charCount]),this.updateShadow(this.style.shadowFill),this.context.fillText(n,e,i)),e+=this.context.measureText(n).width,this._charCount++}},o.Text.prototype.clearColors=function(){return this.colors=[],this.strokeColors=[],this.dirty=!0,this},o.Text.prototype.clearFontValues=function(){return this.fontStyles=[],this.fontWeights=[],this.dirty=!0,this},o.Text.prototype.addColor=function(t,e){return this.colors[e]=t,this.dirty=!0,this},o.Text.prototype.addStrokeColor=function(t,e){return this.strokeColors[e]=t,this.dirty=!0,this},o.Text.prototype.addFontStyle=function(t,e){return this.fontStyles[e]=t,this.dirty=!0,this},o.Text.prototype.addFontWeight=function(t,e){return this.fontWeights[e]=t,this.dirty=!0,this},o.Text.prototype.precalculateWordWrap=function(t){return this.texture.baseTexture.resolution=this._res,this.context.font=this.style.font,this.runWordWrap(t).split(/(?:\r\n|\r|\n)/)},o.Text.prototype.runWordWrap=function(t){return this.useAdvancedWrap?this.advancedWordWrap(t):this.basicWordWrap(t)},o.Text.prototype.advancedWordWrap=function(t){for(var e=this.context,i=this.style.wordWrapWidth,s="",n=t.replace(/ +/gi," ").split(/\r?\n/gi),o=n.length,a=0;al){if(0===u){for(var y=p;y.length&&(y=y.slice(0,-1),!((f=e.measureText(y).width)<=l)););if(!y.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var g=d.substr(y.length);c[u]=g,h+=y}var m=c[u].length?u:u+1,v=c.slice(m).join(" ").replace(/[ \n]*$/gi,"");n[a+1]=v+" "+(n[a+1]||""),o=n.length;break}h+=p,l-=f}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},o.Text.prototype.basicWordWrap=function(t){for(var e="",i=t.split("\n"),s=0;sn?(a>0&&(e+="\n"),e+=o[a]+" ",n=this.style.wordWrapWidth-r):(n-=h,e+=o[a]+" ")}si&&(this.style.wordWrapWidth=i)),this.updateTexture(),this},o.Text.prototype.updateTexture=function(){var t=this.texture.baseTexture,e=this.texture.crop,i=this.texture.frame,s=this.canvas.width,n=this.canvas.height;if(t.width=s,t.height=n,e.width=s,e.height=n,i.width=s,i.height=n,this.texture.width=s,this.texture.height=n,this._width=s,this._height=n,this.textBounds){var o=this.textBounds.x,a=this.textBounds.y;"right"===this.style.boundsAlignH?o+=this.textBounds.width-this.canvas.width/this.resolution:"center"===this.style.boundsAlignH&&(o+=this.textBounds.halfWidth-this.canvas.width/this.resolution/2),"bottom"===this.style.boundsAlignV?a+=this.textBounds.height-this.canvas.height/this.resolution:"middle"===this.style.boundsAlignV&&(a+=this.textBounds.halfHeight-this.canvas.height/this.resolution/2),this.pivot.x=-o,this.pivot.y=-a}this.renderable=0!==s&&0!==n,this.texture.requiresReTint=!0,this.texture.baseTexture.dirty()},o.Text.prototype._renderWebGL=function(t){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderWebGL.call(this,t)},o.Text.prototype._renderCanvas=function(t){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderCanvas.call(this,t)},o.Text.prototype.determineFontProperties=function(t){var e=o.Text.fontPropertiesCache[t];if(!e){e={};var i=o.Text.fontPropertiesCanvas,s=o.Text.fontPropertiesContext;s.font=t;var n=Math.ceil(s.measureText("|MÉq").width),a=Math.ceil(s.measureText("|MÉq").width),r=2*a;if(a=1.4*a|0,i.width=n,i.height=r,s.fillStyle="#f00",s.fillRect(0,0,n,r),s.font=t,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText("|MÉq",0,a),!s.getImageData(0,0,n,r))return e.ascent=a,e.descent=a+6,e.fontSize=e.ascent+e.descent,o.Text.fontPropertiesCache[t]=e,e;var h=s.getImageData(0,0,n,r).data,l=h.length,c=4*n,u,d,p=0,f=!1;for(u=0;ua;u--){for(d=0;d -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.BitmapText=function(t,e,i,s,n,a,r){e=e||0,i=i||0,s=s||"",n=n||"",a=a||32,r=r||"left",PIXI.DisplayObjectContainer.call(this),this.type=o.BITMAPTEXT,this.physicsType=o.SPRITE,this.textWidth=0,this.textHeight=0,this.anchor=new o.Point,this._prevAnchor=new o.Point,this._glyphs=[],this._maxWidth=0,this._text=n.toString()||"",this._data=t.cache.getBitmapFont(s),this._font=s,this._fontSize=a,this._align=r,this._tint=16777215,this.updateText(),this.dirty=!1,o.Component.Core.init.call(this,t,e,i,"",null)},o.BitmapText.prototype=Object.create(PIXI.DisplayObjectContainer.prototype),o.BitmapText.prototype.constructor=o.BitmapText,o.Component.Core.install.call(o.BitmapText.prototype,["Angle","AutoCull","Bounds","Destroy","FixedToCamera","InputEnabled","InWorld","LifeSpan","PhysicsBody","Reset"]),o.BitmapText.prototype.preUpdatePhysics=o.Component.PhysicsBody.preUpdate,o.BitmapText.prototype.preUpdateLifeSpan=o.Component.LifeSpan.preUpdate,o.BitmapText.prototype.preUpdateInWorld=o.Component.InWorld.preUpdate,o.BitmapText.prototype.preUpdateCore=o.Component.Core.preUpdate,o.BitmapText.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},o.BitmapText.prototype.postUpdate=function(){o.Component.PhysicsBody.postUpdate.call(this),o.Component.FixedToCamera.postUpdate.call(this),this.body&&this.body.type===o.Physics.ARCADE&&(this.textWidth===this.body.sourceWidth&&this.textHeight===this.body.sourceHeight||this.body.setSize(this.textWidth,this.textHeight))},o.BitmapText.prototype.setText=function(t){this.text=t};o.BitmapText.prototype.scanLine=function(t,e,i){for(var s=0,n=0,o=-1,a=0,r=null,h=this._maxWidth>0?this._maxWidth:null,l=[],c=0;c=h&&o>-1)return{width:a||n,text:i.substr(0,c-(c-o)),end:u,chars:l};n+=(p.xAdvance+y)*e,l.push(s+(p.xOffset+y)*e),s+=(p.xAdvance+y)*e,r=d}return{width:n,text:i,end:u,chars:l}},o.BitmapText.prototype.cleanText=function(t,e){void 0===e&&(e="");var i=this._data.font;if(!i)return"";for(var s=/\r\n|\n\r|\n|\r/g,n=t.replace(s,"\n").split("\n"),o=0;othis.textWidth&&(this.textWidth=o.width),n+=t.lineHeight*i,e=e.substr(o.text.length+1)}while(!1===o.end);this.textHeight=n;for(var a=0,r=0,h=this.textWidth*this.anchor.x,l=this.textHeight*this.anchor.y,c=0;c0&&(this._fontSize=t,this.updateText())}}),Object.defineProperty(o.BitmapText.prototype,"text",{get:function(){return this._text},set:function(t){t!==this._text&&(this._text=t.toString()||"",this.updateText())}}),Object.defineProperty(o.BitmapText.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(t){t!==this._maxWidth&&(this._maxWidth=t,this.updateText())}}),Object.defineProperty(o.BitmapText.prototype,"smoothed",{get:function(){return!this._data.base.scaleMode},set:function(t){this._data.base.scaleMode=t?0:1}}),/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.RetroFont=function(t,e,i,s,n,a,r,h,l,c){if(!t.cache.checkImageKey(e))return!1;void 0!==a&&null!==a||(a=t.cache.getImage(e).width/i),this.characterWidth=i,this.characterHeight=s,this.characterSpacingX=r||0,this.characterSpacingY=h||0,this.characterPerRow=a,this.offsetX=l||0,this.offsetY=c||0,this.align="left",this.multiLine=!1,this.autoUpperCase=!0,this.customSpacingX=0,this.customSpacingY=0,this.fixedWidth=0,this.fontSet=t.cache.getImage(e),this._text="",this.grabData=[],this.frameData=new o.FrameData;for(var u=this.offsetX,d=this.offsetY,p=0,f=0;f?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",o.RetroFont.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",o.RetroFont.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",o.RetroFont.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",o.RetroFont.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",o.RetroFont.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",o.RetroFont.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",o.RetroFont.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",o.RetroFont.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",o.RetroFont.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",o.RetroFont.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",o.RetroFont.prototype.setFixedWidth=function(t,e){void 0===e&&(e="left"),this.fixedWidth=t,this.align=e},o.RetroFont.prototype.setText=function(t,e,i,s,n,o){this.multiLine=e||!1,this.customSpacingX=i||0,this.customSpacingY=s||0,this.align=n||"left",this.autoUpperCase=!o,t.length>0&&(this.text=t)},o.RetroFont.prototype.buildRetroFontText=function(){var t=0,e=0;if(this.clear(),this.multiLine){var i=this._text.split("\n");this.fixedWidth>0?this.resize(this.fixedWidth,i.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0):this.resize(this.getLongestLine()*(this.characterWidth+this.customSpacingX),i.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0);for(var s=0;s0?this.resize(this.fixedWidth,this.characterHeight,!0):this.resize(this._text.length*(this.characterWidth+this.customSpacingX),this.characterHeight,!0),t=0,this.align===o.RetroFont.ALIGN_RIGHT?t=this.width-this._text.length*(this.characterWidth+this.customSpacingX):this.align===o.RetroFont.ALIGN_CENTER&&(t=this.width/2-this._text.length*(this.characterWidth+this.customSpacingX)/2,t+=this.customSpacingX/2),t<0&&(t=0),this.pasteLine(this._text,t,0,this.customSpacingX);this.requiresReTint=!0},o.RetroFont.prototype.pasteLine=function(t,e,i,s){for(var n=0;n=0&&(this.stamp.frame=this.grabData[t.charCodeAt(n)],this.renderXY(this.stamp,e,i,!1),(e+=this.characterWidth+s)>this.width))break},o.RetroFont.prototype.getLongestLine=function(){var t=0;if(this._text.length>0)for(var e=this._text.split("\n"),i=0;it&&(t=e[i].length);return t},o.RetroFont.prototype.removeUnsupportedCharacters=function(t){for(var e="",i=0;i=0||!t&&"\n"===s)&&(e=e.concat(s))}return e},o.RetroFont.prototype.updateOffset=function(t,e){if(this.offsetX!==t||this.offsetY!==e){for(var i=t-this.offsetX,s=e-this.offsetY,n=this.game.cache.getFrameData(this.stamp.key).getFrames(),o=n.length;o--;)n[o].x+=i,n[o].y+=s;this.buildRetroFontText()}},Object.defineProperty(o.RetroFont.prototype,"text",{get:function(){return this._text},set:function(t){var e;(e=this.autoUpperCase?t.toUpperCase():t)!==this._text&&(this._text=e,this.removeUnsupportedCharacters(this.multiLine),this.buildRetroFontText())}}),Object.defineProperty(o.RetroFont.prototype,"smoothed",{get:function(){return this.stamp.smoothed},set:function(t){this.stamp.smoothed=t,this.buildRetroFontText()}}),/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd, Richard Davey -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Rope=function(t,e,i,s,n,a){this.points=[],this.points=a,this._hasUpdateAnimation=!1,this._updateAnimationCallback=null,e=e||0,i=i||0,s=s||null,n=n||null,this.type=o.ROPE,PIXI.Rope.call(this,o.Cache.DEFAULT,this.points),o.Component.Core.init.call(this,t,e,i,s,n)},o.Rope.prototype=Object.create(PIXI.Rope.prototype),o.Rope.prototype.constructor=o.Rope,o.Component.Core.install.call(o.Rope.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),o.Rope.prototype.preUpdatePhysics=o.Component.PhysicsBody.preUpdate,o.Rope.prototype.preUpdateLifeSpan=o.Component.LifeSpan.preUpdate,o.Rope.prototype.preUpdateInWorld=o.Component.InWorld.preUpdate,o.Rope.prototype.preUpdateCore=o.Component.Core.preUpdate,o.Rope.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},o.Rope.prototype.update=function(){this._hasUpdateAnimation&&this.updateAnimation.call(this)},o.Rope.prototype.reset=function(t,e){return o.Component.Reset.prototype.reset.call(this,t,e),this},Object.defineProperty(o.Rope.prototype,"updateAnimation",{get:function(){return this._updateAnimation},set:function(t){t&&"function"==typeof t?(this._hasUpdateAnimation=!0,this._updateAnimation=t):(this._hasUpdateAnimation=!1,this._updateAnimation=null)}}),Object.defineProperty(o.Rope.prototype,"segments",{get:function(){for(var t=[],e,i,s,n,a,r,h,l,c=0;c -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.TileSprite=function(t,e,i,s,n,a,r){e=e||0,i=i||0,s=s||256,n=n||256,a=a||null,r=r||null,this.type=o.TILESPRITE,this.physicsType=o.SPRITE,this._scroll=new o.Point;var h=t.cache.getImage("__default",!0);PIXI.TilingSprite.call(this,new PIXI.Texture(h.base),s,n),o.Component.Core.init.call(this,t,e,i,a,r)},o.TileSprite.prototype=Object.create(PIXI.TilingSprite.prototype),o.TileSprite.prototype.constructor=o.TileSprite,o.Component.Core.install.call(o.TileSprite.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Destroy","FixedToCamera","Health","InCamera","InputEnabled","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","Smoothed"]),o.TileSprite.prototype.preUpdatePhysics=o.Component.PhysicsBody.preUpdate,o.TileSprite.prototype.preUpdateLifeSpan=o.Component.LifeSpan.preUpdate,o.TileSprite.prototype.preUpdateInWorld=o.Component.InWorld.preUpdate,o.TileSprite.prototype.preUpdateCore=o.Component.Core.preUpdate,o.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()},o.TileSprite.prototype.autoScroll=function(t,e){this._scroll.set(t,e)},o.TileSprite.prototype.stopScroll=function(){this._scroll.set(0,0)},o.TileSprite.prototype.destroy=function(t){o.Component.Destroy.prototype.destroy.call(this,t),PIXI.TilingSprite.prototype.destroy.call(this)},o.TileSprite.prototype.reset=function(t,e){return o.Component.Reset.prototype.reset.call(this,t,e),this.tilePosition.x=0,this.tilePosition.y=0,this},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.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},o.Device=new o.Device,o.Device.onInitialized=new o.Signal,o.Device.whenReady=function(t,e,i){var s=this._readyCheck;if(this.deviceReadyAt||!s)t.call(e,this);else if(s._monitor||i)s._queue=s._queue||[],s._queue.push([t,e]);else{s._monitor=s.bind(this),s._queue=s._queue||[],s._queue.push([t,e]);var n=void 0!==window.cordova,o=navigator.isCocoonJS;"complete"===document.readyState||"interactive"===document.readyState?window.setTimeout(s._monitor,0):n&&!o?document.addEventListener("deviceready",s._monitor,!1):(document.addEventListener("DOMContentLoaded",s._monitor,!1),window.addEventListener("load",s._monitor,!1))}},o.Device._readyCheck=function(){var t=this._readyCheck;if(document.body){if(!this.deviceReadyAt){this.deviceReadyAt=Date.now(),document.removeEventListener("deviceready",t._monitor),document.removeEventListener("DOMContentLoaded",t._monitor),window.removeEventListener("load",t._monitor),this._initialize(),this.initialized=!0,this.onInitialized.dispatch(this);for(var e;e=t._queue.shift();){var i=e[0],s=e[1];i.call(s,this)}this._readyCheck=null,this._initialize=null,this.onInitialized=null}}else window.setTimeout(t._monitor,20)},o.Device._initialize=function(){function t(){var t=navigator.userAgent;/Playstation Vita/.test(t)?d.vita=!0:/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?d.kindle=!0:/Android/.test(t)?d.android=!0:/CrOS/.test(t)?d.chromeOS=!0:/iP[ao]d|iPhone/i.test(t)?(d.iOS=!0,navigator.appVersion.match(/OS (\d+)/),d.iOSVersion=parseInt(RegExp.$1,10)):/Linux/.test(t)?d.linux=!0:/Mac OS/.test(t)?d.macOS=!0:/Windows/.test(t)&&(d.windows=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(d.android=!1,d.iOS=!1,d.macOS=!1,d.windows=!0,d.windowsPhone=!0);var e=/Silk/.test(t);(d.windows||d.macOS||d.linux&&!e||d.chromeOS)&&(d.desktop=!0),(d.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(d.desktop=!1)}function e(){d.canvas=!!window.CanvasRenderingContext2D||d.cocoonJS;try{d.localStorage=!!localStorage.getItem}catch(t){d.localStorage=!1}d.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),d.fileSystem=!!window.requestFileSystem;var t={stencil:!0};d.webGL=function(){try{var e=document.createElement("canvas");return e.screencanvas=!1,!!window.WebGLRenderingContext&&(e.getContext("webgl",t)||e.getContext("experimental-webgl",t))}catch(t){return!1}}(),d.webGL=!!d.webGL,d.worker=!!window.Worker,d.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,d.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,d.getUserMedia=d.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,d.firefox&&d.firefoxVersion<21&&(d.getUserMedia=!1),!d.iOS&&(d.ie||d.firefox||d.chrome)&&(d.canvasBitBltShift=!0),(d.safari||d.mobileSafari)&&(d.canvasBitBltShift=!1)}function s(){("ontouchstart"in document.documentElement||window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>=1)&&(d.touch=!0),(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&(d.mspointer=!0),d.cocoonJS||("onwheel"in window||d.ie&&"WheelEvent"in window?d.wheelEvent="wheel":"onmousewheel"in window?d.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(d.wheelEvent="DOMMouseScroll"))}function n(){for(var t=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],e=document.createElement("div"),i=0;i=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),s=parseInt(RegExp.$2,10);(10===i&&s>=11||i>10)&&(d.dolby=!0)}}catch(t){}}function h(){var t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t);return e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null}function l(){if(void 0===Uint8ClampedArray)return!1;var t=PIXI.CanvasPool.create(this,1,1),e=t.getContext("2d");if(!e)return!1;var i=e.createImageData(1,1);return PIXI.CanvasPool.remove(this),i.data instanceof Uint8ClampedArray}function c(){d.pixelRatio=window.devicePixelRatio||1,d.iPhone=-1!==navigator.userAgent.toLowerCase().indexOf("iphone"),d.iPhone4=2===d.pixelRatio&&d.iPhone,d.iPad=-1!==navigator.userAgent.toLowerCase().indexOf("ipad"),"undefined"!=typeof Int8Array?d.typedArray=!0:d.typedArray=!1,"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(d.littleEndian=h(),d.LITTLE_ENDIAN=d.littleEndian),d.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==d.littleEndian&&l(),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(d.vibration=!0)}function u(){var t=document.createElement("p"),e,i={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(t,null);for(var s in i)void 0!==t.style[s]&&(t.style[s]="translate3d(1px,1px,1px)",e=window.getComputedStyle(t).getPropertyValue(i[s]));document.body.removeChild(t),d.css3D=void 0!==e&&e.length>0&&"none"!==e}var d=this;t(),o(),r(),a(),u(),c(),e(),n(),s()},o.Device.canPlayAudio=function(t){return!("mp3"!==t||!this.mp3)||(!("ogg"!==t||!this.ogg&&!this.opus)||(!("m4a"!==t||!this.m4a)||(!("opus"!==t||!this.opus)||(!("wav"!==t||!this.wav)||(!("webm"!==t||!this.webm)||!("mp4"!==t||!this.dolby))))))},o.Device.canPlayVideo=function(t){return!("webm"!==t||!this.webmVideo&&!this.vp9Video)||(!("mp4"!==t||!this.mp4Video&&!this.h264Video)||(!("ogg"!==t&&"ogv"!==t||!this.oggVideo)||!("mpeg"!==t||!this.hlsVideo)))},o.Device.isConsoleOpen=function(){return!(!window.console||!window.console.firebug)||!(!window.console||(console.clear,!console.profiles))&&console.profiles.length>0},o.Device.isAndroidStockBrowser=function(){var t=window.navigator.userAgent.match(/Android.*AppleWebKit\/([\d.]+)/);return t&&t[1]<537},/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Canvas={create:function(t,e,i,s,n){e=e||256,i=i||256;var o=n?document.createElement("canvas"):PIXI.CanvasPool.create(t,e,i);return"string"==typeof s&&""!==s&&(o.id=s),o.width=e,o.height=i,o.style.display="block",o},setBackgroundColor:function(t,e){return e=e||"rgb(0,0,0)",t.style.backgroundColor=e,t},setTouchAction:function(t,e){return e=e||"none",t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t},setUserSelect:function(t,e){return e=e||"none",t.style["-webkit-touch-callout"]=e,t.style["-webkit-user-select"]=e,t.style["-khtml-user-select"]=e,t.style["-moz-user-select"]=e,t.style["-ms-user-select"]=e,t.style["user-select"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t},addToDOM:function(t,e,i){var s;return void 0===i&&(i=!0),e&&("string"==typeof e?s=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(s=e)),s||(s=document.body),i&&s.style&&(s.style.overflow="hidden"),s.appendChild(t),t},removeFromDOM:function(t){t.parentNode&&t.parentNode.removeChild(t)},setTransform:function(t,e,i,s,n,o,a){return t.setTransform(s,o,a,n,e,i),t},setSmoothingEnabled:function(t,e){var i=o.Canvas.getSmoothingPrefix(t);return i&&(t[i]=e),t},getSmoothingPrefix:function(t){var e=["i","webkitI","msI","mozI","oI"];for(var i in e){var s=e[i]+"mageSmoothingEnabled";if(s in t)return s}return null},getSmoothingEnabled:function(t){var e=o.Canvas.getSmoothingPrefix(t);if(e)return t[e]},setImageRenderingCrisp:function(t){for(var e=["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","pixelated"],i=0;i -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.RequestAnimationFrame=function(t,e){void 0===e&&(e=!1),this.game=t,this.isRunning=!1,this.forceSetTimeOut=e;for(var i=["ms","moz","webkit","o"],s=0;s -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -o.Math={PI2:2*Math.PI,between:function(t,e){return Math.floor(Math.random()*(e-t+1)+t)},fuzzyEqual:function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)e-i},fuzzyCeil:function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)},fuzzyFloor:function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)},average:function(){for(var t=0,e=arguments.length,i=0;i=o.Math.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e=0?t:t+2*Math.PI},maxAdd:function(t,e,i){return Math.min(t+e,i)},minSub:function(t,e,i){return Math.max(t-e,i)},wrap:function(t,e,i){var s=i-e;if(s<=0)return 0;var n=(t-e)%s;return n<0&&(n+=s),n+e},wrapValue:function(t,e,i){var s;return t=Math.abs(t),e=Math.abs(e),i=Math.abs(i),s=(t+e)%i},isOdd:function(t){return!!(1&t)},isEven:function(t){return!(1&t)},min:function(){if(1===arguments.length&&"object"==typeof arguments[0])var t=arguments[0];else var t=arguments;for(var e=1,i=0,s=t.length;et[i]&&(i=e);return t[i]},minProperty:function(t){if(2===arguments.length&&"object"==typeof arguments[1])var e=arguments[1];else var e=arguments.slice(1);for(var i=1,s=0,n=e.length;ie[s][t]&&(s=i);return e[s][t]},wrapAngle:function(t,e){return e?this.wrap(t,-Math.PI,Math.PI):this.wrap(t,-180,180)},linearInterpolation:function(t,e){var i=t.length-1,s=i*e,n=Math.floor(s);return e<0?this.linear(t[0],t[1],s):e>1?this.linear(t[i],t[i-1],i-s):this.linear(t[n],t[n+1>i?i:n+1],s-n)},bezierInterpolation:function(t,e){for(var i=0,s=t.length-1,n=0;n<=s;n++)i+=Math.pow(1-e,s-n)*Math.pow(e,n)*t[n]*this.bernstein(s,n);return i},catmullRomInterpolation:function(t,e){var i=t.length-1,s=i*e,n=Math.floor(s);return t[0]===t[i]?(e<0&&(n=Math.floor(s=i*(1+e))),this.catmullRom(t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i],s-n)):e<0?t[0]-(this.catmullRom(t[0],t[0],t[1],t[1],-s)-t[0]):e>1?t[i]-(this.catmullRom(t[i],t[i],t[i-1],t[i-1],s-i)-t[i]):this.catmullRom(t[n?n-1:0],t[n],t[i0?Math.ceil(t):Math.floor(t)},sinCosGenerator:function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1);for(var n=e,o=i,a=s*Math.PI/t,r=[],h=[],l=0;l0?1:0},percent:function(t,e,i){return void 0===i&&(i=0),t>e||i>e?1:tt?0:(t-i)/e}};var p=Math.PI/180,f=180/Math.PI;/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** - * @author Timo Hausmann - * @author Richard Davey - * @copyright 2016 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** - * @author Jeremy Dowell - * @author Richard Davey - * @copyright 2016 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Georgios Kaleadis https://github.com/georgiee -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author George https://github.com/georgiee -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -/** -* @author Richard Davey -* @copyright 2016 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -*/ -return o.Math.degToRad=function t(e){return e*p},o.Math.radToDeg=function t(e){return e*f},o.RandomDataGenerator=function(t){void 0===t&&(t=[]),this.c=1,this.s0=0,this.s1=0,this.s2=0,"string"==typeof t?this.state(t):this.sow(t)},o.RandomDataGenerator.prototype={rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e>>0,e-=s,e*=s,s=e>>>0,e-=s,s+=4294967296*e;return 2.3283064365386963e-10*(s>>>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(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return this.integerInRange(t,e)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){var t="",e="";for(e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick([-1,1])},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")}},o.RandomDataGenerator.prototype.constructor=o.RandomDataGenerator,o.QuadTree=function(t,e,i,s,n,o,a){this.maxObjects=10,this.maxLevels=4,this.level=0,this.bounds={},this.objects=[],this.nodes=[],this._empty=[],this.reset(t,e,i,s,n,o,a)},o.QuadTree.prototype={reset:function(t,e,i,s,n,o,a){this.maxObjects=n||10,this.maxLevels=o||4,this.level=a||0,this.bounds={x:Math.round(t),y:Math.round(e),width:i,height:s,subWidth:Math.floor(i/2),subHeight:Math.floor(s/2),right:Math.round(t)+Math.floor(i/2),bottom:Math.round(e)+Math.floor(s/2)},this.objects.length=0,this.nodes.length=0},populate:function(t){t.forEach(this.populateHandler,this,!0)},populateHandler:function(t){t.body&&t.exists&&this.insert(t.body)},split:function(){this.nodes[0]=new o.QuadTree(this.bounds.right,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[1]=new o.QuadTree(this.bounds.x,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[2]=new o.QuadTree(this.bounds.x,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[3]=new o.QuadTree(this.bounds.right,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1)},insert:function(t){var e=0,i;if(null!=this.nodes[0]&&-1!==(i=this.getIndex(t)))return void this.nodes[i].insert(t);if(this.objects.push(t),this.objects.length>this.maxObjects&&this.levelthis.bounds.bottom&&(e=2):t.x>this.bounds.right&&(t.ythis.bounds.bottom&&(e=3)),e},retrieve:function(t){if(t instanceof o.Rectangle)var e=this.objects,i=this.getIndex(t);else{if(!t.body)return this._empty;var e=this.objects,i=this.getIndex(t.body)}return this.nodes[0]&&(-1!==i?e=e.concat(this.nodes[i].retrieve(t)):(e=e.concat(this.nodes[0].retrieve(t)),e=e.concat(this.nodes[1].retrieve(t)),e=e.concat(this.nodes[2].retrieve(t)),e=e.concat(this.nodes[3].retrieve(t)))),e},clear:function(){this.objects.length=0;for(var t=this.nodes.length;t--;)this.nodes[t].clear(),this.nodes.splice(t,1);this.nodes.length=0}},o.QuadTree.prototype.constructor=o.QuadTree,o.Net=function(t){this.game=t},o.Net.prototype={getHostName:function(){return window.location&&window.location.hostname?window.location.hostname:null},checkDomainName:function(t){return-1!==window.location.hostname.indexOf(t)},updateQueryString:function(t,e,i,s){void 0===i&&(i=!1),void 0!==s&&""!==s||(s=window.location.href);var n="",o=new RegExp("([?|&])"+t+"=.*?(&|#|$)(.*)","gi");if(o.test(s))n=void 0!==e&&null!==e?s.replace(o,"$1"+t+"="+e+"$2$3"):s.replace(o,"$1$3").replace(/(&|\?)$/,"");else if(void 0!==e&&null!==e){var a=-1!==s.indexOf("?")?"&":"?",r=s.split("#");s=r[0]+a+t+"="+e,r[1]&&(s+="#"+r[1]),n=s}else n=s;if(!i)return n;window.location.href=n},getQueryString:function(t){void 0===t&&(t="");var e={},i=location.search.substring(1).split("&");for(var s in i){var n=i[s].split("=");if(n.length>1){if(t&&t===this.decodeURI(n[0]))return this.decodeURI(n[1]);e[this.decodeURI(n[0])]=this.decodeURI(n[1])}}return e},decodeURI:function(t){return decodeURIComponent(t.replace(/\+/g," "))}},o.Net.prototype.constructor=o.Net,o.TweenManager=function(t){this.game=t,this.frameBased=!1,this._tweens=[],this._add=[],this.easeMap={Power0:o.Easing.Power0,Power1:o.Easing.Power1,Power2:o.Easing.Power2,Power3:o.Easing.Power3,Power4:o.Easing.Power4,Linear:o.Easing.Linear.None,Quad:o.Easing.Quadratic.Out,Cubic:o.Easing.Cubic.Out,Quart:o.Easing.Quartic.Out,Quint:o.Easing.Quintic.Out,Sine:o.Easing.Sinusoidal.Out,Expo:o.Easing.Exponential.Out,Circ:o.Easing.Circular.Out,Elastic:o.Easing.Elastic.Out,Back:o.Easing.Back.Out,Bounce:o.Easing.Bounce.Out,"Quad.easeIn":o.Easing.Quadratic.In,"Cubic.easeIn":o.Easing.Cubic.In,"Quart.easeIn":o.Easing.Quartic.In,"Quint.easeIn":o.Easing.Quintic.In,"Sine.easeIn":o.Easing.Sinusoidal.In,"Expo.easeIn":o.Easing.Exponential.In,"Circ.easeIn":o.Easing.Circular.In,"Elastic.easeIn":o.Easing.Elastic.In,"Back.easeIn":o.Easing.Back.In,"Bounce.easeIn":o.Easing.Bounce.In,"Quad.easeOut":o.Easing.Quadratic.Out,"Cubic.easeOut":o.Easing.Cubic.Out,"Quart.easeOut":o.Easing.Quartic.Out,"Quint.easeOut":o.Easing.Quintic.Out,"Sine.easeOut":o.Easing.Sinusoidal.Out,"Expo.easeOut":o.Easing.Exponential.Out,"Circ.easeOut":o.Easing.Circular.Out,"Elastic.easeOut":o.Easing.Elastic.Out,"Back.easeOut":o.Easing.Back.Out,"Bounce.easeOut":o.Easing.Bounce.Out,"Quad.easeInOut":o.Easing.Quadratic.InOut,"Cubic.easeInOut":o.Easing.Cubic.InOut,"Quart.easeInOut":o.Easing.Quartic.InOut,"Quint.easeInOut":o.Easing.Quintic.InOut,"Sine.easeInOut":o.Easing.Sinusoidal.InOut,"Expo.easeInOut":o.Easing.Exponential.InOut,"Circ.easeInOut":o.Easing.Circular.InOut,"Elastic.easeInOut":o.Easing.Elastic.InOut,"Back.easeInOut":o.Easing.Back.InOut,"Bounce.easeInOut":o.Easing.Bounce.InOut},this.game.onPause.add(this._pauseAll,this),this.game.onResume.add(this._resumeAll,this)},o.TweenManager.prototype={getAll:function(){return this._tweens},removeAll:function(){for(var t=0;t0&&(this._tweens=this._tweens.concat(this._add),this._add.length=0),!0},isTweening:function(t){return this._tweens.some(function(e){return e.target===t})},_pauseAll:function(){for(var t=this._tweens.length-1;t>=0;t--)this._tweens[t]._pause()},_resumeAll:function(){for(var t=this._tweens.length-1;t>=0;t--)this._tweens[t]._resume()},pauseAll:function(){for(var t=this._tweens.length-1;t>=0;t--)this._tweens[t].pause()},resumeAll:function(){for(var t=this._tweens.length-1;t>=0;t--)this._tweens[t].resume(!0)}},o.TweenManager.prototype.constructor=o.TweenManager,o.Tween=function(t,e,i){this.game=e,this.target=t,this.manager=i,this.timeline=[],this.reverse=!1,this.timeScale=1,this.repeatCounter=0,this.pendingDelete=!1,this.onStart=new o.Signal,this.onLoop=new o.Signal,this.onRepeat=new o.Signal,this.onChildComplete=new o.Signal,this.onComplete=new o.Signal,this.isRunning=!1,this.current=0,this.properties={},this.chainedTween=null,this.isPaused=!1,this.frameBased=i.frameBased,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,this._pausedTime=0,this._codePaused=!1,this._hasStarted=!1},o.Tween.prototype={to:function(t,e,i,s,n,a,r){return(void 0===e||e<=0)&&(e=1e3),void 0!==i&&null!==i||(i=o.Easing.Default),void 0===s&&(s=!1),void 0===n&&(n=0),void 0===a&&(a=0),void 0===r&&(r=!1),"string"==typeof i&&this.manager.easeMap[i]&&(i=this.manager.easeMap[i]),this.isRunning?this:(this.timeline.push(new o.TweenData(this).to(t,e,i,n,a,r)),s&&this.start(),this)},from:function(t,e,i,s,n,a,r){return void 0===e&&(e=1e3),void 0!==i&&null!==i||(i=o.Easing.Default),void 0===s&&(s=!1),void 0===n&&(n=0),void 0===a&&(a=0),void 0===r&&(r=!1),"string"==typeof i&&this.manager.easeMap[i]&&(i=this.manager.easeMap[i]),this.isRunning?this:(this.timeline.push(new o.TweenData(this).from(t,e,i,n,a,r)),s&&this.start(),this)},start:function(t){if(void 0===t&&(t=0),null===this.game||null===this.target||0===this.timeline.length||this.isRunning)return this;for(var e=0;ethis.timeline.length-1)&&(t=0),this.current=t,this.timeline[this.current].start(),this},stop:function(t){return void 0===t&&(t=!1),this.isRunning=!1,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,t&&(this.onComplete.dispatch(this.target,this),this._hasStarted=!1,this.chainedTween&&this.chainedTween.start()),this.manager.remove(this),this},updateTweenData:function(t,e,i){if(0===this.timeline.length)return this;if(void 0===i&&(i=0),-1===i)for(var s=0;s0?arguments[t-1].chainedTween=arguments[t]:this.chainedTween=arguments[t];return this},loop:function(t){return void 0===t&&(t=!0),this.repeatCounter=t?-1:0,this},onUpdateCallback:function(t,e){return this._onUpdateCallback=t,this._onUpdateCallbackContext=e,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 t=0;t0?(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(t,e){if(null===this.game||null===this.target)return null;void 0===t&&(t=60),void 0===e&&(e=[]);for(var i=0;i0?this.isRunning=!1:this.isRunning=!0,this.isFrom)for(var t in this.vStartCache)this.vStart[t]=this.vEndCache[t],this.vEnd[t]=this.vStartCache[t],this.parent.target[t]=this.vStart[t];return this.value=0,this.yoyoCounter=0,this.repeatCounter=this.repeatTotal,this},loadValues:function(){for(var t in this.parent.properties){if(this.vStart[t]=this.parent.properties[t],Array.isArray(this.vEnd[t])){if(0===this.vEnd[t].length)continue;0===this.percent&&(this.vEnd[t]=[this.vStart[t]].concat(this.vEnd[t]))}void 0!==this.vEnd[t]?("string"==typeof this.vEnd[t]&&(this.vEnd[t]=this.vStart[t]+parseFloat(this.vEnd[t],10)),this.parent.properties[t]=this.vEnd[t]):this.vEnd[t]=this.vStart[t],this.vStartCache[t]=this.vStart[t],this.vEndCache[t]=this.vEnd[t]}return this},update:function(t){if(this.isRunning){if(t=this.startTime))return o.TweenData.PENDING;this.isRunning=!0}var e=this.parent.frameBased?this.game.time.physicsElapsedMS:this.game.time.elapsedMS;this.parent.reverse?(this.dt-=e*this.parent.timeScale,this.dt=Math.max(this.dt,0)):(this.dt+=e*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 i in this.vEnd){var s=this.vStart[i],n=this.vEnd[i];Array.isArray(n)?this.parent.target[i]=this.interpolationFunction.call(this.interpolationContext,n,this.value):this.parent.target[i]=s+(n-s)*this.value}return!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent?this.repeat():o.TweenData.RUNNING},generateData:function(t){this.parent.reverse?this.dt=this.duration:this.dt=0;var e=[],i=!1,s=1/t*1e3;do{this.parent.reverse?(this.dt-=s,this.dt=Math.max(this.dt,0)):(this.dt+=s,this.dt=Math.min(this.dt,this.duration)),this.percent=this.dt/this.duration,this.value=this.easingFunction(this.percent);var n={};for(var o in this.vEnd){var a=this.vStart[o],r=this.vEnd[o];Array.isArray(r)?n[o]=this.interpolationFunction(r,this.value):n[o]=a+(r-a)*this.value}e.push(n),(!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent)&&(i=!0)}while(!i);if(this.yoyo){var h=e.slice();h.reverse(),e=e.concat(h)}return e},repeat:function(){if(this.yoyo){if(this.inReverse&&0===this.repeatCounter){for(var t in this.vStartCache)this.vStart[t]=this.vStartCache[t],this.vEnd[t]=this.vEndCache[t];return this.inReverse=!1,o.TweenData.COMPLETE}this.inReverse=!this.inReverse}else if(0===this.repeatCounter)return o.TweenData.COMPLETE;if(this.inReverse)for(var t in this.vStartCache)this.vStart[t]=this.vEndCache[t],this.vEnd[t]=this.vStartCache[t];else{for(var t in this.vStartCache)this.vStart[t]=this.vStartCache[t],this.vEnd[t]=this.vEndCache[t];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,o.TweenData.LOOPED}},o.TweenData.prototype.constructor=o.TweenData,o.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)},Out:function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)},InOut:function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){var e,i=.1,s=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=s*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/s))},Out:function(t){var e,i=.1,s=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=s*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/s)+1)},InOut:function(t){var e,i=.1,s=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=s*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/s)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/s)*.5+1)}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-o.Easing.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*o.Easing.Bounce.In(2*t):.5*o.Easing.Bounce.Out(2*t-1)+.5}}},o.Easing.Default=o.Easing.Linear.None,o.Easing.Power0=o.Easing.Linear.None,o.Easing.Power1=o.Easing.Quadratic.Out,o.Easing.Power2=o.Easing.Cubic.Out,o.Easing.Power3=o.Easing.Quartic.Out,o.Easing.Power4=o.Easing.Quintic.Out,o.Time=function(t){this.game=t,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 o.Timer(this.game,!1),this._frameCount=0,this._elapsedAccumulator=0,this._started=0,this._timeLastSecond=0,this._pauseStarted=0,this._justResumed=!1,this._timers=[]},o.Time.prototype={boot:function(){this._started=Date.now(),this.time=Date.now(),this.events.start(),this.timeExpected=this.time},add:function(t){return this._timers.push(t),t},create:function(t){void 0===t&&(t=!0);var e=new o.Timer(this.game,t);return this._timers.push(e),e},removeAll:function(){for(var t=0;t=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 t=this._timers.length;t--;)this._timers[t]._pause()},gameResumed:function(){this.time=Date.now(),this.pauseDuration=this.time-this._pauseStarted,this.events.resume();for(var t=this._timers.length;t--;)this._timers[t]._resume()},totalElapsedSeconds:function(){return.001*(this.time-this._started)},elapsedSince:function(t){return this.time-t},elapsedSecondsSince:function(t){return.001*(this.time-t)},reset:function(){this._started=this.time,this.removeAll()}},Object.defineProperty(o.Time.prototype,"desiredFps",{get:function(){return this._desiredFps},set:function(t){this._desiredFps=t,this.physicsElapsed=1/t,this.physicsElapsedMS=1e3*this.physicsElapsed,this.desiredFpsMult=1/t}}),o.Time.prototype.constructor=o.Time,o.Timer=function(t,e){void 0===e&&(e=!0),this.game=t,this.running=!1,this.autoDestroy=e,this.expired=!1,this.elapsed=0,this.events=[],this.onComplete=new o.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},o.Timer.MINUTE=6e4,o.Timer.SECOND=1e3,o.Timer.HALF=500,o.Timer.QUARTER=250,o.Timer.prototype={create:function(t,e,i,s,n,a){t=Math.round(t);var r=t;0===this._now?r+=this.game.time.time:r+=this._now;var h=new o.TimerEvent(this,t,r,i,e,s,n,a);return this.events.push(h),this.order(),this.expired=!1,h},add:function(t,e,i){return this.create(t,!1,0,e,i,Array.prototype.slice.call(arguments,3))},repeat:function(t,e,i,s){return this.create(t,!1,e,i,s,Array.prototype.slice.call(arguments,4))},loop:function(t,e,i){return this.create(t,!0,0,e,i,Array.prototype.slice.call(arguments,3))},start:function(t){if(!this.running){this._started=this.game.time.time+(t||0),this.running=!0;for(var e=0;e0&&(this.events.sort(this.sortHandler),this.nextTick=this.events[0].tick)},sortHandler:function(t,e){return t.ticke.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(t){if(this.paused)return!0;if(this.elapsed=t-this._now,this._now=t,this.elapsed>this.timeCap&&this.adjustEvents(t-this.elapsed),this._marked=0,this.clearPendingEvents(),this.running&&this._now>=this.nextTick&&this._len>0){for(;this._i=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),!0===this.events[this._i].loop?(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(t){for(var e=0;ethis._now?this.nextTick-this._now:0}}),Object.defineProperty(o.Timer.prototype,"length",{get:function(){return this.events.length}}),Object.defineProperty(o.Timer.prototype,"ms",{get:function(){return this.running?this._now-this._started-this._pauseTotal:0}}),Object.defineProperty(o.Timer.prototype,"seconds",{get:function(){return this.running?.001*this.ms:0}}),o.Timer.prototype.constructor=o.Timer,o.TimerEvent=function(t,e,i,s,n,o,a,r){this.timer=t,this.delay=e,this.tick=i,this.repeatCount=s-1,this.loop=n,this.callback=o,this.callbackContext=a,this.args=r,this.pendingDelete=!1},o.TimerEvent.prototype.constructor=o.TimerEvent,o.AnimationManager=function(t){this.sprite=t,this.game=t.game,this.currentFrame=null,this.currentAnim=null,this.updateIfVisible=!0,this.isLoaded=!1,this._frameData=null,this._anims={},this._outputFrames=[]},o.AnimationManager.prototype={loadFrameData:function(t,e){if(void 0===t)return!1;if(this.isLoaded)for(var i in this._anims)this._anims[i].updateFrameData(t);return this._frameData=t,void 0===e||null===e?this.frame=0:"string"==typeof e?this.frameName=e:this.frame=e,this.isLoaded=!0,!0},copyFrameData:function(t,e){if(this._frameData=t.clone(),this.isLoaded)for(var i in this._anims)this._anims[i].updateFrameData(this._frameData);return void 0===e||null===e?this.frame=0:"string"==typeof e?this.frameName=e:this.frame=e,this.isLoaded=!0,!0},add:function(t,e,i,s,n){return e=e||[],i=i||60,void 0===s&&(s=!1),void 0===n&&(n=!(!e||"number"!=typeof e[0])),this._outputFrames=[],this._frameData.getFrameIndexes(e,n,this._outputFrames),this._anims[t]=new o.Animation(this.game,this.sprite,t,this._frameData,this._outputFrames,i,s),this.currentAnim=this._anims[t],this.sprite.tilingTexture&&(this.sprite.refreshTexture=!0),this._anims[t]},validateFrames:function(t,e){void 0===e&&(e=!0);for(var i=0;ithis._frameData.total)return!1}else if(!1===this._frameData.checkFrameName(t[i]))return!1;return!0},play:function(t,e,i,s){if(this._anims[t])return this.currentAnim===this._anims[t]?!1===this.currentAnim.isPlaying?(this.currentAnim.paused=!1,this.currentAnim.play(e,i,s)):this.currentAnim:(this.currentAnim&&this.currentAnim.isPlaying&&this.currentAnim.stop(),this.currentAnim=this._anims[t],this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(e,i,s))},stop:function(t,e){void 0===e&&(e=!1),!this.currentAnim||"string"==typeof t&&t!==this.currentAnim.name||this.currentAnim.stop(e)},update:function(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))},next:function(t){this.currentAnim&&(this.currentAnim.next(t),this.currentFrame=this.currentAnim.currentFrame)},previous:function(t){this.currentAnim&&(this.currentAnim.previous(t),this.currentFrame=this.currentAnim.currentFrame)},getAnimation:function(t){return"string"==typeof t&&this._anims[t]?this._anims[t]:null},refreshFrame:function(){},destroy:function(){var t=null;for(var t in this._anims)this._anims.hasOwnProperty(t)&&this._anims[t].destroy();this._anims={},this._outputFrames=[],this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null,this.game=null}},o.AnimationManager.prototype.constructor=o.AnimationManager,Object.defineProperty(o.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}}),Object.defineProperty(o.AnimationManager.prototype,"frameTotal",{get:function(){return this._frameData.total}}),Object.defineProperty(o.AnimationManager.prototype,"paused",{get:function(){return this.currentAnim.isPaused},set:function(t){this.currentAnim.paused=t}}),Object.defineProperty(o.AnimationManager.prototype,"name",{get:function(){if(this.currentAnim)return this.currentAnim.name}}),Object.defineProperty(o.AnimationManager.prototype,"frame",{get:function(){if(this.currentFrame)return this.currentFrame.index},set:function(t){"number"==typeof t&&this._frameData&&null!==this._frameData.getFrame(t)&&(this.currentFrame=this._frameData.getFrame(t),this.currentFrame&&this.sprite.setFrame(this.currentFrame))}}),Object.defineProperty(o.AnimationManager.prototype,"frameName",{get:function(){if(this.currentFrame)return this.currentFrame.name},set:function(t){"string"==typeof t&&this._frameData&&null!==this._frameData.getFrameByName(t)&&(this.currentFrame=this._frameData.getFrameByName(t),this.currentFrame&&(this._frameIndex=this.currentFrame.index,this.sprite.setFrame(this.currentFrame)))}}),o.Animation=function(t,e,i,s,n,a,r){void 0===r&&(r=!1),this.game=t,this._parent=e,this._frameData=s,this.name=i,this._frames=[],this._frames=this._frames.concat(n),this.delay=1e3/a,this.loop=r,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 o.Signal,this.onUpdate=null,this.onComplete=new o.Signal,this.onLoop=new o.Signal,this.isReversed=!1,this.game.onPause.add(this.onPause,this),this.game.onResume.add(this.onResume,this)},o.Animation.prototype={play:function(t,e,i){return"number"==typeof t&&(this.delay=1e3/t),"boolean"==typeof e&&(this.loop=e),void 0!==i&&(this.killOnComplete=i),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(t,e){var i;if(void 0===e&&(e=!1),"string"==typeof t)for(var s=0;s=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(t,e){if(void 0===e&&(e=!1),!this._frameData)return!1;var i=this.currentFrame.index;return this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&(e||!e&&i!==this.currentFrame.index)&&this._parent.setFrame(this.currentFrame),!this.onUpdate||!t||(this.onUpdate.dispatch(this,this.currentFrame),!!this._frameData)},next:function(t){void 0===t&&(t=1);var e=this._frameIndex+t;e>=this._frames.length&&(this.loop?e%=this._frames.length:e=this._frames.length-1),e!==this._frameIndex&&(this._frameIndex=e,this.updateCurrentFrame(!0))},previous:function(t){void 0===t&&(t=1);var e=this._frameIndex-t;e<0&&(this.loop?e=this._frames.length+e:e++),e!==this._frameIndex&&(this._frameIndex=e,this.updateCurrentFrame(!0))},updateFrameData:function(t){this._frameData=t,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()}},o.Animation.prototype.constructor=o.Animation,Object.defineProperty(o.Animation.prototype,"paused",{get:function(){return this.isPaused},set:function(t){this.isPaused=t,t?this._pauseStartTime=this.game.time.time:this.isPlaying&&(this._timeNextFrame=this.game.time.time+this.delay)}}),Object.defineProperty(o.Animation.prototype,"reversed",{get:function(){return this.isReversed},set:function(t){this.isReversed=t}}),Object.defineProperty(o.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}}),Object.defineProperty(o.Animation.prototype,"frame",{get:function(){return null!==this.currentFrame?this.currentFrame.index:this._frameIndex},set:function(t){this.currentFrame=this._frameData.getFrame(this._frames[t]),null!==this.currentFrame&&(this._frameIndex=t,this._parent.setFrame(this.currentFrame),this.onUpdate&&this.onUpdate.dispatch(this,this.currentFrame))}}),Object.defineProperty(o.Animation.prototype,"speed",{get:function(){return 1e3/this.delay},set:function(t){t>0&&(this.delay=1e3/t)}}),Object.defineProperty(o.Animation.prototype,"enableUpdate",{get:function(){return null!==this.onUpdate},set:function(t){t&&null===this.onUpdate?this.onUpdate=new o.Signal:t||null===this.onUpdate||(this.onUpdate.dispose(),this.onUpdate=null)}}),o.Animation.generateFrameNames=function(t,e,i,s,n){void 0===s&&(s="");var a=[],r="";if(e=i;h--)r="number"==typeof n?o.Utils.pad(h.toString(),n,"0",1):h.toString(),r=t+r+s,a.push(r);return a},o.Frame=function(t,e,i,s,n,a){this.index=t,this.x=e,this.y=i,this.width=s,this.height=n,this.name=a,this.centerX=Math.floor(s/2),this.centerY=Math.floor(n/2),this.distance=o.Math.distance(0,0,s,n),this.rotated=!1,this.rotationDirection="cw",this.trimmed=!1,this.sourceSizeW=s,this.sourceSizeH=n,this.spriteSourceSizeX=0,this.spriteSourceSizeY=0,this.spriteSourceSizeW=0,this.spriteSourceSizeH=0,this.right=this.x+this.width,this.bottom=this.y+this.height},o.Frame.prototype={resize:function(t,e){this.width=t,this.height=e,this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2),this.distance=o.Math.distance(0,0,t,e),this.sourceSizeW=t,this.sourceSizeH=e,this.right=this.x+t,this.bottom=this.y+e},setTrim:function(t,e,i,s,n,o,a){this.trimmed=t,t&&(this.sourceSizeW=e,this.sourceSizeH=i,this.centerX=Math.floor(e/2),this.centerY=Math.floor(i/2),this.spriteSourceSizeX=s,this.spriteSourceSizeY=n,this.spriteSourceSizeW=o,this.spriteSourceSizeH=a)},clone:function(){var t=new o.Frame(this.index,this.x,this.y,this.width,this.height,this.name);for(var e in this)this.hasOwnProperty(e)&&(t[e]=this[e]);return t},getRect:function(t){return void 0===t?t=new o.Rectangle(this.x,this.y,this.width,this.height):t.setTo(this.x,this.y,this.width,this.height),t}},o.Frame.prototype.constructor=o.Frame,o.FrameData=function(){this._frames=[],this._frameNames=[]},o.FrameData.prototype={addFrame:function(t){return t.index=this._frames.length,this._frames.push(t),""!==t.name&&(this._frameNames[t.name]=t.index),t},getFrame:function(t){return t>=this._frames.length&&(t=0),this._frames[t]},getFrameByName:function(t){return"number"==typeof this._frameNames[t]?this._frames[this._frameNames[t]]:null},checkFrameName:function(t){return null!=this._frameNames[t]},clone:function(){for(var t=new o.FrameData,e=0;el&&(y=a,g+=s+r);return f},JSONData:function(t,e){if(e.frames){for(var i=new o.FrameData,s=e.frames,n,a=0;a-1},getAssetIndex:function(t,e){for(var i=-1,s=0;s-1&&{index:i,file:this._fileList[i]}},reset:function(t,e){void 0===e&&(e=!1),this.resetLocked||(t&&(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,e&&(this.onLoadStart.removeAll(),this.onLoadComplete.removeAll(),this.onPackComplete.removeAll(),this.onFileStart.removeAll(),this.onFileComplete.removeAll(),this.onFileError.removeAll()))},addToFileList:function(t,e,i,s,n,o){if(void 0===n&&(n=!1),void 0===e||""===e)return this;if(void 0===i||null===i){if(!o)return this;i=e+o}var a={type:t,key:e,path:this.path,url:i,syncPoint:this._withSyncPointDepth>0,data:null,loading:!1,loaded:!1,error:!1};if(s)for(var r in s)a[r]=s[r];var h=this.getAssetIndex(t,e);if(n&&h>-1){var l=this._fileList[h];l.loading||l.loaded?(this._fileList.push(a),this._totalFileCount++):this._fileList[h]=a}else-1===h&&(this._fileList.push(a),this._totalFileCount++);return this},replaceInFileList:function(t,e,i,s){return this.addToFileList(t,e,i,s,!0)},pack:function(t,e,i,s){if(void 0===e&&(e=null),void 0===i&&(i=null),void 0===s&&(s=null),!e&&!i)return this;var n={type:"packfile",key:t,url:e,path:this.path,syncPoint:!0,data:null,loading:!1,loaded:!1,error:!1,callbackContext:s};i&&("string"==typeof i&&(i=JSON.parse(i)),n.data=i||{},n.loaded=!0);for(var o=0;o=s||i&&this._loadedPackCount===this._totalPackCount)break}if(this.updateProgress(),this._processingHead>=this._fileList.length)this.finishedLoading();else if(!this._flightQueue.length){var n=this;setTimeout(function(){n.finishedLoading(!0)},2e3)}},finishedLoading:function(t){this.hasLoaded||(this.hasLoaded=!0,this.isLoading=!1,t||this._fileLoadStarted||(this._fileLoadStarted=!0,this.onLoadStart.dispatch()),this.onLoadComplete.dispatch(),this.game.state.loadComplete(),this.reset())},asyncComplete:function(t,e){void 0===e&&(e=""),t.loaded=!0,t.error=!!e,e&&(t.errorMessage=e),this.processLoadQueue()},processPack:function(t){var e=t.data[t.key];if(e)for(var i=0;i=400&&o.status<=599?n.call(a,t,o):s.call(a,t,o)}catch(e){a.hasLoaded?window.console:a.asyncComplete(t,e.message||"Exception")}},o.onerror=function(){try{return n.call(a,t,o)}catch(e){a.hasLoaded?window.console:a.asyncComplete(t,e.message||"Exception")}},t.requestObject=o,t.requestUrl=e,o.send()},xhrLoadWithXDR:function(t,e,i,s,n){this._warnedAboutXDomainRequest||this.game.device.ie&&!(this.game.device.ieVersion>=10)||(this._warnedAboutXDomainRequest=!0);var o=new window.XDomainRequest;o.open("GET",e,!0),o.responseType=i,o.timeout=3e3,n=n||this.fileError;var a=this;o.onerror=function(){try{return n.call(a,t,o)}catch(e){a.asyncComplete(t,e.message||"Exception")}},o.ontimeout=function(){try{return n.call(a,t,o)}catch(e){a.asyncComplete(t,e.message||"Exception")}},o.onprogress=function(){},o.onload=function(){try{return 4===o.readyState&&o.status>=400&&o.status<=599?n.call(a,t,o):s.call(a,t,o)}catch(e){a.asyncComplete(t,e.message||"Exception")}},t.requestObject=o,t.requestUrl=e,setTimeout(function(){o.send()},0)},getVideoURL:function(t){for(var e=0;e=0&&(i=i.substr(0,i.indexOf("?")));if(s=i.substr((Math.max(0,i.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayVideo(s))return t[e]}}return null},getAudioURL:function(t){if(this.game.sound.noAudio)return null;for(var e=0;e=0&&(i=i.substr(0,i.indexOf("?")));if(s=i.substr((Math.max(0,i.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayAudio(s))return t[e]}}return null},fileError:function(t,e,i){var s=t.requestUrl||this.transformUrl(t.url,t),n="error loading asset from URL "+s;!i&&e&&(i=e.status),i&&(n=n+" ("+i+")"),this.asyncComplete(t,n)},fileComplete:function(t,e){var i=!0;switch(t.type){case"packfile":var s=JSON.parse(e.responseText);t.data=s||{};break;case"image":this.cache.addImage(t.key,t.url,t.data);break;case"spritesheet":this.cache.addSpriteSheet(t.key,t.url,t.data,t.frameWidth,t.frameHeight,t.frameMax,t.margin,t.spacing);break;case"textureatlas":if(null==t.atlasURL)this.cache.addTextureAtlas(t.key,t.url,t.data,t.atlasData,t.format);else if(i=!1,t.format===o.Loader.TEXTURE_ATLAS_JSON_ARRAY||t.format===o.Loader.TEXTURE_ATLAS_JSON_HASH||t.format===o.Loader.TEXTURE_ATLAS_JSON_PYXEL)this.xhrLoad(t,this.transformUrl(t.atlasURL,t),"text",this.jsonLoadComplete);else{if(t.format!==o.Loader.TEXTURE_ATLAS_XML_STARLING)throw new Error("Phaser.Loader. Invalid Texture Atlas format: "+t.format);this.xhrLoad(t,this.transformUrl(t.atlasURL,t),"text",this.xmlLoadComplete)}break;case"bitmapfont":t.atlasURL?(i=!1,this.xhrLoad(t,this.transformUrl(t.atlasURL,t),"text",function(t,e){var i;try{i=JSON.parse(e.responseText)}catch(t){}i?(t.atlasType="json",this.jsonLoadComplete(t,e)):(t.atlasType="xml",this.xmlLoadComplete(t,e))})):this.cache.addBitmapFont(t.key,t.url,t.data,t.atlasData,t.atlasType,t.xSpacing,t.ySpacing);break;case"video":if(t.asBlob)try{t.data=e.response}catch(e){throw new Error("Phaser.Loader. Unable to parse video file as Blob: "+t.key)}this.cache.addVideo(t.key,t.url,t.data,t.asBlob);break;case"audio":this.game.sound.usingWebAudio?(t.data=e.response,this.cache.addSound(t.key,t.url,t.data,!0,!1),t.autoDecode&&this.game.sound.decode(t.key)):this.cache.addSound(t.key,t.url,t.data,!1,!0);break;case"text":t.data=e.responseText,this.cache.addText(t.key,t.url,t.data);break;case"shader":t.data=e.responseText,this.cache.addShader(t.key,t.url,t.data);break;case"physics":var s=JSON.parse(e.responseText);this.cache.addPhysicsData(t.key,t.url,s,t.format);break;case"script":t.data=document.createElement("script"),t.data.language="javascript",t.data.type="text/javascript",t.data.defer=!1,t.data.text=e.responseText,document.head.appendChild(t.data),t.callback&&(t.data=t.callback.call(t.callbackContext,t.key,e.responseText));break;case"binary":t.callback?t.data=t.callback.call(t.callbackContext,t.key,e.response):t.data=e.response,this.cache.addBinary(t.key,t.data)}i&&this.asyncComplete(t)},jsonLoadComplete:function(t,e){var i=JSON.parse(e.responseText);"tilemap"===t.type?this.cache.addTilemap(t.key,t.url,i,t.format):"bitmapfont"===t.type?this.cache.addBitmapFont(t.key,t.url,t.data,i,t.atlasType,t.xSpacing,t.ySpacing):"json"===t.type?this.cache.addJSON(t.key,t.url,i):this.cache.addTextureAtlas(t.key,t.url,t.data,i,t.format),this.asyncComplete(t)},csvLoadComplete:function(t,e){var i=e.responseText;this.cache.addTilemap(t.key,t.url,i,t.format),this.asyncComplete(t)},xmlLoadComplete:function(t,e){var i=e.responseText,s=this.parseXml(i);if(!s){var n=e.responseType||e.contentType;return void this.asyncComplete(t,"invalid XML")}"bitmapfont"===t.type?this.cache.addBitmapFont(t.key,t.url,t.data,s,t.atlasType,t.xSpacing,t.ySpacing):"textureatlas"===t.type?this.cache.addTextureAtlas(t.key,t.url,t.data,s,t.format):"xml"===t.type&&this.cache.addXML(t.key,t.url,s),this.asyncComplete(t)},parseXml:function(t){var e;try{if(window.DOMParser){var i=new DOMParser;e=i.parseFromString(t,"text/xml")}else e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e: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(o.Loader.prototype,"progressFloat",{get:function(){var t=this._loadedFileCount/this._totalFileCount*100;return o.Math.clamp(t||0,0,100)}}),Object.defineProperty(o.Loader.prototype,"progress",{get:function(){return Math.round(this.progressFloat)}}),o.Loader.prototype.constructor=o.Loader,o.LoaderParser={bitmapFont:function(t,e,i,s){return this.xmlBitmapFont(t,e,i,s)},xmlBitmapFont:function(t,e,i,s){var n={},o=t.getElementsByTagName("info")[0],a=t.getElementsByTagName("common")[0];n.font=o.getAttribute("face"),n.size=parseInt(o.getAttribute("size"),10),n.lineHeight=parseInt(a.getAttribute("lineHeight"),10)+s,n.chars={};for(var r=t.getElementsByTagName("char"),h=0;h=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()))},loopFull:function(t){return this.play(null,0,t,!0)},play:function(t,e,i,s,n){if(void 0!==t&&!1!==t&&null!==t||(t=""),void 0===n&&(n=!0),this.isPlaying&&!this.allowMultiple&&!n&&!this.override)return this;if(this._sound&&this.isPlaying&&!this.allowMultiple&&(this.override||n)){if(this.usingWebAudio){if(void 0===this._sound.stop)this._sound.noteOff(0);else try{this._sound.stop(0)}catch(t){}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(""===t&&Object.keys(this.markers).length>0)return this;if(""!==t){if(!this.markers[t])return this;this.currentMarker=t,this.position=this.markers[t].start,this.volume=this.markers[t].volume,this.loop=this.markers[t].loop,this.duration=this.markers[t].duration,this.durationMS=this.markers[t].durationMS,void 0!==i&&(this.volume=i),void 0!==s&&(this.loop=s),this._tempMarker=t,this._tempPosition=this.position,this._tempVolume=this.volume,this._tempLoop=this.loop}else e=e||0,void 0===i&&(i=this._volume),void 0===s&&(s=this.loop),this.position=Math.max(0,e),this.volume=i,this.loop=s,this.duration=0,this.durationMS=0,this._tempMarker=t,this._tempPosition=e,this._tempVolume=i,this._tempLoop=s;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&&""===t&&(this._sound.loop=!0),this.loop||""!==t||(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&&""===t?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)&&!1===this.game.cache.getSound(this.key).isDecoding&&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(t,e,i,s){t=t||"",e=e||0,i=i||1,void 0===s&&(s=!1),this.play(t,e,i,s,!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 t=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 e=this.duration-this.pausedPosition/1e3;void 0===this._sound.start?this._sound.noteGrainOn(0,t,e):this.loop&&this.game.device.chrome?42===this.game.device.chromeVersion?this._sound.start(0):this._sound.start(0,t):this._sound.start(0,t,e)}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(t){}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 t=this.currentMarker;""!==this.currentMarker&&this.onMarkerComplete.dispatch(this.currentMarker,this),this.currentMarker="",null!==this.fadeTween&&this.fadeTween.stop(),this.onStop.dispatch(this,t)}},fadeIn:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=this.currentMarker),this.paused||(this.play(i,0,0,e),this.fadeTo(t,1))},fadeOut:function(t){this.fadeTo(t,0)},fadeTo:function(t,e){this.isPlaying&&!this.paused&&e!==this.volume&&(void 0===t&&(t=1e3),void 0!==e&&(this.fadeTween=this.game.add.tween(this).to({volume:e},t,o.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(t){this.usingAudioTag&&this._sound&&(this._sound.volume=t*this._volume)},destroy:function(t){void 0===t&&(t=!0),this.stop(),t?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())}},o.Sound.prototype.constructor=o.Sound,Object.defineProperty(o.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}}),Object.defineProperty(o.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}}),Object.defineProperty(o.Sound.prototype,"mute",{get:function(){return this._muted||this.game.sound.mute},set:function(t){(t=t||!1)!==this._muted&&(t?(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(o.Sound.prototype,"volume",{get:function(){return this._volume},set:function(t){if(this.game.device.firefox&&this.usingAudioTag&&(t=this.game.math.clamp(t,0,1)),this._muted)return void(this._muteVolume=t);this._tempVolume=t,this._volume=t,this.usingWebAudio?this.gainNode.gain.value=t:this.usingAudioTag&&this._sound&&(this._sound.volume=t)}}),o.SoundManager=function(t){this.game=t,this.onSoundDecode=new o.Signal,this.onVolumeChange=new o.Signal,this.onMute=new o.Signal,this.onUnMute=new o.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 o.ArraySet,this._watching=!1,this._watchCallback=null,this._watchContext=null},o.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&!1===this.game.device.webAudio&&(this.channels=1),window.PhaserGlobal){if(!0===window.PhaserGlobal.disableAudio)return this.noAudio=!0,void(this.touchLocked=!1);if(!0===window.PhaserGlobal.disableWebAudio)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(t){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}else if(window.webkitAudioContext)try{this.context=new window.webkitAudioContext}catch(t){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.android||this.game.device.iOS||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock)&&this.setTouchLock()},setTouchLock:function(){this.noAudio||window.PhaserGlobal&&!0===window.PhaserGlobal.disableAudio||(this.game.device.iOSVersion>8||this.game.device.chromeVersion>=55?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 t=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=t,this._unlockSource.connect(this.context.destination),void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),"suspended"===this._unlockSource.context.state&&this._unlockSource.context.resume()}return!0},stopAll:function(){if(!this.noAudio)for(var t=0;t1&&(t=1),this._volume!==t){if(this._volume=t,this.usingWebAudio)this.masterGain.gain.value=t;else for(var e=0;e=400?0:100,this.dom.getOffset(this.game.canvas,this.offset);var e=this._parentBounds.width,i=this._parentBounds.height,s=this.getParentBounds(this._parentBounds),n=s.width!==e||s.height!==i,a=this.updateOrientationState();(n||a)&&(this.onResize&&this.onResize.call(this.onResizeContext,this,s),this.updateLayout(),this.signalSizeChange());var r=2*this._updateThrottle;this._updateThrottlee;return h=h?s:!s,h?(t.width=Math.floor(n),t.height=Math.floor(o)):(t.width=Math.floor(a),t.height=Math.floor(r)),t},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))}},o.ScaleManager.prototype.constructor=o.ScaleManager,Object.defineProperty(o.ScaleManager.prototype,"boundingParent",{get:function(){return this.parentIsWindow||this.isFullScreen&&this.hasPhaserSetFullScreen&&!this._createdFullScreenTarget?null:this.game.canvas&&this.game.canvas.parentNode||null}}),Object.defineProperty(o.ScaleManager.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(t){return t!==this._scaleMode&&(this.isFullScreen||(this.updateDimensions(this._gameSize.width,this._gameSize.height,!0),this.queueUpdate(!0)),this._scaleMode=t),this._scaleMode}}),Object.defineProperty(o.ScaleManager.prototype,"fullScreenScaleMode",{get:function(){return this._fullScreenScaleMode},set:function(t){return t!==this._fullScreenScaleMode&&(this.isFullScreen?(this.prepScreenMode(!1),this._fullScreenScaleMode=t,this.prepScreenMode(!0),this.queueUpdate(!0)):this._fullScreenScaleMode=t),this._fullScreenScaleMode}}),Object.defineProperty(o.ScaleManager.prototype,"currentScaleMode",{get:function(){return this.isFullScreen?this._fullScreenScaleMode:this._scaleMode}}),Object.defineProperty(o.ScaleManager.prototype,"pageAlignHorizontally",{get:function(){return this._pageAlignHorizontally},set:function(t){t!==this._pageAlignHorizontally&&(this._pageAlignHorizontally=t,this.queueUpdate(!0))}}),Object.defineProperty(o.ScaleManager.prototype,"pageAlignVertically",{get:function(){return this._pageAlignVertically},set:function(t){t!==this._pageAlignVertically&&(this._pageAlignVertically=t,this.queueUpdate(!0))}}),Object.defineProperty(o.ScaleManager.prototype,"isFullScreen",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),Object.defineProperty(o.ScaleManager.prototype,"isPortrait",{get:function(){return"portrait"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(o.ScaleManager.prototype,"isLandscape",{get:function(){return"landscape"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(o.ScaleManager.prototype,"isGamePortrait",{get:function(){return this.height>this.width}}),Object.defineProperty(o.ScaleManager.prototype,"isGameLandscape",{get:function(){return this.width>this.height}}),o.Utils.Debug=function(t){this.game=t,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},o.Utils.Debug.prototype={boot:function(){this.game.renderType===o.CANVAS?this.context=this.game.context:(this.bmd=new o.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(t,e,i){this.bmd.resize(e,i),this.canvas.width=e,this.canvas.height=i},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(t,e,i,s){"number"!=typeof t&&(t=0),"number"!=typeof e&&(e=0),i=i||"rgb(255,255,255)",void 0===s&&(s=0),this.currentX=t,this.currentY=e,this.currentColor=i,this.columnWidth=s,this.dirty=!0,this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.strokeStyle=i,this.context.fillStyle=i,this.context.font=this.font,this.context.globalAlpha=this.currentAlpha},stop:function(){this.context.restore()},line:function(){for(var t=this.currentX,e=0;e0)for(var e=0;e=0&&i.right>=0&&i.top<=this.layoutBounds.width&&i.left<=this.layoutBounds.height},getScreenOrientation:function(t){var e=window.screen,i=e.orientation||e.mozOrientation||e.msOrientation;if(i&&"string"==typeof i.type)return i.type;if("string"==typeof i)return i;var s="portrait-primary",n="landscape-primary";if("screen"===t)return e.height>e.width?s:n;if("viewport"===t)return this.visualBounds.height>this.visualBounds.width?s:n;if("window.orientation"===t&&"number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s:n;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s;if(window.matchMedia("(orientation: landscape)").matches)return n}return this.visualBounds.height>this.visualBounds.width?s:n},visualBounds:new o.Rectangle,layoutBounds:new o.Rectangle,documentBounds:new o.Rectangle},o.Device.whenReady(function(t){var e=window&&"pageXOffset"in window?function(){return window.pageXOffset}:function(){return document.documentElement.scrollLeft},i=window&&"pageYOffset"in window?function(){return window.pageYOffset}:function(){return document.documentElement.scrollTop};if(Object.defineProperty(o.DOM,"scrollX",{get:e}),Object.defineProperty(o.DOM,"scrollY",{get:i}),Object.defineProperty(o.DOM.visualBounds,"x",{get:e}),Object.defineProperty(o.DOM.visualBounds,"y",{get:i}),Object.defineProperty(o.DOM.layoutBounds,"x",{value:0}),Object.defineProperty(o.DOM.layoutBounds,"y",{value:0}),t.desktop&&document.documentElement.clientWidth<=window.innerWidth&&document.documentElement.clientHeight<=window.innerHeight){var s=function(){return Math.max(window.innerWidth,document.documentElement.clientWidth)},n=function(){return Math.max(window.innerHeight,document.documentElement.clientHeight)};Object.defineProperty(o.DOM.visualBounds,"width",{get:s}),Object.defineProperty(o.DOM.visualBounds,"height",{get:n}),Object.defineProperty(o.DOM.layoutBounds,"width",{get:s}),Object.defineProperty(o.DOM.layoutBounds,"height",{get:n})}else Object.defineProperty(o.DOM.visualBounds,"width",{get:function(){return window.innerWidth}}),Object.defineProperty(o.DOM.visualBounds,"height",{get:function(){return window.innerHeight}}),Object.defineProperty(o.DOM.layoutBounds,"width",{get:function(){var t=document.documentElement.clientWidth,e=window.innerWidth;return t-1},reset:function(){this.list.length=0},remove:function(t){var e=this.list.indexOf(t);if(e>-1)return this.list.splice(e,1),t},setAll:function(t,e){for(var i=this.list.length;i--;)this.list[i]&&(this.list[i][t]=e)},callAll:function(t){for(var e=Array.prototype.slice.call(arguments,1),i=this.list.length;i--;)this.list[i]&&this.list[i][t]&&this.list[i][t].apply(this.list[i],e)},removeAll:function(t){void 0===t&&(t=!1);for(var e=this.list.length;e--;)if(this.list[e]){var i=this.remove(this.list[e]);t&&i.destroy()}this.position=0,this.list=[]}},Object.defineProperty(o.ArraySet.prototype,"total",{get:function(){return this.list.length}}),Object.defineProperty(o.ArraySet.prototype,"first",{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}}),Object.defineProperty(o.ArraySet.prototype,"next",{get:function(){return this.position0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t},transposeMatrix:function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;o--)s[n][o]=t[o][n]}return s},rotateMatrix:function(t,e){if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)t=o.ArrayUtils.transposeMatrix(t),t=t.reverse();else if(-90===e||270===e||"rotateRight"===e)t=t.reverse(),t=o.ArrayUtils.transposeMatrix(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i>>0:(t<<24|e<<16|i<<8|s)>>>0},unpackPixel:function(t,e,i,s){return void 0!==e&&null!==e||(e=o.Color.createColor()),void 0!==i&&null!==i||(i=!1),void 0!==s&&null!==s||(s=!1),o.Device.LITTLE_ENDIAN?(e.a=(4278190080&t)>>>24,e.b=(16711680&t)>>>16,e.g=(65280&t)>>>8,e.r=255&t):(e.r=(4278190080&t)>>>24,e.g=(16711680&t)>>>16,e.b=(65280&t)>>>8,e.a=255&t),e.color=t,e.rgba="rgba("+e.r+","+e.g+","+e.b+","+e.a/255+")",i&&o.Color.RGBtoHSL(e.r,e.g,e.b,e),s&&o.Color.RGBtoHSV(e.r,e.g,e.b,e),e},fromRGBA:function(t,e){return e||(e=o.Color.createColor()),e.r=(4278190080&t)>>>24,e.g=(16711680&t)>>>16,e.b=(65280&t)>>>8,e.a=255&t,e.rgba="rgba("+e.r+","+e.g+","+e.b+","+e.a+")",e},toRGBA:function(t,e,i,s){return t<<24|e<<16|i<<8|s},toABGR:function(t,e,i,s){return(s<<24|i<<16|e<<8|t)>>>0},RGBtoHSL:function(t,e,i,s){s||(s=o.Color.createColor(t,e,i,1)),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),a=Math.max(t,e,i);if(s.h=0,s.s=0,s.l=(a+n)/2,a!==n){var r=a-n;s.s=s.l>.5?r/(2-a-n):r/(a+n),a===t?s.h=(e-i)/r+(e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},createColor:function(t,e,i,s,n,a,r,h){var l={r:t||0,g:e||0,b:i||0,a:s||1,h:n||0,s:a||0,l:r||0,v:h||0,color:0,color32:0,rgba:""};return o.Color.updateColor(l)},updateColor:function(t){return t.rgba="rgba("+t.r.toString()+","+t.g.toString()+","+t.b.toString()+","+t.a.toString()+")",t.color=o.Color.getColor(t.r,t.g,t.b),t.color32=o.Color.getColor32(255*t.a,t.r,t.g,t.b),t},getColor32:function(t,e,i,s){return t<<24|e<<16|i<<8|s},getColor:function(t,e,i){return t<<16|e<<8|i},RGBtoString:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n="#"),"#"===n?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+o.Color.componentToHex(s)+o.Color.componentToHex(t)+o.Color.componentToHex(e)+o.Color.componentToHex(i)},hexToRGB:function(t){var e=o.Color.hexToColor(t);if(e)return o.Color.getColor32(e.a,e.r,e.g,e.b)},hexToColor:function(t,e){t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,s){return e+e+i+i+s+s});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),n=parseInt(i[2],16),a=parseInt(i[3],16);e?(e.r=s,e.g=n,e.b=a):e=o.Color.createColor(s,n,a)}return e},webToColor:function(t,e){e||(e=o.Color.createColor());var i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t);return i&&(e.r=parseInt(i[1],10),e.g=parseInt(i[2],10),e.b=parseInt(i[3],10),e.a=void 0!==i[4]?parseFloat(i[4]):1,o.Color.updateColor(e)),e},valueToColor:function(t,e){if(e||(e=o.Color.createColor()),"string"==typeof t)return 0===t.indexOf("rgb")?o.Color.webToColor(t,e):(e.a=1,o.Color.hexToColor(t,e));if("number"==typeof t){var i=o.Color.getRGB(t);return e.r=i.r,e.g=i.g,e.b=i.b,e.a=i.a/255,e}return e},componentToHex:function(t){var e=t.toString(16);return 1===e.length?"0"+e:e},HSVColorWheel:function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(o.Color.HSVtoRGB(s/359,t,e));return i},HSLColorWheel:function(t,e){void 0===t&&(t=.5),void 0===e&&(e=.5);for(var i=[],s=0;s<=359;s++)i.push(o.Color.HSLtoRGB(s/359,t,e));return i},interpolateColor:function(t,e,i,s,n){void 0===n&&(n=255);var a=o.Color.getRGB(t),r=o.Color.getRGB(e),h=(r.red-a.red)*s/i+a.red,l=(r.green-a.green)*s/i+a.green,c=(r.blue-a.blue)*s/i+a.blue;return o.Color.getColor32(n,h,l,c)},interpolateColorWithRGB:function(t,e,i,s,n,a){var r=o.Color.getRGB(t),h=(e-r.red)*a/n+r.red,l=(i-r.green)*a/n+r.green,c=(s-r.blue)*a/n+r.blue;return o.Color.getColor(h,l,c)},interpolateRGB:function(t,e,i,s,n,a,r,h){var l=(s-t)*h/r+t,c=(n-e)*h/r+e,u=(a-i)*h/r+i;return o.Color.getColor(l,c,u)},getRandomColor:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=255),void 0===i&&(i=255),e>255||t>e)return o.Color.getColor(255,255,255);var s=t+Math.round(Math.random()*(e-t)),n=t+Math.round(Math.random()*(e-t)),a=t+Math.round(Math.random()*(e-t));return o.Color.getColor32(i,s,n,a)},getRGB:function(t){return t>16777215?{alpha:t>>>24,red:t>>16&255,green:t>>8&255,blue:255&t,a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{alpha:255,red:t>>16&255,green:t>>8&255,blue:255&t,a:255,r:t>>16&255,g:t>>8&255,b:255&t}},getWebRGB:function(t){if("object"==typeof t)return"rgba("+t.r.toString()+","+t.g.toString()+","+t.b.toString()+","+(t.a/255).toString()+")";var e=o.Color.getRGB(t);return"rgba("+e.r.toString()+","+e.g.toString()+","+e.b.toString()+","+(e.a/255).toString()+")"},getAlpha:function(t){return t>>>24},getAlphaFloat:function(t){return(t>>>24)/255},getRed:function(t){return t>>16&255},getGreen:function(t){return t>>8&255},getBlue:function(t){return 255&t},blendNormal:function(t){return t},blendLighten:function(t,e){return e>t?e:t},blendDarken:function(t,e){return e>t?t:e},blendMultiply:function(t,e){return t*e/255},blendAverage:function(t,e){return(t+e)/2},blendAdd:function(t,e){return Math.min(255,t+e)},blendSubtract:function(t,e){return Math.max(0,t+e-255)},blendDifference:function(t,e){return Math.abs(t-e)},blendNegation:function(t,e){return 255-Math.abs(255-t-e)},blendScreen:function(t,e){return 255-((255-t)*(255-e)>>8)},blendExclusion:function(t,e){return t+e-2*t*e/255},blendOverlay:function(t,e){return e<128?2*t*e/255:255-2*(255-t)*(255-e)/255},blendSoftLight:function(t,e){return e<128?2*(64+(t>>1))*(e/255):255-2*(255-(64+(t>>1)))*(255-e)/255},blendHardLight:function(t,e){return o.Color.blendOverlay(e,t)},blendColorDodge:function(t,e){return 255===e?e:Math.min(255,(t<<8)/(255-e))},blendColorBurn:function(t,e){return 0===e?e:Math.max(0,255-(255-t<<8)/e)},blendLinearDodge:function(t,e){return o.Color.blendAdd(t,e)},blendLinearBurn:function(t,e){return o.Color.blendSubtract(t,e)},blendLinearLight:function(t,e){return e<128?o.Color.blendLinearBurn(t,2*e):o.Color.blendLinearDodge(t,2*(e-128))},blendVividLight:function(t,e){return e<128?o.Color.blendColorBurn(t,2*e):o.Color.blendColorDodge(t,2*(e-128))},blendPinLight:function(t,e){return e<128?o.Color.blendDarken(t,2*e):o.Color.blendLighten(t,2*(e-128))},blendHardMix:function(t,e){return o.Color.blendVividLight(t,e)<128?0:255},blendReflect:function(t,e){return 255===e?e:Math.min(255,t*t/(255-e))},blendGlow:function(t,e){return o.Color.blendReflect(e,t)},blendPhoenix:function(t,e){return Math.min(t,e)-Math.max(t,e)+255}},o.Physics=function(t,e){e=e||{},this.game=t,this.config=e,this.arcade=null,this.p2=null,this.ninja=null,this.box2d=null,this.chipmunk=null,this.matter=null,this.parseConfig()},o.Physics.ARCADE=0,o.Physics.P2JS=1,o.Physics.NINJA=2,o.Physics.BOX2D=3,o.Physics.CHIPMUNK=4,o.Physics.MATTERJS=5,o.Physics.prototype={parseConfig:function(){this.config.hasOwnProperty("arcade")&&!0!==this.config.arcade||!o.Physics.hasOwnProperty("Arcade")||(this.arcade=new o.Physics.Arcade(this.game)),this.config.hasOwnProperty("ninja")&&!0===this.config.ninja&&o.Physics.hasOwnProperty("Ninja")&&(this.ninja=new o.Physics.Ninja(this.game)),this.config.hasOwnProperty("p2")&&!0===this.config.p2&&o.Physics.hasOwnProperty("P2")&&(this.p2=new o.Physics.P2(this.game,this.config)),this.config.hasOwnProperty("box2d")&&!0===this.config.box2d&&o.Physics.hasOwnProperty("BOX2D")&&(this.box2d=new o.Physics.BOX2D(this.game,this.config)),this.config.hasOwnProperty("matter")&&!0===this.config.matter&&o.Physics.hasOwnProperty("Matter")&&(this.matter=new o.Physics.Matter(this.game,this.config))},startSystem:function(t){t===o.Physics.ARCADE?this.arcade=new o.Physics.Arcade(this.game):t===o.Physics.P2JS?null===this.p2?this.p2=new o.Physics.P2(this.game,this.config):this.p2.reset():t===o.Physics.NINJA?this.ninja=new o.Physics.Ninja(this.game):t===o.Physics.BOX2D?null===this.box2d?this.box2d=new o.Physics.Box2D(this.game,this.config):this.box2d.reset():t===o.Physics.MATTERJS&&(null===this.matter?this.matter=new o.Physics.Matter(this.game,this.config):this.matter.reset())},enable:function(t,e,i){void 0===e&&(e=o.Physics.ARCADE),void 0===i&&(i=!1),e===o.Physics.ARCADE?this.arcade.enable(t):e===o.Physics.P2JS&&this.p2?this.p2.enable(t,i):e===o.Physics.NINJA&&this.ninja?this.ninja.enableAABB(t):e===o.Physics.BOX2D&&this.box2d?this.box2d.enable(t):e===o.Physics.MATTERJS&&this.matter&&this.matter.enable(t)},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}},o.Physics.prototype.constructor=o.Physics,o.Physics.Arcade=function(t){this.game=t,this.gravity=new o.Point,this.bounds=new o.Rectangle(0,0,t.world.width,t.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=o.Physics.Arcade.LEFT_RIGHT,this.skipQuadTree=!0,this.isPaused=!1,this.quadTree=new o.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()},o.Physics.Arcade.prototype.constructor=o.Physics.Arcade,o.Physics.Arcade.SORT_NONE=0,o.Physics.Arcade.LEFT_RIGHT=1,o.Physics.Arcade.RIGHT_LEFT=2,o.Physics.Arcade.TOP_BOTTOM=3,o.Physics.Arcade.BOTTOM_TOP=4,o.Physics.Arcade.prototype={setBounds:function(t,e,i,s){this.bounds.setTo(t,e,i,s)},setBoundsToWorld:function(){this.bounds.copyFrom(this.game.world.bounds)},enable:function(t,e){void 0===e&&(e=!0);var i=1;if(Array.isArray(t))for(i=t.length;i--;)t[i]instanceof o.Group?this.enable(t[i].children,e):(this.enableBody(t[i]),e&&t[i].hasOwnProperty("children")&&t[i].children.length>0&&this.enable(t[i],!0));else t instanceof o.Group?this.enable(t.children,e):(this.enableBody(t),e&&t.hasOwnProperty("children")&&t.children.length>0&&this.enable(t.children,!0))},enableBody:function(t){t.hasOwnProperty("body")&&null===t.body&&(t.body=new o.Physics.Arcade.Body(t),t.parent&&t.parent instanceof o.Group&&t.parent.addToHash(t))},updateMotion:function(t){var e=this.computeVelocity(0,t,t.angularVelocity,t.angularAcceleration,t.angularDrag,t.maxAngular)-t.angularVelocity;t.angularVelocity+=e,t.rotation+=t.angularVelocity*this.game.time.physicsElapsed,t.velocity.x=this.computeVelocity(1,t,t.velocity.x,t.acceleration.x,t.drag.x,t.maxVelocity.x),t.velocity.y=this.computeVelocity(2,t,t.velocity.y,t.acceleration.y,t.drag.y,t.maxVelocity.y)},computeVelocity:function(t,e,i,s,n,o){return void 0===o&&(o=1e4),1===t&&e.allowGravity?i+=(this.gravity.x+e.gravity.x)*this.game.time.physicsElapsed:2===t&&e.allowGravity&&(i+=(this.gravity.y+e.gravity.y)*this.game.time.physicsElapsed),s?i+=s*this.game.time.physicsElapsed:n&&(n*=this.game.time.physicsElapsed,i-n>0?i-=n:i+n<0?i+=n:i=0),i>o?i=o:i<-o&&(i=-o),i},overlap:function(t,e,i,s,n){if(i=i||null,s=s||null,n=n||i,this._total=0,!Array.isArray(t)&&Array.isArray(e))for(var o=0;o0},collide:function(t,e,i,s,n){if(i=i||null,s=s||null,n=n||i,this._total=0,!Array.isArray(t)&&Array.isArray(e))for(var o=0;o0},sortLeftRight:function(t,e){return t.body&&e.body?t.body.x-e.body.x:0},sortRightLeft:function(t,e){return t.body&&e.body?e.body.x-t.body.x:0},sortTopBottom:function(t,e){return t.body&&e.body?t.body.y-e.body.y:0},sortBottomTop:function(t,e){return t.body&&e.body?e.body.y-t.body.y:0},sort:function(t,e){null!==t.physicsSortDirection?e=t.physicsSortDirection:void 0===e&&(e=this.sortDirection),e===o.Physics.Arcade.LEFT_RIGHT?t.hash.sort(this.sortLeftRight):e===o.Physics.Arcade.RIGHT_LEFT?t.hash.sort(this.sortRightLeft):e===o.Physics.Arcade.TOP_BOTTOM?t.hash.sort(this.sortTopBottom):e===o.Physics.Arcade.BOTTOM_TOP&&t.hash.sort(this.sortBottomTop)},collideHandler:function(t,e,i,s,n,a){if(void 0===e&&t.physicsType===o.GROUP)return this.sort(t),void this.collideGroupVsSelf(t,i,s,n,a);t&&e&&t.exists&&e.exists&&(this.sortDirection!==o.Physics.Arcade.SORT_NONE&&(t.physicsType===o.GROUP&&this.sort(t),e.physicsType===o.GROUP&&this.sort(e)),t.physicsType===o.SPRITE?e.physicsType===o.SPRITE?this.collideSpriteVsSprite(t,e,i,s,n,a):e.physicsType===o.GROUP?this.collideSpriteVsGroup(t,e,i,s,n,a):e.physicsType===o.TILEMAPLAYER&&this.collideSpriteVsTilemapLayer(t,e,i,s,n,a):t.physicsType===o.GROUP?e.physicsType===o.SPRITE?this.collideSpriteVsGroup(e,t,i,s,n,a):e.physicsType===o.GROUP?this.collideGroupVsGroup(t,e,i,s,n,a):e.physicsType===o.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(t,e,i,s,n,a):t.physicsType===o.TILEMAPLAYER&&(e.physicsType===o.SPRITE?this.collideSpriteVsTilemapLayer(e,t,i,s,n,a):e.physicsType===o.GROUP&&this.collideGroupVsTilemapLayer(e,t,i,s,n,a)))},collideSpriteVsSprite:function(t,e,i,s,n,o){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,s,n,o)&&(i&&i.call(n,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,n,a){if(0!==e.length&&t.body)if(this.skipQuadTree||t.body.skipQuadTree)for(var r={},h=0;hr.right)break;if(r.x>t.body.right)continue}else if(this.sortDirection===o.Physics.Arcade.TOP_BOTTOM){if(t.body.bottomr.bottom)break;if(r.y>t.body.bottom)continue}this.collideSpriteVsSprite(t,l,i,s,n,a)}}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(e);for(var c=this.quadTree.retrieve(t),h=0;hc.right)continue;if(c.x>r.right)break}else if(this.sortDirection===o.Physics.Arcade.TOP_BOTTOM){if(r.bottomc.bottom)continue;if(c.y>h.body.bottom)break}this.collideSpriteVsSprite(h,u,e,i,s,n)}}}}},collideGroupVsGroup:function(t,e,i,s,n,a){if(0!==t.length&&0!==e.length)for(var r=0;rr.bottom)&&(h.xr.right))return this.separateCircle(t,e,n)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=o.Math.clamp(t.center.x,e.left,e.right),s=o.Math.clamp(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.radius*t.radius},separateCircle:function(t,e,i){this.getOverlapX(t,e),this.getOverlapY(t,e);var s=e.center.x-t.center.x,n=e.center.y-t.center.y,a=Math.atan2(n,s),r=0;if(t.isCircle!==e.isCircle){var h={x:e.isCircle?t.position.x:e.position.x,y:e.isCircle?t.position.y:e.position.y,right:e.isCircle?t.right:e.right,bottom:e.isCircle?t.bottom:e.bottom},l={x:t.isCircle?t.position.x+t.radius:e.position.x+e.radius,y:t.isCircle?t.position.y+t.radius:e.position.y+e.radius,radius:t.isCircle?t.radius:e.radius};l.yh.right&&(r=o.Math.distance(l.x,l.y,h.right,h.y)-l.radius):l.y>h.bottom&&(l.xh.right&&(r=o.Math.distance(l.x,l.y,h.right,h.bottom)-l.radius)),r*=-1}else r=t.radius+e.radius-o.Math.distance(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r&&(t.onOverlap&&t.onOverlap.dispatch(t.sprite,e.sprite),e.onOverlap&&e.onOverlap.dispatch(e.sprite,t.sprite)),0!==r;var c={x:t.velocity.x*Math.cos(a)+t.velocity.y*Math.sin(a),y:t.velocity.x*Math.sin(a)-t.velocity.y*Math.cos(a)},u={x:e.velocity.x*Math.cos(a)+e.velocity.y*Math.sin(a),y:e.velocity.x*Math.sin(a)-e.velocity.y*Math.cos(a)},d=((t.mass-e.mass)*c.x+2*e.mass*u.x)/(t.mass+e.mass),p=(2*t.mass*c.x+(e.mass-t.mass)*u.x)/(t.mass+e.mass);return t.immovable||(t.velocity.x=(d*Math.cos(a)-c.y*Math.sin(a))*t.bounce.x,t.velocity.y=(c.y*Math.cos(a)+d*Math.sin(a))*t.bounce.y),e.immovable||(e.velocity.x=(p*Math.cos(a)-u.y*Math.sin(a))*e.bounce.x,e.velocity.y=(u.y*Math.cos(a)+p*Math.sin(a))*e.bounce.y),Math.abs(a)0&&!t.immovable&&e.velocity.x>t.velocity.x?t.velocity.x*=-1:e.velocity.x<0&&!e.immovable&&t.velocity.x0&&!t.immovable&&e.velocity.y>t.velocity.y?t.velocity.y*=-1:e.velocity.y<0&&!e.immovable&&t.velocity.yMath.PI/2&&(t.velocity.x<0&&!t.immovable&&e.velocity.x0&&!e.immovable&&t.velocity.x>e.velocity.x?e.velocity.x*=-1:t.velocity.y<0&&!t.immovable&&e.velocity.y0&&!e.immovable&&t.velocity.x>e.velocity.y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.game.time.physicsElapsed-r*Math.cos(a),t.y+=t.velocity.y*this.game.time.physicsElapsed-r*Math.sin(a)),e.immovable||(e.x+=e.velocity.x*this.game.time.physicsElapsed+r*Math.cos(a),e.y+=e.velocity.y*this.game.time.physicsElapsed+r*Math.sin(a)),t.onCollide&&t.onCollide.dispatch(t.sprite,e.sprite),e.onCollide&&e.onCollide.dispatch(e.sprite,t.sprite),!0},getOverlapX:function(t,e,i){var s=0,n=t.deltaAbsX()+e.deltaAbsX()+this.OVERLAP_BIAS;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x,s>n&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0)):t.deltaX()n&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s},getOverlapY:function(t,e,i){var s=0,n=t.deltaAbsY()+e.deltaAbsY()+this.OVERLAP_BIAS;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y,s>n&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0)):t.deltaY()n&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s},separateX:function(t,e,i){var s=this.getOverlapX(t,e,i);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s||t.embedded&&e.embedded;var n=t.velocity.x,o=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=s,e.velocity.x=n-o*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=s,t.velocity.x=o-n*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{s*=.5,t.x-=s,e.x+=s;var a=Math.sqrt(o*o*e.mass/t.mass)*(o>0?1:-1),r=Math.sqrt(n*n*t.mass/e.mass)*(n>0?1:-1),h=.5*(a+r);a-=h,r-=h,t.velocity.x=h+a*t.bounce.x,e.velocity.x=h+r*e.bounce.x}return!0},separateY:function(t,e,i){var s=this.getOverlapY(t,e,i);if(i||0===s||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==s||t.embedded&&e.embedded;var n=t.velocity.y,o=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=s,e.velocity.y=n-o*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=s,t.velocity.y=o-n*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{s*=.5,t.y-=s,e.y+=s;var a=Math.sqrt(o*o*e.mass/t.mass)*(o>0?1:-1),r=Math.sqrt(n*n*t.mass/e.mass)*(n>0?1:-1),h=.5*(a+r);a-=h,r-=h,t.velocity.y=h+a*t.bounce.y,e.velocity.y=h+r*e.bounce.y}return!0},getObjectsUnderPointer:function(t,e,i,s){if(0!==e.length&&t.exists)return this.getObjectsAtLocation(t.x,t.y,e,i,s,t)},getObjectsAtLocation:function(t,e,i,s,n,a){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(i);for(var r=new o.Rectangle(t,e,1,1),h=[],l=this.quadTree.retrieve(r),c=0;c0&&(i=this.distanceBetween(t,e)/(s/1e3)),t.body.velocity.x=Math.cos(n)*i,t.body.velocity.y=Math.sin(n)*i,n},moveToPointer:function(t,e,i,s){void 0===e&&(e=60),i=i||this.game.input.activePointer,void 0===s&&(s=0);var n=this.angleToPointer(t,i);return s>0&&(e=this.distanceToPointer(t,i)/(s/1e3)),t.body.velocity.x=Math.cos(n)*e,t.body.velocity.y=Math.sin(n)*e,n},moveToXY:function(t,e,i,s,n){void 0===s&&(s=60),void 0===n&&(n=0);var o=Math.atan2(i-t.y,e-t.x);return n>0&&(s=this.distanceToXY(t,e,i)/(n/1e3)),t.body.velocity.x=Math.cos(o)*s,t.body.velocity.y=Math.sin(o)*s,o},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i=i||new o.Point,i.setTo(Math.cos(this.game.math.degToRad(t))*e,Math.sin(this.game.math.degToRad(t))*e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i=i||new o.Point,i.setTo(Math.cos(t)*e,Math.sin(t)*e)},accelerationFromRotation:function(t,e,i){return void 0===e&&(e=60),i=i||new o.Point,i.setTo(Math.cos(t)*e,Math.sin(t)*e)},accelerateToObject:function(t,e,i,s,n){void 0===i&&(i=60),void 0===s&&(s=1e3),void 0===n&&(n=1e3);var o=this.angleBetween(t,e);return t.body.acceleration.setTo(Math.cos(o)*i,Math.sin(o)*i),t.body.maxVelocity.setTo(s,n),o},accelerateToPointer:function(t,e,i,s,n){void 0===i&&(i=60),void 0===e&&(e=this.game.input.activePointer),void 0===s&&(s=1e3),void 0===n&&(n=1e3);var o=this.angleToPointer(t,e);return t.body.acceleration.setTo(Math.cos(o)*i,Math.sin(o)*i),t.body.maxVelocity.setTo(s,n),o},accelerateToXY:function(t,e,i,s,n,o){void 0===s&&(s=60),void 0===n&&(n=1e3),void 0===o&&(o=1e3);var a=this.angleToXY(t,e,i);return t.body.acceleration.setTo(Math.cos(a)*s,Math.sin(a)*s),t.body.maxVelocity.setTo(n,o),a},distanceBetween:function(t,e,i){void 0===i&&(i=!1);var s=i?t.world.x-e.world.x:t.x-e.x,n=i?t.world.y-e.world.y:t.y-e.y;return Math.sqrt(s*s+n*n)},distanceToXY:function(t,e,i,s){void 0===s&&(s=!1);var n=s?t.world.x-e:t.x-e,o=s?t.world.y-i:t.y-i;return Math.sqrt(n*n+o*o)},distanceToPointer:function(t,e,i){void 0===e&&(e=this.game.input.activePointer),void 0===i&&(i=!1);var s=i?t.world.x-e.worldX:t.x-e.worldX,n=i?t.world.y-e.worldY:t.y-e.worldY;return Math.sqrt(s*s+n*n)},angleBetween:function(t,e,i){return void 0===i&&(i=!1),i?Math.atan2(e.world.y-t.world.y,e.world.x-t.world.x):Math.atan2(e.y-t.y,e.x-t.x)},angleBetweenCenters:function(t,e){var i=e.centerX-t.centerX,s=e.centerY-t.centerY;return Math.atan2(s,i)},angleToXY:function(t,e,i,s){return void 0===s&&(s=!1),s?Math.atan2(i-t.world.y,e-t.world.x):Math.atan2(i-t.y,e-t.x)},angleToPointer:function(t,e,i){return void 0===e&&(e=this.game.input.activePointer),void 0===i&&(i=!1),i?Math.atan2(e.worldY-t.world.y,e.worldX-t.world.x):Math.atan2(e.worldY-t.y,e.worldX-t.x)},worldAngleToPointer:function(t,e){return this.angleToPointer(t,e,!0)}},o.Physics.Arcade.Body=function(t){this.sprite=t,this.game=t.game,this.type=o.Physics.ARCADE,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new o.Point,this.position=new o.Point(t.x,t.y),this.prev=new o.Point(this.position.x,this.position.y),this.allowRotation=!0,this.rotation=t.angle,this.preRotation=t.angle,this.width=t.width,this.height=t.height,this.sourceWidth=t.width,this.sourceHeight=t.height,t.texture&&(this.sourceWidth=t.texture.frame.width,this.sourceHeight=t.texture.frame.height),this.halfWidth=Math.abs(t.width/2),this.halfHeight=Math.abs(t.height/2),this.center=new o.Point(t.x+this.halfWidth,t.y+this.halfHeight),this.velocity=new o.Point,this.newVelocity=new o.Point,this.deltaMax=new o.Point,this.acceleration=new o.Point,this.drag=new o.Point,this.allowGravity=!0,this.gravity=new o.Point,this.bounce=new o.Point,this.worldBounce=null,this.onWorldBounds=null,this.onCollide=null,this.onOverlap=null,this.maxVelocity=new o.Point(1e4,1e4),this.friction=new o.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=o.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 o.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 o.Signal,this.movementCallback=null,this.movementCallbackContext=null,this._reset=!0,this._sx=t.scale.x,this._sy=t.scale.y,this._dx=0,this._dy=0},o.Physics.Arcade.Body.prototype={updateBounds:function(){if(this.syncBounds){var t=this.sprite.getBounds();t.ceilAll(),t.width===this.width&&t.height===this.height||(this.width=t.width,this.height=t.height,this._reset=!0)}else{var e=Math.abs(this.sprite.scale.x),i=Math.abs(this.sprite.scale.y);e===this._sx&&i===this._sy||(this.width=this.sourceWidth*e,this.height=this.sourceHeight*i,this._sx=e,this._sy=i,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 t=0,e=0!==this.overlapX||0!==this.overlapY;if(this.moveDuration>0?(this.moveTimer+=this.game.time.elapsedMS,t=this.moveTimer/this.moveDuration):(this.moveTarget.end.set(this.position.x,this.position.y),t=this.moveTarget.length/this.moveDistance),this.movementCallback)var i=this.movementCallback.call(this.movementCallbackContext,this,this.velocity,t);return!(e||t>=1||void 0!==i&&!0!==i)||(this.stopMovement(t>=1||this.stopVelocityOnCollide&&e),!1)},stopMovement:function(t){this.isMoving&&(this.isMoving=!1,t&&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=o.LEFT:this.deltaX()>0&&(this.facing=o.RIGHT),this.deltaY()<0?this.facing=o.UP:this.deltaY()>0&&(this.facing=o.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 t=this.position,e=this.game.physics.arcade.bounds,i=this.game.physics.arcade.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,n=this.worldBounce?-this.worldBounce.y:-this.bounce.y;if(this.isCircle){var o={x:this.center.x-this.radius,y:this.center.y-this.radius,right:this.center.x+this.radius,bottom:this.center.y+this.radius};o.xe.right&&i.right&&(t.x=e.right-this.halfWidth-this.radius,this.velocity.x*=s,this.blocked.right=!0),o.ye.bottom&&i.down&&(t.y=e.bottom-this.halfHeight-this.radius,this.velocity.y*=n,this.blocked.down=!0)}else t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=s,this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=n,this.blocked.down=!0);return this.blocked.up||this.blocked.down||this.blocked.left||this.blocked.right},moveFrom:function(t,e,i){if(void 0===e&&(e=this.speed),0===e)return!1;var s;return void 0===i?(s=this.angle,i=this.game.math.radToDeg(s)):s=this.game.math.degToRad(i),this.moveTimer=0,this.moveDuration=t,0===i||180===i?this.velocity.set(Math.cos(s)*e,0):90===i||270===i?this.velocity.set(0,Math.sin(s)*e):this.velocity.set(Math.cos(s)*e,Math.sin(s)*e),this.isMoving=!0,!0},moveTo:function(t,e,i){var s=e/(t/1e3);if(0===s)return!1;var n;return void 0===i?(n=this.angle,i=this.game.math.radToDeg(n)):n=this.game.math.degToRad(i),e=Math.abs(e),this.moveDuration=0,this.moveDistance=e,null===this.moveTarget&&(this.moveTarget=new o.Line,this.moveEnd=new o.Point),this.moveTarget.fromAngle(this.x,this.y,n,e),this.moveEnd.set(this.moveTarget.end.x,this.moveTarget.end.y),this.moveTarget.setTo(this.x,this.y,this.x,this.y),0===i||180===i?this.velocity.set(Math.cos(n)*s,0):90===i||270===i?this.velocity.set(0,Math.sin(n)*s):this.velocity.set(Math.cos(n)*s,Math.sin(n)*s),this.isMoving=!0,!0},setSize:function(t,e,i,s){void 0===i&&(i=this.offset.x),void 0===s&&(s=this.offset.y),this.sourceWidth=t,this.sourceHeight=e,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(i,s),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.isCircle=!1,this.radius=0},setCircle:function(t,e,i){void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,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(e,i),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight)):this.isCircle=!1},reset:function(t,e){this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this.position.x=t-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=e-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(t){return this.isCircle?(t.x=this.center.x-this.radius,t.y=this.center.y-this.radius,t.right=this.center.x+this.radius,t.bottom=this.center.y+this.radius):(t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom),t},hitTest:function(t,e){return this.isCircle?o.Circle.contains(this,t,e):o.Rectangle.contains(this,t,e)},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 o.Group&&this.sprite.parent.removeFromHash(this.sprite),this.sprite.body=null,this.sprite=null}},Object.defineProperty(o.Physics.Arcade.Body.prototype,"left",{get:function(){return this.position.x}}),Object.defineProperty(o.Physics.Arcade.Body.prototype,"right",{get:function(){return this.position.x+this.width}}),Object.defineProperty(o.Physics.Arcade.Body.prototype,"top",{get:function(){return this.position.y}}),Object.defineProperty(o.Physics.Arcade.Body.prototype,"bottom",{get:function(){return this.position.y+this.height}}),Object.defineProperty(o.Physics.Arcade.Body.prototype,"x",{get:function(){return this.position.x},set:function(t){this.position.x=t}}),Object.defineProperty(o.Physics.Arcade.Body.prototype,"y",{get:function(){return this.position.y},set:function(t){this.position.y=t}}),o.Physics.Arcade.Body.render=function(t,e,i,s){void 0===s&&(s=!0),i=i||"rgba(0,255,0,0.4)",t.fillStyle=i,t.strokeStyle=i,e.isCircle?(t.beginPath(),t.arc(e.center.x-e.game.camera.x,e.center.y-e.game.camera.y,e.radius,0,2*Math.PI),s?t.fill():t.stroke()):s?t.fillRect(e.position.x-e.game.camera.x,e.position.y-e.game.camera.y,e.width,e.height):t.strokeRect(e.position.x-e.game.camera.x,e.position.y-e.game.camera.y,e.width,e.height)},o.Physics.Arcade.Body.renderBodyInfo=function(t,e){t.line("x: "+e.x.toFixed(2),"y: "+e.y.toFixed(2),"width: "+e.width,"height: "+e.height),t.line("velocity x: "+e.velocity.x.toFixed(2),"y: "+e.velocity.y.toFixed(2),"deltaX: "+e._dx.toFixed(2),"deltaY: "+e._dy.toFixed(2)),t.line("acceleration x: "+e.acceleration.x.toFixed(2),"y: "+e.acceleration.y.toFixed(2),"speed: "+e.speed.toFixed(2),"angle: "+e.angle.toFixed(2)),t.line("gravity x: "+e.gravity.x,"y: "+e.gravity.y,"bounce x: "+e.bounce.x.toFixed(2),"y: "+e.bounce.y.toFixed(2)),t.line("touching left: "+e.touching.left,"right: "+e.touching.right,"up: "+e.touching.up,"down: "+e.touching.down),t.line("blocked left: "+e.blocked.left,"right: "+e.blocked.right,"up: "+e.blocked.up,"down: "+e.blocked.down)},o.Physics.Arcade.Body.prototype.constructor=o.Physics.Arcade.Body,o.Physics.Arcade.TilemapCollision=function(){},o.Physics.Arcade.TilemapCollision.prototype={TILE_BIAS:16,collideSpriteVsTilemapLayer:function(t,e,i,s,n,o){if(t.body){var a=e.getTiles(t.body.position.x-t.body.tilePadding.x,t.body.position.y-t.body.tilePadding.y,t.body.width+t.body.tilePadding.x,t.body.height+t.body.tilePadding.y,!1,!1);if(0!==a.length)for(var r=0;re.deltaAbsY()?l=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right-n>e.left&&(s=t.right-n-e.left)>this.TILE_BIAS&&(s=0),0!==s&&(t.customSeparateX?t.overlapX=s:this.processTileSeparationX(t,s)),s},tileCheckY:function(t,e,i){var s=0,n=i.fixedToCamera?0:i.position.y;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y-n0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom-n>e.top&&(s=t.bottom-n-e.top)>this.TILE_BIAS&&(s=0),0!==s&&(t.customSeparateY?t.overlapY=s:this.processTileSeparationY(t,s)),s},processTileSeparationX:function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x},processTileSeparationY:function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},o.Utils.mixinPrototype(o.Physics.Arcade.prototype,o.Physics.Arcade.TilemapCollision.prototype),p2.Body.prototype.parent=null,p2.Spring.prototype.parent=null,o.Physics.P2=function(t,e){this.game=t,void 0===e?e={gravity:[0,0],broadphase:new p2.SAPBroadphase}:(e.hasOwnProperty("gravity")||(e.gravity=[0,0]),e.hasOwnProperty("broadphase")||(e.broadphase=new p2.SAPBroadphase)),this.config=e,this.world=new p2.World(this.config),this.frameRate=1/60,this.useElapsedTime=!1,this.paused=!1,this.materials=[],this.gravity=new o.Physics.P2.InversePointProxy(this,this.world.gravity),this.walls={left:null,right:null,top:null,bottom:null},this.onBodyAdded=new o.Signal,this.onBodyRemoved=new o.Signal,this.onSpringAdded=new o.Signal,this.onSpringRemoved=new o.Signal,this.onConstraintAdded=new o.Signal,this.onConstraintRemoved=new o.Signal,this.onContactMaterialAdded=new o.Signal,this.onContactMaterialRemoved=new o.Signal,this.postBroadphaseCallback=null,this.callbackContext=null,this.onBeginContact=new o.Signal,this.onEndContact=new o.Signal,e.hasOwnProperty("mpx")&&e.hasOwnProperty("pxm")&&e.hasOwnProperty("mpxi")&&e.hasOwnProperty("pxmi")&&(this.mpx=e.mpx,this.mpxi=e.mpxi,this.pxm=e.pxm,this.pxmi=e.pxmi),this.world.on("beginContact",this.beginContactHandler,this),this.world.on("endContact",this.endContactHandler,this),this.collisionGroups=[],this.nothingCollisionGroup=new o.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new o.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new o.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)},o.Physics.P2.prototype={removeBodyNextStep:function(t){this._toRemove.push(t)},preUpdate:function(){for(var t=this._toRemove.length;t--;)this.removeBody(this._toRemove[t]);this._toRemove.length=0},enable:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0);var s=1;if(Array.isArray(t))for(s=t.length;s--;)t[s]instanceof o.Group?this.enable(t[s].children,e,i):(this.enableBody(t[s],e),i&&t[s].hasOwnProperty("children")&&t[s].children.length>0&&this.enable(t[s],e,!0));else t instanceof o.Group?this.enable(t.children,e,i):(this.enableBody(t,e),i&&t.hasOwnProperty("children")&&t.children.length>0&&this.enable(t.children,e,!0))},enableBody:function(t,e){t.hasOwnProperty("body")&&null===t.body&&(t.body=new o.Physics.P2.Body(this.game,t,t.x,t.y,1),t.body.debug=e,void 0!==t.anchor&&t.anchor.set(.5))},setImpactEvents:function(t){t?this.world.on("impact",this.impactHandler,this):this.world.off("impact",this.impactHandler,this)},setPostBroadphaseCallback:function(t,e){this.postBroadphaseCallback=t,this.callbackContext=e,null!==t?this.world.on("postBroadphase",this.postBroadphaseHandler,this):this.world.off("postBroadphase",this.postBroadphaseHandler,this)},postBroadphaseHandler:function(t){if(this.postBroadphaseCallback&&0!==t.pairs.length)for(var e=t.pairs.length-2;e>=0;e-=2)t.pairs[e].parent&&t.pairs[e+1].parent&&!this.postBroadphaseCallback.call(this.callbackContext,t.pairs[e].parent,t.pairs[e+1].parent)&&t.pairs.splice(e,2)},impactHandler:function(t){if(t.bodyA.parent&&t.bodyB.parent){var e=t.bodyA.parent,i=t.bodyB.parent;e._bodyCallbacks[t.bodyB.id]&&e._bodyCallbacks[t.bodyB.id].call(e._bodyCallbackContext[t.bodyB.id],e,i,t.shapeA,t.shapeB),i._bodyCallbacks[t.bodyA.id]&&i._bodyCallbacks[t.bodyA.id].call(i._bodyCallbackContext[t.bodyA.id],i,e,t.shapeB,t.shapeA),e._groupCallbacks[t.shapeB.collisionGroup]&&e._groupCallbacks[t.shapeB.collisionGroup].call(e._groupCallbackContext[t.shapeB.collisionGroup],e,i,t.shapeA,t.shapeB),i._groupCallbacks[t.shapeA.collisionGroup]&&i._groupCallbacks[t.shapeA.collisionGroup].call(i._groupCallbackContext[t.shapeA.collisionGroup],i,e,t.shapeB,t.shapeA)}},beginContactHandler:function(t){t.bodyA&&t.bodyB&&(this.onBeginContact.dispatch(t.bodyA,t.bodyB,t.shapeA,t.shapeB,t.contactEquations),t.bodyA.parent&&t.bodyA.parent.onBeginContact.dispatch(t.bodyB.parent,t.bodyB,t.shapeA,t.shapeB,t.contactEquations),t.bodyB.parent&&t.bodyB.parent.onBeginContact.dispatch(t.bodyA.parent,t.bodyA,t.shapeB,t.shapeA,t.contactEquations))},endContactHandler:function(t){t.bodyA&&t.bodyB&&(this.onEndContact.dispatch(t.bodyA,t.bodyB,t.shapeA,t.shapeB),t.bodyA.parent&&t.bodyA.parent.onEndContact.dispatch(t.bodyB.parent,t.bodyB,t.shapeA,t.shapeB),t.bodyB.parent&&t.bodyB.parent.onEndContact.dispatch(t.bodyA.parent,t.bodyA,t.shapeB,t.shapeA))},setBoundsToWorld:function(t,e,i,s,n){this.setBounds(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,t,e,i,s,n)},setWorldMaterial:function(t,e,i,s,n){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===s&&(s=!0),void 0===n&&(n=!0),e&&this.walls.left&&(this.walls.left.shapes[0].material=t),i&&this.walls.right&&(this.walls.right.shapes[0].material=t),s&&this.walls.top&&(this.walls.top.shapes[0].material=t),n&&this.walls.bottom&&(this.walls.bottom.shapes[0].material=t)},updateBoundsCollisionGroup:function(t){void 0===t&&(t=!0);var e=t?this.boundsCollisionGroup.mask:this.everythingCollisionGroup.mask;this.walls.left&&(this.walls.left.shapes[0].collisionGroup=e),this.walls.right&&(this.walls.right.shapes[0].collisionGroup=e),this.walls.top&&(this.walls.top.shapes[0].collisionGroup=e),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionGroup=e),this._boundsOwnGroup=t},setBounds:function(t,e,i,s,n,o,a,r,h){void 0===n&&(n=this._boundsLeft),void 0===o&&(o=this._boundsRight),void 0===a&&(a=this._boundsTop),void 0===r&&(r=this._boundsBottom),void 0===h&&(h=this._boundsOwnGroup),this.setupWall(n,"left",t,e,1.5707963267948966,h),this.setupWall(o,"right",t+i,e,-1.5707963267948966,h),this.setupWall(a,"top",t,e,-3.141592653589793,h),this.setupWall(r,"bottom",t,e+s,0,h),this._boundsLeft=n,this._boundsRight=o,this._boundsTop=a,this._boundsBottom=r,this._boundsOwnGroup=h},setupWall:function(t,e,i,s,n,o){t?(this.walls[e]?this.walls[e].position=[this.pxmi(i),this.pxmi(s)]:(this.walls[e]=new p2.Body({mass:0,position:[this.pxmi(i),this.pxmi(s)],angle:n}),this.walls[e].addShape(new p2.Plane),this.world.addBody(this.walls[e])),o&&(this.walls[e].shapes[0].collisionGroup=this.boundsCollisionGroup.mask)):this.walls[e]&&(this.world.removeBody(this.walls[e]),this.walls[e]=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 o.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new o.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new o.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 t=this.world.constraints,e=t.length-1;e>=0;e--)this.world.removeConstraint(t[e]);for(var i=this.world.bodies,e=i.length-1;e>=0;e--)this.world.removeBody(i[e]);for(var s=this.world.springs,e=s.length-1;e>=0;e--)this.world.removeSpring(s[e]);for(var n=this.world.contactMaterials,e=n.length-1;e>=0;e--)this.world.removeContactMaterial(n[e]);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(t){return!t.data.world&&(this.world.addBody(t.data),this.onBodyAdded.dispatch(t),!0)},removeBody:function(t){return t.data.world===this.world&&(this.world.removeBody(t.data),this.onBodyRemoved.dispatch(t)),t},addSpring:function(t){return t instanceof o.Physics.P2.Spring||t instanceof o.Physics.P2.RotationalSpring?this.world.addSpring(t.data):this.world.addSpring(t),this.onSpringAdded.dispatch(t),t},removeSpring:function(t){return t instanceof o.Physics.P2.Spring||t instanceof o.Physics.P2.RotationalSpring?this.world.removeSpring(t.data):this.world.removeSpring(t),this.onSpringRemoved.dispatch(t),t},createDistanceConstraint:function(t,e,i,s,n,a){if(t=this.getBody(t),e=this.getBody(e),t&&e)return this.addConstraint(new o.Physics.P2.DistanceConstraint(this,t,e,i,s,n,a))},createGearConstraint:function(t,e,i,s){if(t=this.getBody(t),e=this.getBody(e),t&&e)return this.addConstraint(new o.Physics.P2.GearConstraint(this,t,e,i,s))},createRevoluteConstraint:function(t,e,i,s,n,a){if(t=this.getBody(t),i=this.getBody(i),t&&i)return this.addConstraint(new o.Physics.P2.RevoluteConstraint(this,t,e,i,s,n,a))},createLockConstraint:function(t,e,i,s,n){if(t=this.getBody(t),e=this.getBody(e),t&&e)return this.addConstraint(new o.Physics.P2.LockConstraint(this,t,e,i,s,n))},createPrismaticConstraint:function(t,e,i,s,n,a,r){if(t=this.getBody(t),e=this.getBody(e),t&&e)return this.addConstraint(new o.Physics.P2.PrismaticConstraint(this,t,e,i,s,n,a,r))},addConstraint:function(t){return this.world.addConstraint(t),this.onConstraintAdded.dispatch(t),t},removeConstraint:function(t){return this.world.removeConstraint(t),this.onConstraintRemoved.dispatch(t),t},addContactMaterial:function(t){return this.world.addContactMaterial(t),this.onContactMaterialAdded.dispatch(t),t},removeContactMaterial:function(t){return this.world.removeContactMaterial(t),this.onContactMaterialRemoved.dispatch(t),t},getContactMaterial:function(t,e){return this.world.getContactMaterial(t,e)},setMaterial:function(t,e){for(var i=e.length;i--;)e[i].setMaterial(t)},createMaterial:function(t,e){t=t||"";var i=new o.Physics.P2.Material(t);return this.materials.push(i),void 0!==e&&e.setMaterial(i),i},createContactMaterial:function(t,e,i){void 0===t&&(t=this.createMaterial()),void 0===e&&(e=this.createMaterial());var s=new o.Physics.P2.ContactMaterial(t,e,i);return this.addContactMaterial(s)},getBodies:function(){for(var t=[],e=this.world.bodies.length;e--;)t.push(this.world.bodies[e].parent);return t},getBody:function(t){return t instanceof p2.Body?t:t instanceof o.Physics.P2.Body?t.data:t.body&&t.body.type===o.Physics.P2JS?t.body.data:null},getSprings:function(){for(var t=[],e=this.world.springs.length;e--;)t.push(this.world.springs[e].parent);return t},getConstraints:function(){for(var t=[],e=this.world.constraints.length;e--;)t.push(this.world.constraints[e]);return t},hitTest:function(t,e,i,s){void 0===e&&(e=this.world.bodies),void 0===i&&(i=5),void 0===s&&(s=!1);for(var n=[this.pxmi(t.x),this.pxmi(t.y)],a=[],r=e.length;r--;)e[r]instanceof o.Physics.P2.Body&&(!s||e[r].data.type!==p2.Body.STATIC)?a.push(e[r].data):e[r]instanceof p2.Body&&e[r].parent&&(!s||e[r].type!==p2.Body.STATIC)?a.push(e[r]):e[r]instanceof o.Sprite&&e[r].hasOwnProperty("body")&&(!s||e[r].body.data.type!==p2.Body.STATIC)&&a.push(e[r].body.data);return this.world.hitTest(n,a,i)},toJSON:function(){return this.world.toJSON()},createCollisionGroup:function(t){var e=Math.pow(2,this._collisionGroupID);this.walls.left&&(this.walls.left.shapes[0].collisionMask=this.walls.left.shapes[0].collisionMask|e),this.walls.right&&(this.walls.right.shapes[0].collisionMask=this.walls.right.shapes[0].collisionMask|e),this.walls.top&&(this.walls.top.shapes[0].collisionMask=this.walls.top.shapes[0].collisionMask|e),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionMask=this.walls.bottom.shapes[0].collisionMask|e),this._collisionGroupID++;var i=new o.Physics.P2.CollisionGroup(e);return this.collisionGroups.push(i),t&&this.setCollisionGroup(t,i),i},setCollisionGroup:function(t,e){if(t instanceof o.Group)for(var i=0;i-1&&u.collides)if(s){var d=t.getTileRight(e,l,r);if(0===n&&(o=u.x*u.width,a=u.y*u.height,n=u.width),d&&d.collides)n+=u.width;else{var p=this.createBody(o,a,0,!1);p.addRectangle(n,u.height,n/2,u.height/2,0),i&&this.addBody(p),t.layers[e].bodies.push(p),n=0}}else{var p=this.createBody(u.x*u.width,u.y*u.height,0,!1);p.addRectangle(u.width,u.height,u.width/2,u.height/2,0),i&&this.addBody(p),t.layers[e].bodies.push(p)}}}return t.layers[e].bodies},mpx:function(t){return t*=20},pxm:function(t){return.05*t},mpxi:function(t){return t*=-20},pxmi:function(t){return-.05*t}},Object.defineProperty(o.Physics.P2.prototype,"friction",{get:function(){return this.world.defaultContactMaterial.friction},set:function(t){this.world.defaultContactMaterial.friction=t}}),Object.defineProperty(o.Physics.P2.prototype,"restitution",{get:function(){return this.world.defaultContactMaterial.restitution},set:function(t){this.world.defaultContactMaterial.restitution=t}}),Object.defineProperty(o.Physics.P2.prototype,"contactMaterial",{get:function(){return this.world.defaultContactMaterial},set:function(t){this.world.defaultContactMaterial=t}}),Object.defineProperty(o.Physics.P2.prototype,"applySpringForces",{get:function(){return this.world.applySpringForces},set:function(t){this.world.applySpringForces=t}}),Object.defineProperty(o.Physics.P2.prototype,"applyDamping",{get:function(){return this.world.applyDamping},set:function(t){this.world.applyDamping=t}}),Object.defineProperty(o.Physics.P2.prototype,"applyGravity",{get:function(){return this.world.applyGravity},set:function(t){this.world.applyGravity=t}}),Object.defineProperty(o.Physics.P2.prototype,"solveConstraints",{get:function(){return this.world.solveConstraints},set:function(t){this.world.solveConstraints=t}}),Object.defineProperty(o.Physics.P2.prototype,"time",{get:function(){return this.world.time}}),Object.defineProperty(o.Physics.P2.prototype,"emitImpactEvent",{get:function(){return this.world.emitImpactEvent},set:function(t){this.world.emitImpactEvent=t}}),Object.defineProperty(o.Physics.P2.prototype,"sleepMode",{get:function(){return this.world.sleepMode},set:function(t){this.world.sleepMode=t}}),Object.defineProperty(o.Physics.P2.prototype,"total",{get:function(){return this.world.bodies.length}}),o.Physics.P2.FixtureList=function(t){Array.isArray(t)||(t=[t]),this.rawList=t,this.init(),this.parse(this.rawList)},o.Physics.P2.FixtureList.prototype={init:function(){this.namedFixtures={},this.groupedFixtures=[],this.allFixtures=[]},setCategory:function(t,e){var i=function(e){e.collisionGroup=t};this.getFixtures(e).forEach(i)},setMask:function(t,e){var i=function(e){e.collisionMask=t};this.getFixtures(e).forEach(i)},setSensor:function(t,e){var i=function(e){e.sensor=t};this.getFixtures(e).forEach(i)},setMaterial:function(t,e){var i=function(e){e.material=t};this.getFixtures(e).forEach(i)},getFixtures:function(t){var e=[];if(t){t instanceof Array||(t=[t]);var i=this;return t.forEach(function(t){i.namedFixtures[t]&&e.push(i.namedFixtures[t])}),this.flatten(e)}return this.allFixtures},getFixtureByKey:function(t){return this.namedFixtures[t]},getGroup:function(t){return this.groupedFixtures[t]},parse:function(){var t,e,i,s;i=this.rawList,s=[];for(t in i)e=i[t],isNaN(t-0)?this.namedFixtures[t]=this.flatten(e):(this.groupedFixtures[t]=this.groupedFixtures[t]||[],this.groupedFixtures[t]=this.groupedFixtures[t].concat(e)),s.push(this.allFixtures=this.flatten(this.groupedFixtures))},flatten:function(t){var e,i;return e=[],i=arguments.callee,t.forEach(function(t){return Array.prototype.push.apply(e,Array.isArray(t)?i(t):[t])}),e}},o.Physics.P2.PointProxy=function(t,e){this.world=t,this.destination=e},o.Physics.P2.PointProxy.prototype.constructor=o.Physics.P2.PointProxy,Object.defineProperty(o.Physics.P2.PointProxy.prototype,"x",{get:function(){return this.world.mpx(this.destination[0])},set:function(t){this.destination[0]=this.world.pxm(t)}}),Object.defineProperty(o.Physics.P2.PointProxy.prototype,"y",{get:function(){return this.world.mpx(this.destination[1])},set:function(t){this.destination[1]=this.world.pxm(t)}}),Object.defineProperty(o.Physics.P2.PointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(t){this.destination[0]=t}}),Object.defineProperty(o.Physics.P2.PointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(t){this.destination[1]=t}}),o.Physics.P2.InversePointProxy=function(t,e){this.world=t,this.destination=e},o.Physics.P2.InversePointProxy.prototype.constructor=o.Physics.P2.InversePointProxy,Object.defineProperty(o.Physics.P2.InversePointProxy.prototype,"x",{get:function(){return this.world.mpxi(this.destination[0])},set:function(t){this.destination[0]=this.world.pxmi(t)}}),Object.defineProperty(o.Physics.P2.InversePointProxy.prototype,"y",{get:function(){return this.world.mpxi(this.destination[1])},set:function(t){this.destination[1]=this.world.pxmi(t)}}),Object.defineProperty(o.Physics.P2.InversePointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(t){this.destination[0]=-t}}),Object.defineProperty(o.Physics.P2.InversePointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(t){this.destination[1]=-t}}),o.Physics.P2.Body=function(t,e,i,s,n){e=e||null,i=i||0,s=s||0,void 0===n&&(n=1),this.game=t,this.world=t.physics.p2,this.sprite=e,this.type=o.Physics.P2JS,this.offset=new o.Point,this.data=new p2.Body({position:[this.world.pxmi(i),this.world.pxmi(s)],mass:n}),this.data.parent=this,this.velocity=new o.Physics.P2.InversePointProxy(this.world,this.data.velocity),this.force=new o.Physics.P2.InversePointProxy(this.world,this.data.force),this.gravity=new o.Point,this.onBeginContact=new o.Signal,this.onEndContact=new o.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,e&&(this.setRectangleFromSprite(e),e.exists&&this.game.physics.p2.addBody(this))},o.Physics.P2.Body.prototype={createBodyCallback:function(t,e,i){var s=-1;t.id?s=t.id:t.body&&(s=t.body.id),s>-1&&(null===e?(delete this._bodyCallbacks[s],delete this._bodyCallbackContext[s]):(this._bodyCallbacks[s]=e,this._bodyCallbackContext[s]=i))},createGroupCallback:function(t,e,i){null===e?(delete this._groupCallbacks[t.mask],delete this._groupCallbackContext[t.mask]):(this._groupCallbacks[t.mask]=e,this._groupCallbackContext[t.mask]=i)},getCollisionMask:function(){var t=0;this._collideWorldBounds&&(t=this.game.physics.p2.boundsCollisionGroup.mask);for(var e=0;e=0;i--)this.data.shapes[i].collisionMask=e;else t.collisionMask=e},setCollisionGroup:function(t,e){var i=this.getCollisionMask();if(void 0===e)for(var s=this.data.shapes.length-1;s>=0;s--)this.data.shapes[s].collisionGroup=t.mask,this.data.shapes[s].collisionMask=i;else e.collisionGroup=t.mask,e.collisionMask=i},clearCollision:function(t,e,i){if(void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i)for(var s=this.data.shapes.length-1;s>=0;s--)t&&(this.data.shapes[s].collisionGroup=null),e&&(this.data.shapes[s].collisionMask=null);else t&&(i.collisionGroup=null),e&&(i.collisionMask=null);t&&(this.collidesWith.length=0)},removeCollisionGroup:function(t,e,i){void 0===e&&(e=!0);var s;if(Array.isArray(t))for(var n=0;n-1&&(this.collidesWith.splice(s,1),e&&(delete this._groupCallbacks[t.mask],delete this._groupCallbackContext[t.mask]));else(s=this.collidesWith.indexOf(t))>-1&&(this.collidesWith.splice(s,1),e&&(delete this._groupCallbacks[t.mask],delete this._groupCallbackContext[t.mask]));var o=this.getCollisionMask();if(void 0===i)for(var n=this.data.shapes.length-1;n>=0;n--)this.data.shapes[n].collisionMask=o;else i.collisionMask=o},collides:function(t,e,i,s){if(Array.isArray(t))for(var n=0;n=0;n--)this.data.shapes[n].collisionMask=o;else s.collisionMask=o},adjustCenterOfMass:function(){this.data.adjustCenterOfMass(),this.shapeChanged()},getVelocityAtPoint:function(t,e){return this.data.getVelocityAtPoint(t,e)},applyDamping:function(t){this.data.applyDamping(t)},applyImpulse:function(t,e,i){this.data.applyImpulse(t,[this.world.pxmi(e),this.world.pxmi(i)])},applyImpulseLocal:function(t,e,i){this.data.applyImpulseLocal(t,[this.world.pxmi(e),this.world.pxmi(i)])},applyForce:function(t,e,i){this.data.applyForce(t,[this.world.pxmi(e),this.world.pxmi(i)])},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(t,e){return this.data.toLocalFrame(t,e)},toWorldFrame:function(t,e){return this.data.toWorldFrame(t,e)},rotateLeft:function(t){this.data.angularVelocity=this.world.pxm(-t)},rotateRight:function(t){this.data.angularVelocity=this.world.pxm(t)},moveForward:function(t){var e=this.world.pxmi(-t),i=this.data.angle+Math.PI/2;this.data.velocity[0]=e*Math.cos(i),this.data.velocity[1]=e*Math.sin(i)},moveBackward:function(t){var e=this.world.pxmi(-t),i=this.data.angle+Math.PI/2;this.data.velocity[0]=-e*Math.cos(i),this.data.velocity[1]=-e*Math.sin(i)},thrust:function(t){var e=this.world.pxmi(-t),i=this.data.angle+Math.PI/2;this.data.force[0]+=e*Math.cos(i),this.data.force[1]+=e*Math.sin(i)},thrustLeft:function(t){var e=this.world.pxmi(-t),i=this.data.angle;this.data.force[0]+=e*Math.cos(i),this.data.force[1]+=e*Math.sin(i)},thrustRight:function(t){var e=this.world.pxmi(-t),i=this.data.angle;this.data.force[0]-=e*Math.cos(i),this.data.force[1]-=e*Math.sin(i)},reverse:function(t){var e=this.world.pxmi(-t),i=this.data.angle+Math.PI/2;this.data.force[0]-=e*Math.cos(i),this.data.force[1]-=e*Math.sin(i)},moveLeft:function(t){this.data.velocity[0]=this.world.pxmi(-t)},moveRight:function(t){this.data.velocity[0]=this.world.pxmi(t)},moveUp:function(t){this.data.velocity[1]=this.world.pxmi(-t)},moveDown:function(t){this.data.velocity[1]=this.world.pxmi(t)},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(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=!1),this.setZeroForce(),this.setZeroVelocity(),this.setZeroRotation(),i&&this.setZeroDamping(),s&&(this.mass=1),this.x=t,this.y=e},addToWorld:function(){if(this.game.physics.p2._toRemove)for(var t=0;t=0;i--)this.data.shapes[i].material=t;else e.material=t},shapeChanged:function(){this.debugBody&&this.debugBody.draw()},addPhaserPolygon:function(t,e){for(var i=this.game.cache.getPhysicsData(t,e),s=[],n=0;nf;n=0<=f?++p:--p)c=e.vertices[n],p2.vec2.rotate(d,c,t),u.push([(d[0]+h[0])*this.ppu,-(d[1]+h[1])*this.ppu]);this.drawConvex(l,u,e.triangles,o,i,a,this.settings.debugPolygons,[h[0]*this.ppu,-h[1]*this.ppu])}s++}}},drawRectangle:function(t,e,i,s,n,o,a,r,h){void 0===h&&(h=1),void 0===a&&(a=0),t.lineStyle(h,a,1),t.beginFill(r),t.drawRect(e-n/2,i-o/2,n,o)},drawCircle:function(t,e,i,s,n,o,a){void 0===a&&(a=1),void 0===o&&(o=16777215),t.lineStyle(a,0,1),t.beginFill(o,1),t.drawCircle(e,i,2*-n),t.endFill(),t.moveTo(e,i),t.lineTo(e+n*Math.cos(-s),i+n*Math.sin(-s))},drawLine:function(t,e,i,s){void 0===s&&(s=1),void 0===i&&(i=0),t.lineStyle(5*s,i,1),t.moveTo(-e/2,0),t.lineTo(e/2,0)},drawConvex:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,y,g,m,v;if(void 0===o&&(o=1),void 0===s&&(s=0),a){for(h=[16711680,65280,255],l=0;l!==e.length+1;)u=e[l%e.length],d=e[(l+1)%e.length],f=u[0],m=u[1],y=d[0],v=d[1],t.lineStyle(o,h[l%h.length],1),t.moveTo(f,-m),t.lineTo(y,-v),t.drawCircle(f,-m,2*o),l++;return t.lineStyle(o,0,1),t.drawCircle(r[0],r[1],2*o)}for(t.lineStyle(o,s,1),t.beginFill(n),l=0;l!==e.length;)c=e[l],p=c[0],g=c[1],0===l?t.moveTo(p,-g):t.lineTo(p,-g),l++;if(t.endFill(),e.length>2)return t.moveTo(e[e.length-1][0],-e[e.length-1][1]),t.lineTo(e[0][0],-e[0][1])},drawPath:function(t,e,i,s,n){var o,a,r,h,l,c,u,d,p,f,y,g,m;for(void 0===n&&(n=1),void 0===i&&(i=0),t.lineStyle(n,i,1),"number"==typeof s&&t.beginFill(s),r=null,h=null,a=0;a2&&"number"==typeof s&&(t.moveTo(e[e.length-1][0],e[e.length-1][1]),t.lineTo(e[0][0],e[0][1]))},drawPlane:function(t,e,i,s,n,o,a,r,h,l){var c,u,d;void 0===o&&(o=1),void 0===s&&(s=16777215),t.lineStyle(o,n,11),t.beginFill(s),c=h,t.moveTo(e,-i),u=e+Math.cos(l)*this.game.width,d=i+Math.sin(l)*this.game.height,t.lineTo(u,-d),t.moveTo(e,-i),u=e+Math.cos(l)*-this.game.width,d=i+Math.sin(l)*-this.game.height,t.lineTo(u,-d)},drawCapsule:function(t,e,i,s,n,o,a,r,h){void 0===h&&(h=1),void 0===a&&(a=0),t.lineStyle(h,a,1);var l=Math.cos(s),c=Math.sin(s);t.beginFill(r,1),t.drawCircle(-n/2*l+e,-n/2*c+i,2*-o),t.drawCircle(n/2*l+e,n/2*c+i,2*-o),t.endFill(),t.lineStyle(h,a,0),t.beginFill(r,1),t.moveTo(-n/2*l+o*c+e,-n/2*c+o*l+i),t.lineTo(n/2*l+o*c+e,n/2*c+o*l+i),t.lineTo(n/2*l-o*c+e,n/2*c-o*l+i),t.lineTo(-n/2*l-o*c+e,-n/2*c-o*l+i),t.endFill(),t.lineStyle(h,a,1),t.moveTo(-n/2*l+o*c+e,-n/2*c+o*l+i),t.lineTo(n/2*l+o*c+e,n/2*c+o*l+i),t.moveTo(-n/2*l-o*c+e,-n/2*c-o*l+i),t.lineTo(n/2*l-o*c+e,n/2*c-o*l+i)},randomPastelHex:function(){var t,e,i,s;return i=[255,255,255],s=Math.floor(256*Math.random()),e=Math.floor(256*Math.random()),t=Math.floor(256*Math.random()),s=Math.floor((s+3*i[0])/4),e=Math.floor((e+3*i[1])/4),t=Math.floor((t+3*i[2])/4),this.rgbToHex(s,e,t)},rgbToHex:function(t,e,i){return this.componentToHex(t)+this.componentToHex(e)+this.componentToHex(i)},componentToHex:function(t){var e;return e=t.toString(16),2===e.length?e:e+"0"}}),o.Physics.P2.Spring=function(t,e,i,s,n,o,a,r,h,l){this.game=t.game,this.world=t,void 0===s&&(s=1),void 0===n&&(n=100),void 0===o&&(o=1),s=t.pxm(s);var c={restLength:s,stiffness:n,damping:o};void 0!==a&&null!==a&&(c.worldAnchorA=[t.pxm(a[0]),t.pxm(a[1])]),void 0!==r&&null!==r&&(c.worldAnchorB=[t.pxm(r[0]),t.pxm(r[1])]),void 0!==h&&null!==h&&(c.localAnchorA=[t.pxm(h[0]),t.pxm(h[1])]),void 0!==l&&null!==l&&(c.localAnchorB=[t.pxm(l[0]),t.pxm(l[1])]),this.data=new p2.LinearSpring(e,i,c),this.data.parent=this},o.Physics.P2.Spring.prototype.constructor=o.Physics.P2.Spring,o.Physics.P2.RotationalSpring=function(t,e,i,s,n,o){this.game=t.game,this.world=t,void 0===s&&(s=null),void 0===n&&(n=100),void 0===o&&(o=1),s&&(s=t.pxm(s));var a={restAngle:s,stiffness:n,damping:o};this.data=new p2.RotationalSpring(e,i,a),this.data.parent=this},o.Physics.P2.Spring.prototype.constructor=o.Physics.P2.Spring,o.Physics.P2.Material=function(t){this.name=t,p2.Material.call(this)},o.Physics.P2.Material.prototype=Object.create(p2.Material.prototype),o.Physics.P2.Material.prototype.constructor=o.Physics.P2.Material,o.Physics.P2.ContactMaterial=function(t,e,i){p2.ContactMaterial.call(this,t,e,i)},o.Physics.P2.ContactMaterial.prototype=Object.create(p2.ContactMaterial.prototype),o.Physics.P2.ContactMaterial.prototype.constructor=o.Physics.P2.ContactMaterial,o.Physics.P2.CollisionGroup=function(t){this.mask=t},o.Physics.P2.DistanceConstraint=function(t,e,i,s,n,o,a){void 0===s&&(s=100),void 0===n&&(n=[0,0]),void 0===o&&(o=[0,0]),void 0===a&&(a=Number.MAX_VALUE),this.game=t.game,this.world=t,s=t.pxm(s),n=[t.pxmi(n[0]),t.pxmi(n[1])],o=[t.pxmi(o[0]),t.pxmi(o[1])];var r={distance:s,localAnchorA:n,localAnchorB:o,maxForce:a};p2.DistanceConstraint.call(this,e,i,r)},o.Physics.P2.DistanceConstraint.prototype=Object.create(p2.DistanceConstraint.prototype),o.Physics.P2.DistanceConstraint.prototype.constructor=o.Physics.P2.DistanceConstraint,o.Physics.P2.GearConstraint=function(t,e,i,s,n){void 0===s&&(s=0),void 0===n&&(n=1),this.game=t.game,this.world=t;var o={angle:s,ratio:n};p2.GearConstraint.call(this,e,i,o)},o.Physics.P2.GearConstraint.prototype=Object.create(p2.GearConstraint.prototype),o.Physics.P2.GearConstraint.prototype.constructor=o.Physics.P2.GearConstraint,o.Physics.P2.LockConstraint=function(t,e,i,s,n,o){void 0===s&&(s=[0,0]),void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE),this.game=t.game,this.world=t,s=[t.pxm(s[0]),t.pxm(s[1])];var a={localOffsetB:s,localAngleB:n,maxForce:o};p2.LockConstraint.call(this,e,i,a)},o.Physics.P2.LockConstraint.prototype=Object.create(p2.LockConstraint.prototype),o.Physics.P2.LockConstraint.prototype.constructor=o.Physics.P2.LockConstraint,o.Physics.P2.PrismaticConstraint=function(t,e,i,s,n,o,a,r){void 0===s&&(s=!0),void 0===n&&(n=[0,0]),void 0===o&&(o=[0,0]),void 0===a&&(a=[0,0]),void 0===r&&(r=Number.MAX_VALUE),this.game=t.game,this.world=t,n=[t.pxmi(n[0]),t.pxmi(n[1])],o=[t.pxmi(o[0]),t.pxmi(o[1])];var h={localAnchorA:n,localAnchorB:o,localAxisA:a,maxForce:r,disableRotationalLock:!s};p2.PrismaticConstraint.call(this,e,i,h)},o.Physics.P2.PrismaticConstraint.prototype=Object.create(p2.PrismaticConstraint.prototype),o.Physics.P2.PrismaticConstraint.prototype.constructor=o.Physics.P2.PrismaticConstraint,o.Physics.P2.RevoluteConstraint=function(t,e,i,s,n,o,a){void 0===o&&(o=Number.MAX_VALUE),void 0===a&&(a=null),this.game=t.game,this.world=t,i=[t.pxmi(i[0]),t.pxmi(i[1])],n=[t.pxmi(n[0]),t.pxmi(n[1])],a&&(a=[t.pxmi(a[0]),t.pxmi(a[1])]);var r={worldPivot:a,localPivotA:i,localPivotB:n,maxForce:o};p2.RevoluteConstraint.call(this,e,s,r)},o.Physics.P2.RevoluteConstraint.prototype=Object.create(p2.RevoluteConstraint.prototype),o.Physics.P2.RevoluteConstraint.prototype.constructor=o.Physics.P2.RevoluteConstraint,o.ImageCollection=function(t,e,i,s,n,o,a){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===o&&(o=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|o,this.properties=a||{},this.images=[],this.total=0},o.ImageCollection.prototype={containsImageIndex:function(t){return t>=this.firstgid&&tthis.right||e>this.bottom)},intersects:function(t,e,i,s){return!(i<=this.worldX)&&(!(s<=this.worldY)&&(!(t>=this.worldX+this.width)&&!(e>=this.worldY+this.height)))},setCollisionCallback:function(t,e){this.collisionCallback=t,this.collisionCallbackContext=e},destroy:function(){this.collisionCallback=null,this.collisionCallbackContext=null,this.properties=null},setCollision:function(t,e,i,s){this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s},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(t,e){return t&&e?this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.faceTop||this.faceBottom||this.faceLeft||this.faceRight||this.collisionCallback:t?this.collideLeft||this.collideRight||this.collideUp||this.collideDown:!!e&&(this.faceTop||this.faceBottom||this.faceLeft||this.faceRight)},copy:function(t){this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext}},o.Tile.prototype.constructor=o.Tile,Object.defineProperty(o.Tile.prototype,"collides",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}}),Object.defineProperty(o.Tile.prototype,"canCollide",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}}),Object.defineProperty(o.Tile.prototype,"left",{get:function(){return this.worldX}}),Object.defineProperty(o.Tile.prototype,"right",{get:function(){return this.worldX+this.width}}),Object.defineProperty(o.Tile.prototype,"top",{get:function(){return this.worldY}}),Object.defineProperty(o.Tile.prototype,"bottom",{get:function(){return this.worldY+this.height}}),o.Tilemap=function(t,e,i,s,n,a){this.game=t,this.key=e;var r=o.TilemapParser.parse(this.game,e,i,s,n,a);null!==r&&(this.width=r.width,this.height=r.height,this.tileWidth=r.tileWidth,this.tileHeight=r.tileHeight,this.orientation=r.orientation,this.format=r.format,this.version=r.version,this.properties=r.properties,this.widthInPixels=r.widthInPixels,this.heightInPixels=r.heightInPixels,this.layers=r.layers,this.tilesets=r.tilesets,this.imagecollections=r.imagecollections,this.tiles=r.tiles,this.objects=r.objects,this.collideIndexes=[],this.collision=r.collision,this.images=r.images,this.enableDebug=!1,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},o.Tilemap.CSV=0,o.Tilemap.TILED_JSON=1,o.Tilemap.NORTH=0,o.Tilemap.EAST=1,o.Tilemap.SOUTH=2,o.Tilemap.WEST=3,o.Tilemap.prototype={create:function(t,e,i,s,n,o){return void 0===o&&(o=this.game.world),this.width=e,this.height=i,this.setTileSize(s,n),this.layers.length=0,this.createBlankLayer(t,e,i,s,n,o)},setTileSize:function(t,e){this.tileWidth=t,this.tileHeight=e,this.widthInPixels=this.width*t,this.heightInPixels=this.height*e},addTilesetImage:function(t,e,i,s,n,a,r){if(void 0===t)return null;void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===n&&(n=0),void 0===a&&(a=0),void 0===r&&(r=0),0===i&&(i=32),0===s&&(s=32);var h=null;if(void 0!==e&&null!==e||(e=t),e instanceof o.BitmapData)h=e.canvas;else{if(!this.game.cache.checkImageKey(e))return null;h=this.game.cache.getImage(e)}var l=this.getTilesetIndex(t);if(null===l&&this.format===o.Tilemap.TILED_JSON)return null;if(this.tilesets[l])return this.tilesets[l].setImage(h),this.tilesets[l];var c=new o.Tileset(t,r,i,s,n,a,{});c.setImage(h),this.tilesets.push(c);for(var u=this.tilesets.length-1,d=n,p=n,f=0,y=0,g=0,m=r;m1)for(u=0;uthis.layers.length)){void 0===e||e<=0?e=Math.min(this.game.width,this.layers[n].widthInPixels):e>this.game.width&&(e=this.game.width),void 0===i||i<=0?i=Math.min(this.game.height,this.layers[n].heightInPixels):i>this.game.height&&(i=this.game.height),this.enableDebug;var a=s.add(new o.TilemapLayer(this.game,this,n,e,i));return this.enableDebug,a}},createBlankLayer:function(t,e,i,s,n,a){if(void 0===a&&(a=this.game.world),null===this.getLayerIndex(t)){for(var r={name:t,x:0,y:0,width:e,height:i,widthInPixels:e*s,heightInPixels:i*n,alpha:1,visible:!0,properties:{},indexes:[],callbacks:[],bodies:[],data:null},h,l=[],c=0;cthis.game.width&&(d=this.game.width),p>this.game.height&&(p=this.game.height);var l=new o.TilemapLayer(this.game,this,this.layers.length-1,d,p);return l.name=t,a.add(l)}},getIndex:function(t,e){for(var i=0;ie)){for(var o=t;o<=e;o++)this.setCollisionByIndex(o,i,s,!1);n&&this.calculateFaces(s)}},setCollisionByExclusion:function(t,e,i,s){void 0===e&&(e=!0),void 0===s&&(s=!0),i=this.getLayer(i);for(var n=0,o=this.tiles.length;n-1&&this.collideIndexes.splice(n,1)}for(var o=0;o0?this.layers[t].data[i-1][e]:null},getTileBelow:function(t,e,i){return i0?this.layers[t].data[i][e-1]:null},getTileRight:function(t,e,i){return e-1},removeTile:function(t,e,i){if(i=this.getLayer(i),t>=0&&t=0&&e=0&&e=0&&i-1?this.layers[s].data[i][e].setCollision(!0,!0,!0,!0):this.layers[s].data[i][e].resetCollision(),this.layers[s].dirty=!0,this.calculateFaces(s),this.layers[s].data[i][e]}return null},putTileWorldXY:function(t,e,i,s,n,o){return o=this.getLayer(o),e=this.game.math.snapToFloor(e,s)/s,i=this.game.math.snapToFloor(i,n)/n,this.putTile(t,e,i,o)},searchTileIndex:function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1),s=this.getLayer(s);var n=0;if(i){for(var o=this.layers[s].height-1;o>=0;o--)for(var a=this.layers[s].width-1;a>=0;a--)if(this.layers[s].data[o][a].index===t){if(n===e)return this.layers[s].data[o][a];n++}}else for(var o=0;o=0&&t=0&&ethis.layers[n].width&&(i=this.layers[n].width),s>this.layers[n].height&&(s=this.layers[n].height),this._results.length=0,this._results.push({x:t,y:e,width:i,height:s,layer:n});for(var o=e;o1?this.debugMap[this.layers[this.currentLayer].data[i][s]]?e.push("background: "+this.debugMap[this.layers[this.currentLayer].data[i][s]]):e.push("background: #ffffff"):e.push("background: rgb(0, 0, 0)");t+="\n"}e[0]=t},destroy:function(){this.removeAllLayers(),this.data=[],this.game=null}},o.Tilemap.prototype.constructor=o.Tilemap,Object.defineProperty(o.Tilemap.prototype,"layer",{get:function(){return this.layers[this.currentLayer]},set:function(t){t!==this.currentLayer&&this.setLayer(t)}}),o.TilemapLayer=function(t,e,i,s,n){s|=0,n|=0,o.Sprite.call(this,t,0,0),this.map=e,this.index=i,this.layer=e.layers[i],this.canvas=PIXI.CanvasPool.create(this,s,n),this.context=this.canvas.getContext("2d"),this.setTexture(new PIXI.Texture(new PIXI.BaseTexture(this.canvas))),this.type=o.TILEMAPLAYER,this.physicsType=o.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:e.tileWidth,tileHeight:e.tileHeight,cw:e.tileWidth,ch:e.tileHeight,tilesets:[]},this._scrollX=0,this._scrollY=0,this._results=[],t.device.canvasBitBltShift||(this.renderSettings.copyCanvas=o.TilemapLayer.ensureSharedCopyCanvas()),this.fixedToCamera=!0},o.TilemapLayer.prototype=Object.create(o.Sprite.prototype),o.TilemapLayer.prototype.constructor=o.TilemapLayer,o.TilemapLayer.prototype.preUpdateCore=o.Component.Core.preUpdate,o.TilemapLayer.sharedCopyCanvas=null,o.TilemapLayer.ensureSharedCopyCanvas=function(){return this.sharedCopyCanvas||(this.sharedCopyCanvas=PIXI.CanvasPool.create(this,2,2)),this.sharedCopyCanvas},o.TilemapLayer.prototype.preUpdate=function(){return this.preUpdateCore()},o.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},o.TilemapLayer.prototype._renderCanvas=function(t){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,t)},o.TilemapLayer.prototype._renderWebGL=function(t){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,t)},o.TilemapLayer.prototype.destroy=function(){PIXI.CanvasPool.remove(this),o.Component.Destroy.prototype.destroy.call(this)},o.TilemapLayer.prototype.resize=function(t,e){this.canvas.width=t,this.canvas.height=e,this.texture.frame.resize(t,e),this.texture.width=t,this.texture.height=e,this.texture.crop.width=t,this.texture.crop.height=e,this.texture.baseTexture.width=t,this.texture.baseTexture.height=e,this.texture.baseTexture.dirty(),this.texture.requiresUpdate=!0,this.texture._updateUvs(),this.dirty=!0},o.TilemapLayer.prototype.resizeWorld=function(){this.game.world.setBounds(0,0,this.layer.widthInPixels*this.scale.x,this.layer.heightInPixels*this.scale.y)},o.TilemapLayer.prototype._fixX=function(t){return 1===this.scrollFactorX||0===this.scrollFactorX&&0===this.position.x?t:0===this.scrollFactorX&&0!==this.position.x?t-this.position.x:this._scrollX+(t-this._scrollX/this.scrollFactorX)},o.TilemapLayer.prototype._unfixX=function(t){return 1===this.scrollFactorX?t:this._scrollX/this.scrollFactorX+(t-this._scrollX)},o.TilemapLayer.prototype._fixY=function(t){return 1===this.scrollFactorY||0===this.scrollFactorY&&0===this.position.y?t:0===this.scrollFactorY&&0!==this.position.y?t-this.position.y:this._scrollY+(t-this._scrollY/this.scrollFactorY)},o.TilemapLayer.prototype._unfixY=function(t){return 1===this.scrollFactorY?t:this._scrollY/this.scrollFactorY+(t-this._scrollY)},o.TilemapLayer.prototype.getTileX=function(t){return Math.floor(this._fixX(t)/this._mc.tileWidth)},o.TilemapLayer.prototype.getTileY=function(t){return Math.floor(this._fixY(t)/this._mc.tileHeight)},o.TilemapLayer.prototype.getTileXY=function(t,e,i){return i.x=this.getTileX(t),i.y=this.getTileY(e),i},o.TilemapLayer.prototype.getRayCastTiles=function(t,e,i,s){e||(e=this.rayStepRate),void 0===i&&(i=!1),void 0===s&&(s=!1);var n=this.getTiles(t.x,t.y,t.width,t.height,i,s);if(0===n.length)return[];for(var o=t.coordinatesOnLine(e),a=[],r=0;r=0;x++,w--,v+=c){x>=h&&(x-=h);var P=this.layer.data[x];for(b=y,_=n-i,m=p;_>=0;b++,_--,m+=l){b>=r&&(b-=r);var C=P[b];if(C&&!(C.index<0)){var T=C.index,S=u[T];void 0===S&&(S=this.resolveTileset(T)),C.alpha===d||this.debug||(a.globalAlpha=C.alpha,d=C.alpha),S?C.rotation||C.flipped?(a.save(),a.translate(m+C.centerX,v+C.centerY),a.rotate(C.rotation),C.flipped&&a.scale(-1,1),S.draw(a,-C.centerX,-C.centerY,T),a.restore()):S.draw(a,m,v,T):this.debugSettings.missingImageFill&&(a.fillStyle=this.debugSettings.missingImageFill,a.fillRect(m,v,l,c)),C.debug&&this.debugSettings.debuggedTileOverfill&&(a.fillStyle=this.debugSettings.debuggedTileOverfill,a.fillRect(m,v,l,c))}}}},o.TilemapLayer.prototype.renderDeltaScroll=function(t,e){var i=this._mc.scrollX,s=this._mc.scrollY,n=this.canvas.width,o=this.canvas.height,a=this._mc.tileWidth,r=this._mc.tileHeight,h=0,l=-a,c=0,u=-r;if(t<0?(h=n+t,l=n-1):t>0&&(l=t),e<0?(c=o+e,u=o-1):e>0&&(u=e),this.shiftCanvas(this.context,t,e),h=Math.floor((h+i)/a),l=Math.floor((l+i)/a),c=Math.floor((c+s)/r),u=Math.floor((u+s)/r),h<=l){this.context.clearRect(h*a-i,0,(l-h+1)*a,o);var d=Math.floor((0+s)/r),p=Math.floor((o-1+s)/r);this.renderRegion(i,s,h,d,l,p)}if(c<=u){this.context.clearRect(0,c*r-s,n,(u-c+1)*r);var f=Math.floor((0+i)/a),y=Math.floor((n-1+i)/a);this.renderRegion(i,s,f,c,y,u)}},o.TilemapLayer.prototype.renderFull=function(){var t=this._mc.scrollX,e=this._mc.scrollY,i=this.canvas.width,s=this.canvas.height,n=this._mc.tileWidth,o=this._mc.tileHeight,a=Math.floor(t/n),r=Math.floor((i-1+t)/n),h=Math.floor(e/o),l=Math.floor((s-1+e)/o);this.context.clearRect(0,0,i,s),this.renderRegion(t,e,a,h,r,l)},o.TilemapLayer.prototype.render=function(){var t=!1;if(this.visible){(this.dirty||this.layer.dirty)&&(this.layer.dirty=!1,t=!0);var e=this.canvas.width,i=this.canvas.height,s=0|this._scrollX,n=0|this._scrollY,o=this._mc,a=o.scrollX-s,r=o.scrollY-n;if(t||0!==a||0!==r||o.renderWidth!==e||o.renderHeight!==i)return this.context.save(),o.scrollX=s,o.scrollY=n,o.renderWidth===e&&o.renderHeight===i||(o.renderWidth=e,o.renderHeight=i),this.debug&&(this.context.globalAlpha=this.debugSettings.debugAlpha,this.debugSettings.forceFullRedraw&&(t=!0)),!t&&this.renderSettings.enableScrollDelta&&Math.abs(a)+Math.abs(r)=0;x++,w--,v+=h){x>=a&&(x-=a);var P=this.layer.data[x];for(b=y,_=c-l,m=p;_>=0;b++,_--,m+=r){b>=o&&(b-=o);var C=P[b];!C||C.index<0||!C.collides||(this.debugSettings.collidingTileOverfill&&(i.fillStyle=this.debugSettings.collidingTileOverfill,i.fillRect(m,v,this._mc.cw,this._mc.ch)),this.debugSettings.facingEdgeStroke&&(i.beginPath(),C.faceTop&&(i.moveTo(m,v),i.lineTo(m+this._mc.cw,v)),C.faceBottom&&(i.moveTo(m,v+this._mc.ch),i.lineTo(m+this._mc.cw,v+this._mc.ch)),C.faceLeft&&(i.moveTo(m,v),i.lineTo(m,v+this._mc.ch)),C.faceRight&&(i.moveTo(m+this._mc.cw,v),i.lineTo(m+this._mc.cw,v+this._mc.ch)),i.closePath(),i.stroke()))}}},Object.defineProperty(o.TilemapLayer.prototype,"wrap",{get:function(){return this._wrap},set:function(t){this._wrap=t,this.dirty=!0}}),Object.defineProperty(o.TilemapLayer.prototype,"scrollX",{get:function(){return this._scrollX},set:function(t){this._scrollX=t}}),Object.defineProperty(o.TilemapLayer.prototype,"scrollY",{get:function(){return this._scrollY},set:function(t){this._scrollY=t}}),Object.defineProperty(o.TilemapLayer.prototype,"collisionWidth",{get:function(){return this._mc.cw},set:function(t){this._mc.cw=0|t,this.dirty=!0}}),Object.defineProperty(o.TilemapLayer.prototype,"collisionHeight",{get:function(){return this._mc.ch},set:function(t){this._mc.ch=0|t,this.dirty=!0}}),o.TilemapParser={INSERT_NULL:!1,parse:function(t,e,i,s,n,a){if(void 0===i&&(i=32),void 0===s&&(s=32),void 0===n&&(n=10),void 0===a&&(a=10),void 0===e)return this.getEmptyData();if(null===e)return this.getEmptyData(i,s,n,a);var r=t.cache.getTilemapData(e);if(r){if(r.format===o.Tilemap.CSV)return this.parseCSV(e,r.data,i,s);if(!r.format||r.format===o.Tilemap.TILED_JSON)return this.parseTiledJSON(r.data)}},parseCSV:function(t,e,i,s){var n=this.getEmptyData();e=e.trim();for(var a=[],r=e.split("\n"),h=r.length,l=0,c=0;c>>0;a.data=l,delete a.encoding}else if(a.compression)continue;var u={name:a.name,x:a.x,y:a.y,width:a.width,height:a.height,widthInPixels:a.width*t.tilewidth,heightInPixels:a.height*t.tileheight,alpha:a.opacity,visible:a.visible,properties:{},indexes:[],callbacks:[],bodies:[]};a.properties&&(u.properties=a.properties);for(var d=0,p=[],f=[],y,g,m,v,b=0,h=a.data.length;b536870912)switch(v>2147483648&&(v-=2147483648,m+=4),v>1073741824&&(v-=1073741824,m+=2),v>536870912&&(v-=536870912,m+=1),m){case 5:y=Math.PI/2;break;case 6:y=Math.PI;break;case 3:y=3*Math.PI/2;break;case 4:y=0,g=!0;break;case 7:y=Math.PI/2,g=!0;break;case 2:y=Math.PI,g=!0;break;case 1:y=3*Math.PI/2,g=!0}if(v>0){var x=new o.Tile(u,v,d,f.length,t.tilewidth,t.tileheight);x.rotation=y,x.flipped=g,0!==m&&(x.flippedVal=m),p.push(x)}else o.TilemapParser.INSERT_NULL?p.push(null):p.push(new o.Tile(u,-1,d,f.length,t.tilewidth,t.tileheight));d++,d===a.width&&(f.push(p),d=0,p=[])}u.data=f,s.push(u)}i.layers=s;for(var _=[],n=0;n=0&&n+1=this.firstgid&&t=this._timer)if(this._timer=this.game.time.time+this.frequency*this.game.time.slowMotion,0!==this._flowTotal)if(this._flowQuantity>0){for(var t=0;t=this._flowTotal)){this.on=!1;break}}else this.emitParticle()&&(this._counter++,-1!==this._flowTotal&&this._counter>=this._flowTotal&&(this.on=!1));else this.emitParticle()&&(this._counter++,this._quantity>0&&this._counter>=this._quantity&&(this.on=!1));for(var t=this.children.length;t--;)this.children[t].exists&&this.children[t].update()},o.Particles.Arcade.Emitter.prototype.makeParticles=function(t,e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=this.maxParticles),void 0===s&&(s=!1),void 0===n&&(n=!1);var o,a=0,r=t,h=e;for(this._frames=e,i>this.maxParticles&&(this.maxParticles=i);athis.maxParticles&&(i=this.maxParticles),this._counter=0,this._flowQuantity=i,this._flowTotal=s,n?(this.start(!0,t,e,i),this._counter+=i,this.on=!0,this._timer=this.game.time.time+e*this.game.time.slowMotion):this.start(!1,t,e,i),this},o.Particles.Arcade.Emitter.prototype.start=function(t,e,i,s,n){if(void 0===t&&(t=!0),void 0===e&&(e=0),void 0!==i&&null!==i||(i=250),void 0===s&&(s=0),void 0===n&&(n=!1),s>this.maxParticles&&(s=this.maxParticles),this.revive(),this.visible=!0,this.lifespan=e,this.frequency=i,t||n)for(var o=0;o1&&(a=o.between(this.left,this.right)),null!==e?r=e:this.height>1&&(r=o.between(this.top,this.bottom)),n.reset(a,r),n.angle=0,n.lifespan=this.lifespan,this.particleBringToTop?this.bringToTop(n):this.particleSendToBack&&this.sendToBack(n),this.autoScale?n.setScaleData(this.scaleData):1!==this.minParticleScale||1!==this.maxParticleScale?n.scale.set(o.realInRange(this.minParticleScale,this.maxParticleScale)):this._minParticleScale.x===this._maxParticleScale.x&&this._minParticleScale.y===this._maxParticleScale.y||n.scale.set(o.realInRange(this._minParticleScale.x,this._maxParticleScale.x),o.realInRange(this._minParticleScale.y,this._maxParticleScale.y)),void 0===s&&(Array.isArray(this._frames)?n.frame=this.game.rnd.pick(this._frames):n.frame=this._frames),this.autoAlpha?n.setAlphaData(this.alphaData):n.alpha=o.realInRange(this.minParticleAlpha,this.maxParticleAlpha),n.blendMode=this.blendMode;var h=n.body;return h.updateBounds(),h.bounce.copyFrom(this.bounce),h.drag.copyFrom(this.particleDrag),h.velocity.x=o.between(this.minParticleSpeed.x,this.maxParticleSpeed.x),h.velocity.y=o.between(this.minParticleSpeed.y,this.maxParticleSpeed.y),h.angularVelocity=o.between(this.minRotation,this.maxRotation),h.gravity.y=this.gravity,h.angularDrag=this.angularDrag,n.onEmit(),!0},o.Particles.Arcade.Emitter.prototype.destroy=function(){this.game.particles.remove(this),o.Group.prototype.destroy.call(this,!0,!1)},o.Particles.Arcade.Emitter.prototype.setSize=function(t,e){return this.area.width=t,this.area.height=e,this},o.Particles.Arcade.Emitter.prototype.setXSpeed=function(t,e){return t=t||0,e=e||0,this.minParticleSpeed.x=t,this.maxParticleSpeed.x=e,this},o.Particles.Arcade.Emitter.prototype.setYSpeed=function(t,e){return t=t||0,e=e||0,this.minParticleSpeed.y=t,this.maxParticleSpeed.y=e,this},o.Particles.Arcade.Emitter.prototype.setRotation=function(t,e){return t=t||0,e=e||0,this.minRotation=t,this.maxRotation=e,this},o.Particles.Arcade.Emitter.prototype.setAlpha=function(t,e,i,s,n){if(void 0===t&&(t=1),void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=o.Easing.Linear.None),void 0===n&&(n=!1),this.minParticleAlpha=t,this.maxParticleAlpha=e,this.autoAlpha=!1,i>0&&t!==e){var a={v:t},r=this.game.make.tween(a).to({v:e},i,s);r.yoyo(n),this.alphaData=r.generateData(60),this.alphaData.reverse(),this.autoAlpha=!0}return this},o.Particles.Arcade.Emitter.prototype.setScale=function(t,e,i,s,n,a,r){if(void 0===t&&(t=1),void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),void 0===n&&(n=0),void 0===a&&(a=o.Easing.Linear.None),void 0===r&&(r=!1),this.minParticleScale=1,this.maxParticleScale=1,this._minParticleScale.set(t,i),this._maxParticleScale.set(e,s),this.autoScale=!1,n>0&&(t!==e||i!==s)){var h={x:t,y:i},l=this.game.make.tween(h).to({x:e,y:s},n,a);l.yoyo(r),this.scaleData=l.generateData(60),this.scaleData.reverse(),this.autoScale=!0}return this},o.Particles.Arcade.Emitter.prototype.at=function(t){return t.center?(this.emitX=t.center.x,this.emitY=t.center.y):(this.emitX=t.world.x+t.anchor.x*t.width,this.emitY=t.world.y+t.anchor.y*t.height),this},Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"width",{get:function(){return this.area.width},set:function(t){this.area.width=t}}),Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"height",{get:function(){return this.area.height},set:function(t){this.area.height=t}}),Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(t){this.emitX=t}}),Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(t){this.emitY=t}}),Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-this.area.width/2)}}),Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+this.area.width/2)}}),Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-this.area.height/2)}}),Object.defineProperty(o.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+this.area.height/2)}}),o.Weapon=function(t,e){o.Plugin.call(this,t,e),this.bullets=null,this.autoExpandBulletsGroup=!1,this.autofire=!1,this.shots=0,this.fireLimit=0,this.fireRate=100,this.fireRateVariance=0,this.fireFrom=new o.Rectangle(0,0,1,1),this.fireAngle=o.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 o.Point(0,0),this.bulletRotateToVelocity=!1,this.bulletKey="",this.bulletFrame="",this._bulletClass=o.Bullet,this._bulletCollideWorldBounds=!1,this._bulletKillType=o.Weapon.KILL_WORLD_BOUNDS,this._data={customBody:!1,width:0,height:0,offsetX:0,offsetY:0},this.bounds=new o.Rectangle,this.bulletBounds=t.world.bounds,this.bulletFrames=[],this.bulletFrameIndex=0,this.anims={},this.onFire=new o.Signal,this.onKill=new o.Signal,this.onFireLimit=new o.Signal,this.trackedSprite=null,this.trackedPointer=null,this.trackRotation=!1,this.trackOffset=new o.Point,this._nextFire=0,this._rotatedPoint=new o.Point},o.Weapon.prototype=Object.create(o.Plugin.prototype),o.Weapon.prototype.constructor=o.Weapon,o.Weapon.KILL_NEVER=0,o.Weapon.KILL_LIFESPAN=1,o.Weapon.KILL_DISTANCE=2,o.Weapon.KILL_WEAPON_BOUNDS=3,o.Weapon.KILL_CAMERA_BOUNDS=4,o.Weapon.KILL_WORLD_BOUNDS=5,o.Weapon.KILL_STATIC_BOUNDS=6,o.Weapon.prototype.createBullets=function(t,e,i,s){return void 0===t&&(t=1),void 0===s&&(s=this.game.world),this.bullets||(this.bullets=this.game.add.physicsGroup(o.Physics.ARCADE,s),this.bullets.classType=this._bulletClass),0!==t&&(-1===t&&(this.autoExpandBulletsGroup=!0,t=1),this.bullets.createMultiple(t,e,i),this.bullets.setAll("data.bulletManager",this),this.bulletKey=e,this.bulletFrame=i),this},o.Weapon.prototype.forEach=function(t,e){return this.bullets.forEachExists(t,e,arguments),this},o.Weapon.prototype.pauseAll=function(){return this.bullets.setAll("body.enable",!1),this},o.Weapon.prototype.resumeAll=function(){return this.bullets.setAll("body.enable",!0),this},o.Weapon.prototype.killAll=function(){return this.bullets.callAllExists("kill",!0),this.bullets.setAll("body.enable",!0),this},o.Weapon.prototype.resetShots=function(t){return this.shots=0,void 0!==t&&(this.fireLimit=t),this},o.Weapon.prototype.destroy=function(){this.parent.remove(this,!1),this.bullets.destroy(),this.game=null,this.parent=null,this.active=!1,this.visible=!1},o.Weapon.prototype.update=function(){this._bulletKillType===o.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()},o.Weapon.prototype.trackSprite=function(t,e,i,s){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=!1),this.trackedPointer=null,this.trackedSprite=t,this.trackRotation=s,this.trackOffset.set(e,i),this},o.Weapon.prototype.trackPointer=function(t,e,i){return void 0===t&&(t=this.game.input.activePointer),void 0===e&&(e=0),void 0===i&&(i=0),this.trackedPointer=t,this.trackedSprite=null,this.trackRotation=!1,this.trackOffset.set(e,i),this},o.Weapon.prototype.fire=function(t,e,i){if(this.game.time.now0&&this.shots===this.fireLimit)return!1;var s=this.bulletSpeed;0!==this.bulletSpeedVariance&&(s+=o.Math.between(-this.bulletSpeedVariance,this.bulletSpeedVariance)),t?this.fireFrom.width>1?this.fireFrom.centerOn(t.x,t.y):(this.fireFrom.x=t.x,this.fireFrom.y=t.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&&(s+=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 n=this.fireFrom.width>1?this.fireFrom.randomX:this.fireFrom.x,a=this.fireFrom.height>1?this.fireFrom.randomY:this.fireFrom.y,r=this.trackRotation?this.trackedSprite.angle:this.fireAngle;void 0!==e&&void 0!==i&&(r=this.game.math.radToDeg(Math.atan2(i-a,e-n))),0!==this.bulletAngleVariance&&(r+=o.Math.between(-this.bulletAngleVariance,this.bulletAngleVariance));var h=0,l=0;0===r||180===r?h=Math.cos(this.game.math.degToRad(r))*s:90===r||270===r?l=Math.sin(this.game.math.degToRad(r))*s:(h=Math.cos(this.game.math.degToRad(r))*s,l=Math.sin(this.game.math.degToRad(r))*s);var c=null;if(this.autoExpandBulletsGroup?(c=this.bullets.getFirstExists(!1,!0,n,a,this.bulletKey,this.bulletFrame),c.data.bulletManager=this):c=this.bullets.getFirstExists(!1),c){if(c.reset(n,a),c.data.fromX=n,c.data.fromY=a,c.data.killType=this.bulletKillType,c.data.killDistance=this.bulletKillDistance,c.data.rotateToVelocity=this.bulletRotateToVelocity,this.bulletKillType===o.Weapon.KILL_LIFESPAN&&(c.lifespan=this.bulletLifespan),c.angle=r+this.bulletAngleOffset,""!==this.bulletAnimation){if(null===c.animations.getAnimation(this.bulletAnimation)){var u=this.anims[this.bulletAnimation];c.animations.add(u.name,u.frames,u.frameRate,u.loop,u.useNumericIndex)}c.animations.play(this.bulletAnimation)}else this.bulletFrameCycle?(c.frame=this.bulletFrames[this.bulletFrameIndex],++this.bulletFrameIndex>=this.bulletFrames.length&&(this.bulletFrameIndex=0)):this.bulletFrameRandom&&(c.frame=this.bulletFrames[Math.floor(Math.random()*this.bulletFrames.length)]);if(c.data.bodyDirty&&(this._data.customBody&&c.body.setSize(this._data.width,this._data.height,this._data.offsetX,this._data.offsetY),c.body.collideWorldBounds=this.bulletCollideWorldBounds,c.data.bodyDirty=!1),c.body.velocity.set(h,l),c.body.gravity.set(this.bulletGravity.x,this.bulletGravity.y),0!==this.bulletSpeedVariance){var d=this.fireRate;d+=o.Math.between(-this.fireRateVariance,this.fireRateVariance),d<0&&(d=0),this._nextFire=this.game.time.now+d}else this._nextFire=this.game.time.now+this.fireRate;this.shots++,this.onFire.dispatch(c,this,s),this.fireLimit>0&&this.shots===this.fireLimit&&this.onFireLimit.dispatch(this,this.fireLimit)}return c},o.Weapon.prototype.fireAtPointer=function(t){return void 0===t&&(t=this.game.input.activePointer),this.fire(null,t.worldX,t.worldY)},o.Weapon.prototype.fireAtSprite=function(t){return this.fire(null,t.world.x,t.world.y)},o.Weapon.prototype.fireAtXY=function(t,e){return this.fire(null,t,e)},o.Weapon.prototype.setBulletBodyOffset=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),this._data.customBody=!0,this._data.width=t,this._data.height=e,this._data.offsetX=i,this._data.offsetY=s,this.bullets.callAll("body.setSize","body",t,e,i,s),this.bullets.setAll("data.bodyDirty",!1),this},o.Weapon.prototype.setBulletFrames=function(t,e,i,s){return void 0===i&&(i=!0),void 0===s&&(s=!1),this.bulletFrames=o.ArrayUtils.numberArray(t,e),this.bulletFrameIndex=0,this.bulletFrameCycle=i,this.bulletFrameRandom=s,this},o.Weapon.prototype.addBulletAnimation=function(t,e,i,s,n){return this.anims[t]={name:t,frames:e,frameRate:i,loop:s,useNumericIndex:n},this.bullets.callAll("animations.add","animations",t,e,i,s,n),this.bulletAnimation=t,this},o.Weapon.prototype.debug=function(t,e,i){void 0===t&&(t=16),void 0===e&&(e=32),void 0===i&&(i=!1),this.game.debug.text("Weapon Plugin",t,e),this.game.debug.text("Bullets Alive: "+this.bullets.total+" - Total: "+this.bullets.length,t,e+24),i&&this.bullets.forEachExists(this.game.debug.body,this.game.debug,"rgba(255, 0, 255, 0.8)")},Object.defineProperty(o.Weapon.prototype,"bulletClass",{get:function(){return this._bulletClass},set:function(t){this._bulletClass=t,this.bullets.classType=this._bulletClass}}),Object.defineProperty(o.Weapon.prototype,"bulletKillType",{get:function(){return this._bulletKillType},set:function(t){switch(t){case o.Weapon.KILL_STATIC_BOUNDS:case o.Weapon.KILL_WEAPON_BOUNDS:this.bulletBounds=this.bounds;break;case o.Weapon.KILL_CAMERA_BOUNDS:this.bulletBounds=this.game.camera.view;break;case o.Weapon.KILL_WORLD_BOUNDS:this.bulletBounds=this.game.world.bounds}this._bulletKillType=t}}),Object.defineProperty(o.Weapon.prototype,"bulletCollideWorldBounds",{get:function(){return this._bulletCollideWorldBounds},set:function(t){this._bulletCollideWorldBounds=t,this.bullets.setAll("body.collideWorldBounds",t),this.bullets.setAll("data.bodyDirty",!1)}}),Object.defineProperty(o.Weapon.prototype,"x",{get:function(){return this.fireFrom.x},set:function(t){this.fireFrom.x=t}}),Object.defineProperty(o.Weapon.prototype,"y",{get:function(){return this.fireFrom.y},set:function(t){this.fireFrom.y=t}}),o.Bullet=function(t,e,i,s,n){o.Sprite.call(this,t,e,i,s,n),this.anchor.set(.5),this.data={bulletManager:null,fromX:0,fromY:0,bodyDirty:!0,rotateToVelocity:!1,killType:0,killDistance:0}},o.Bullet.prototype=Object.create(o.Sprite.prototype),o.Bullet.prototype.constructor=o.Bullet,o.Bullet.prototype.kill=function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.data.bulletManager.onKill.dispatch(this),this},o.Bullet.prototype.update=function(){this.exists&&(this.data.killType>o.Weapon.KILL_LIFESPAN&&(this.data.killType===o.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))},o.Video=function(t,e,i){if(void 0===e&&(e=null),void 0===i&&(i=null),this.game=t,this.key=e,this.width=0,this.height=0,this.type=o.VIDEO,this.disableTextureUpload=!1,this.touchLocked=!1,this.onPlay=new o.Signal,this.onChangeSource=new o.Signal,this.onComplete=new o.Signal,this.onAccess=new o.Signal,this.onError=new o.Signal,this.onTimeout=new o.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,e&&this.game.cache.checkVideoKey(e)){var s=this.game.cache.getVideo(e);s.isBlob?this.createVideoFromBlob(s.data):this.video=s.data,this.width=this.video.videoWidth,this.height=this.video.videoHeight}else i&&this.createVideoFromURL(i,!1);this.video&&!i?(this.baseTexture=new PIXI.BaseTexture(this.video),this.baseTexture.forceLoaded(this.width,this.height)):(this.baseTexture=new PIXI.BaseTexture(o.Cache.DEFAULT.baseTexture.source),this.baseTexture.forceLoaded(this.width,this.height)),this.texture=new PIXI.Texture(this.baseTexture),this.textureFrame=new o.Frame(0,0,0,this.width,this.height,"video"),this.texture.setFrame(this.textureFrame),this.texture.valid=!1,null!==e&&this.video&&(this.texture.valid=this.video.canplay),this.snapshot=null,o.BitmapData&&(this.snapshot=new o.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():s&&(s.locked=!1)},o.Video.prototype={connectToMediaStream:function(t,e){return t&&e&&(this.video=t,this.videoStream=e,this.isStreaming=!0,this.baseTexture.source=this.video,this.updateTexture(null,this.video.videoWidth,this.video.videoHeight),this.onAccess.dispatch(this)),this},startMediaStream:function(t,e,i){if(void 0===t&&(t=!1),void 0===e&&(e=null),void 0===i&&(i=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!==e&&(this.video.width=e),null!==i&&(this.video.height=i),this._timeOutID=window.setTimeout(this.getUserMediaTimeout.bind(this),this.timeout);try{navigator.getUserMedia({audio:t,video:!0},this.getUserMediaSuccess.bind(this),this.getUserMediaError.bind(this))}catch(t){this.getUserMediaError(t)}return this},getUserMediaTimeout:function(){clearTimeout(this._timeOutID),this.onTimeout.dispatch(this)},getUserMediaError:function(t){clearTimeout(this._timeOutID),this.onError.dispatch(this,t)},getUserMediaSuccess:function(t){clearTimeout(this._timeOutID),this.videoStream=t,void 0!==this.video.mozSrcObject?this.video.mozSrcObject=t:this.video.src=window.URL&&window.URL.createObjectURL(t)||t;var e=this;this.video.onloadeddata=function(){function t(){if(i>0)if(e.video.videoWidth>0){var s=e.video.videoWidth,n=e.video.videoHeight;isNaN(e.video.videoHeight)&&(n=s/(4/3)),e.video.play(),e.isStreaming=!0,e.baseTexture.source=e.video,e.updateTexture(null,s,n),e.onAccess.dispatch(e)}else window.setTimeout(t,500);i--}var i=10;t()}},createVideoFromBlob:function(t){var e=this;return this.video=document.createElement("video"),this.video.controls=!1,this.video.setAttribute("autoplay","autoplay"),this.video.addEventListener("loadeddata",function(t){e.updateTexture(t)},!0),this.video.src=window.URL.createObjectURL(t),this.video.canplay=!0,this},createVideoFromURL:function(t,e){return void 0===e&&(e=!1),this.texture&&(this.texture.valid=!1),this.video=document.createElement("video"),this.video.controls=!1,e&&this.video.setAttribute("autoplay","autoplay"),this.video.src=t,this.video.canplay=!0,this.video.load(),this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval),this.key=t,this},updateTexture:function(t,e,i){var s=!1;void 0!==e&&null!==e||(e=this.video.videoWidth,s=!0),void 0!==i&&null!==i||(i=this.video.videoHeight),this.width=e,this.height=i,this.baseTexture.source!==this.video&&(this.baseTexture.source=this.video),this.baseTexture.forceLoaded(e,i),this.texture.frame.resize(e,i),this.texture.width=e,this.texture.height=i,this.texture.valid=!0,this.snapshot&&this.snapshot.resize(e,i),s&&null!==this.key&&(this.onChangeSource.dispatch(this,e,i),this._autoplay&&(this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate)))},complete:function(){this.onComplete.dispatch(this)},play:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=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),this.video.loop=t?"loop":"",this.video.playbackRate=e,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,t,e)),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(t){t.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(t){if(Array.isArray(t))for(var e=0;e0&&(this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))},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 t=this.game.cache.getVideo(this.key);t&&!t.isBlob&&(t.locked=!1)}return!0},grab:function(t,e,i){if(void 0===t&&(t=!1),void 0===e&&(e=1),void 0===i&&(i=null),null!==this.snapshot)return t&&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,e,i),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(o.Video.prototype,"currentTime",{get:function(){return this.video?this.video.currentTime:0},set:function(t){this.video.currentTime=t}}),Object.defineProperty(o.Video.prototype,"duration",{get:function(){return this.video?this.video.duration:0}}),Object.defineProperty(o.Video.prototype,"progress",{get:function(){return this.video?this.video.currentTime/this.video.duration:0}}),Object.defineProperty(o.Video.prototype,"mute",{get:function(){return this._muted},set:function(t){if(t=t||null){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}}),Object.defineProperty(o.Video.prototype,"paused",{get:function(){return this._paused},set:function(t){if(t=t||null,!this.touchLocked)if(t){if(this._paused)return;this._codePaused=!0,this.setPause()}else{if(!this._paused)return;this._codePaused=!1,this.setResume()}}}),Object.defineProperty(o.Video.prototype,"volume",{get:function(){return this.video?this.video.volume:1},set:function(t){t<0?t=0:t>1&&(t=1),this.video&&(this.video.volume=t)}}),Object.defineProperty(o.Video.prototype,"playbackRate",{get:function(){return this.video?this.video.playbackRate:1},set:function(t){this.video&&(this.video.playbackRate=t)}}),Object.defineProperty(o.Video.prototype,"loop",{get:function(){return!!this.video&&this.video.loop},set:function(t){t&&this.video?this.video.loop="loop":this.video&&(this.video.loop="")}}),Object.defineProperty(o.Video.prototype,"playing",{get:function(){return!(this.video.paused&&this.video.ended)}}),o.Video.prototype.constructor=o.Video,void 0===PIXI.blendModes&&(PIXI.blendModes=o.blendModes),void 0===PIXI.scaleModes&&(PIXI.scaleModes=o.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=o.POLYGON,PIXI.Graphics.RECT=o.RECTANGLE,PIXI.Graphics.CIRC=o.CIRCLE,PIXI.Graphics.ELIP=o.ELLIPSE,PIXI.Graphics.RREC=o.ROUNDEDRECTANGLE),PIXI.TextureSilentFail=!0,void 0!==t&&t.exports&&(e=t.exports=o),e.Phaser=o,o}).call(this)}).call(e,i(59))},function(t,e){function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function n(t){if(u===setTimeout)return setTimeout(t,0);if((u===i||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function o(t){if(d===clearTimeout)return clearTimeout(t);if((d===s||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){f&&y&&(f=!1,y.length?p=y.concat(p):g=-1,p.length&&r())}function r(){if(!f){var t=n(a);f=!0;for(var e=p.length;e;){for(y=p,p=[];++g1)for(var i=1;iparseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return rt}function U(t,e,i){for(var s in at)if(at.hasOwnProperty(s)&&e===t.f[at[s]]&&i===t.f[at[s]])return!0;return!1}function N(t){var e=t.g.a.offsetWidth,i=t.h.a.offsetWidth,s;(s=e===t.f.serif&&i===t.f["sans-serif"])||(s=G()&&U(t,e,i)),s?nt()-t.A>=t.w?G()&&U(t,e,i)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?W(t,t.v):W(t,t.B):j(t):W(t,t.v)}function j(t){setTimeout(a(function(){N(this)},t),50)}function W(t,e){setTimeout(a(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),e(this.a)},t),0)}function X(t,e,i){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=i}function H(t){0==--t.f&&t.j&&(t.m?(t=t.a,t.g&&u(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),M(t,"active")):I(t.a))}function V(t){this.j=t,this.a=new O,this.h=0,this.f=this.g=!0}function Y(t,e,i,s,n){var o=0==--t.h;(t.f||t.g)&&setTimeout(function(){var t=n||null,r=s||null||{};if(0===i.length&&o)I(e.a);else{e.f+=i.length,o&&(e.j=o);var h,l=[];for(h=0;h=e.f?n():t.fonts.load(w(e.a),e.h).then(function(t){1<=t.length?s():setTimeout(o,25)},function(){n()})}o()}),n=null,o=new Promise(function(t,i){n=setTimeout(i,e.f)});Promise.race([o,s]).then(function(){n&&(clearTimeout(n),n=null),e.g(e.a)},function(){e.j(e.a)})};var at={D:"serif",C:"sans-serif"},rt=null;F.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=nt(),N(this)};var ht=null;X.prototype.g=function(t){var e=this.a;e.g&&u(e.f,[e.a.c("wf",t.c,C(t).toString(),"active")],[e.a.c("wf",t.c,C(t).toString(),"loading"),e.a.c("wf",t.c,C(t).toString(),"inactive")]),M(e,"fontactive",t),this.m=!0,H(this)},X.prototype.h=function(t){var e=this.a;if(e.g){var i=d(e.f,e.a.c("wf",t.c,C(t).toString(),"active")),s=[],n=[e.a.c("wf",t.c,C(t).toString(),"loading")];i||s.push(e.a.c("wf",t.c,C(t).toString(),"inactive")),u(e.f,s,n)}M(e,"fontinactive",t),H(this)},V.prototype.load=function(t){this.c=new r(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,q(this,new A(this.c,t),t)},z.prototype.load=function(t){function e(){if(o["__mti_fntLst"+s]){var i=o["__mti_fntLst"+s](),n=[],a;if(i)for(var r=0;rt.game.height?t.handleCorrect():t.handleIncorrect():o.Constants.PORTRAIT_LOCKED&&(t.game.widths?s/a:s/n,o.Constants.WIDTH=720,o.Constants.HEIGHT=480,o.Constants.CALCULATED_WIDTH=Math.ceil(i*r),o.Constants.CALCULATED_HEIGHT=Math.ceil(s*r),t.setGameSize(o.Constants.CALCULATED_WIDTH,o.Constants.CALCULATED_HEIGHT),t.setUserScale(1/r,1/r),o.Constants.LANDSCAPE_LOCKED&&(t.game.width>t.game.height?(document.getElementById("orientation").style.display="none",document.getElementById("content").style.display="block"):(document.getElementById("orientation").style.display="block",document.getElementById("content").style.display="none"))},e.setScaling=function(t){var e=window.innerWidth>window.innerHeight?window.innerWidth:window.innerHeight;e*=t.device.pixelRatio,o.Constants.GAME_SCALE=1},e.prototype.preload=function(){var t=this;this.game.load.cacheBuster=1580212440896;var e="x"+o.Constants.GAME_SCALE+"/";o.Images.preloadList.forEach(function(i){t.game.load.image(i,"assets/images/"+e+i+".png")}),o.JSONData.preloadList.forEach(function(e){t.game.load.json(e,"assets/levels/"+e+".json")}),o.Atlases.preloadList.forEach(function(i){t.game.load.atlas(i,"assets/atlases/"+e+i+".png","assets/atlases/"+e+i+".json")}),o.Sounds.preloadList.forEach(function(e){t.game.device.iOS?t.game.load.audio(e,["assets/sounds/"+e+".m4a"]):t.game.load.audio(e,["assets/sounds/"+e+".ogg","assets/sounds/"+e+".mp3"])})},e.prototype.create=function(){n.default.hide(),r.default.Current===r.default.YEP10?this.game.state.start(a.default.Name):this.game.state.start(h.default.Name)},e.prototype.handleCorrect=function(){document.getElementById("orientation").style.display="none",document.getElementById("content").style.display="block"},e.prototype.handleIncorrect=function(){document.getElementById("orientation").style.display="block",document.getElementById("content").style.display="none"},e.Name="boot",e}(Phaser.State);e.default=c},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){}return t.show=function(){var t=document.getElementById("loader");t&&(t.style.display="block")},t.hide=function(){var t=document.getElementById("loader");t&&(t.style.display="none")},t}();e.default=s},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){this.updated=[],this.restarted=[],this.objects=[],this.game=null}return t.prototype.start=function(){this.view.start(),this.physics.start()},t.prototype.init=function(t){this.game=t},t.prototype.add=function(t){this.objects.push(t),t.update&&(this.updatedLen=this.updated.push(t)),t.restart&&this.restarted.push(t),t.body&&this.physics.add(t),t.graphic&&this.view.add(t)},t.prototype.update=function(t){this.physics.update(t);for(var e=0;eNumber(n)&&(this.save[t.RACE_PREFIX+e.toString()+t.RACE_RESULT]=i);var o=this.save[t.RACE_PREFIX+e.toString()+t.RACE_TIME];return s>0,x[T].y>>0);var S=new h(P);if(S.isConvex())l=new y(S,w.Materials.WIEGHTLESS,f),S.dispose(),a.shapes.add(l);else{for(S.convexDecomposition(!1,t.polyList),S.dispose();!t.polyList.empty();)S=t.polyList.pop(),l=new y(S,w.Materials.WIEGHTLESS,f),a.shapes.add(l),S.dispose();t.polyList.clear()}}}return a.align(),a.compound=n,a.userData.skinId=e.skinId,o.body=a,o.skinId=e.skinId,o.graphic=_.GraphicUtil.createCarFrameGraphic(e,m),o.create(e),o},t.createCar=function(e,i,s,n,o){var a=new g.BikeObject,r=t.createFrame(e,i,s,a.compound);a.frame=r;var h;h=t.createWheel(e,a.compound,!0,r.body),a.backWheel=h,h=t.createWheel(e,a.compound,!1,r.body),a.frontWheel=h,a.brakeJoint=h.brakeJoint;var l;e.driverDensity>0&&(l=t.createDriver(e,a.compound,r),a.driver=l),a.backWheel.brakeMaterial=a.backWheel.material.copy(),a.backWheel.brakeMaterial.dynamicFriction=a.backWheel.brakeMaterial.staticFriction=.1*a.backWheel.material.staticFriction;var u=g.Inventory.instance.skin,d=g.CarsData.geom[1],p;d.suspend_back&&(p=new g.DecorObject(!0),p.graphic=_.GraphicUtil.createImage(0,0,0,T.AssetsStorage.instance.getByKey("suspend_back")),a.suspendBack=p,p.type=C.ObjectTypes.CAR,a.suspendBackLocal=c.get(d.suspend_back.x,d.suspend_back.y),a.suspendBackW=d.suspend_back_w),d.suspend_front&&(p=new g.DecorObject(!0),p.graphic=_.GraphicUtil.createImage(0,0,0,T.AssetsStorage.instance.getByKey("suspend_front")),a.suspendFront=p,a.suspendFrontAngle=e.axisFrontAngle,p.type=C.ObjectTypes.CAR),a.create(e),a.x=i,a.y=s,a.rotation=0;var f=m.MaxGameCore.instance,y=!1;f.add(a.backWheel),f.add(a.frontWheel);var v=!1;return 3!==g.Inventory.instance.skin&&5!==g.Inventory.instance.skin||(v=!0,a.suspendFront&&f.add(a.suspendFront),y=!0,a.suspendBack&&f.add(a.suspendBack)),f.add(a.frame),v||a.suspendFront&&f.add(a.suspendFront),y||a.suspendBack&&f.add(a.suspendBack),a.driver&&(f.add(a.driver),a.driver.activateMirrorParts(!0),f.add(a.driver.parts_mirror[4]),f.add(a.driver.parts_mirror[5]),f.add(a.driver.parts_mirror[2]),f.add(a.driver.parts_mirror[3]),a.driver.activateMirrorParts(!1),3===u?(f.add(a.driver.parts[1]),f.add(a.driver.parts[0]),f.add(a.driver.parts[3]),f.add(a.driver.parts[2]),f.add(a.driver.parts[4]),f.add(a.driver.parts[5])):(f.add(a.driver.parts[1]),f.add(a.driver.parts[0]),f.add(a.driver.parts[2]),f.add(a.driver.parts[3]),f.add(a.driver.parts[4]),f.add(a.driver.parts[5])),a.driver.parts_mirror[2].body.userData.handler=a,a.driver.parts_mirror[3].body.userData.handler=a,a.driver.parts_mirror[4].body.userData.handler=a,a.driver.parts_mirror[5].body.userData.handler=a,a.driver.parts[0].body.userData.handler=a,a.driver.parts[1].body.userData.handler=a,a.driver.parts[2].body.userData.handler=a,a.driver.parts[3].body.userData.handler=a,a.driver.parts[4].body.userData.handler=a,a.driver.parts[5].body.userData.handler=a),l&&l.head&&f.add(l.head.trailAnimObject),f.add(a),o||(a.id=g.CarsData.cars.cars.length,g.CarsData.cars.cars.push(a)),a},Object.defineProperty(t,"instance",{get:function(){return null===t._instance&&(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.polyList=new l,t}();e.CarBuilder=S},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.constraint.AngleJoint,o=nape.constraint.PivotJoint,a=nape.constraint.WeldJoint,r=nape.geom.Vec2,h=i(0),l=i(1),c=i(38),u=i(16),d=function(t){function e(){var e=t.call(this)||this;return e.started=!1,e}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.body.userData.graphicEx=this.graphic,this.type=l.ObjectTypes.CAR,this.body.userData.dx=t.x,this.body.userData.dy=t.y,this.body.userData.dr=t.r,this.compound=this.body.compound,this.pinJoint=new a(this.body,null,r.weak(),r.weak()),this.pinJoint.active=!1,this.pinJoint.compound=this.compound,this.body.userData.driverPart=this,this.effector=new h.BodyEffector(this.body)},e.prototype.pinTo=function(t){if(!this.pinJoint.active){this.pinJoint.body2=t;var e=t.worldPointToLocal(this.body.position);this.pinJoint.anchor2=e,e.dispose(),this.pinJoint.phase=t.rotation-this.body.rotation,this.pinJoint.active=!0}},e.prototype.restart=function(){if(this.body.allowMovement=this.body.allowRotation=!0,this.trail&&this.trail.init(this.body.position.x,this.body.position.y),this.trailAnimObject){this.trailAnimObject.graphic.position.set(this.body.position.x,this.body.position.y)}this.started=!1},e.prototype.connect=function(t){this.pivotJoint&&(this.pivotJoint.active=t),this.angleJoint&&(this.angleJoint.active=t,t&&(this.angleJointStiff.jointMin=this.basePhase-this.deltaAngle,this.angleJointStiff.jointMax=this.basePhase+this.deltaAngle),this.angleJointStiff.active=t),t&&this.trail&&this.trail.init(this.body.position.x,this.body.position.y),this.trailAnimObject&&(this.trailAnimObject.graphic.visible=t),this.pinJoint.active=!1,this.pinJoint.body2=null},e.prototype.move=function(t,e){this.angleJointStiff.jointMin=this.basePhase-this.deltaAngle+t*e,this.angleJointStiff.jointMax=this.basePhase+this.deltaAngle+t*e,this.angleJoint.jointMin=this.basePhase+t*e,this.angleJoint.jointMax=this.basePhase+t*e},e.prototype.release=function(){this.compound=null,this.pivotJoint&&(this.pivotJoint.body1=null,this.pivotJoint.body2=null,this.pivotJoint.compound=null,this.angleJoint.body1=null,this.angleJoint.body2=null,this.angleJoint.compound=null,this.angleJointStiff.body1=null,this.angleJointStiff.body2=null,this.angleJointStiff.compound=null),u.NapeUtil.disposeJoint(this.pinJoint),this.pinJoint=null,this.trail&&(this.trail=null),this.trailAnimObject&&(this.trailAnimObject=null),this.effector.dispose(),this.effector=null,t.prototype.release.call(this)},e.prototype.createJoints=function(t,e,i,s,a){void 0===a&&(a=0);var h=r.get(i+e.x,s+e.y),l=this.body.worldPointToLocal(h),c=t.body.worldPointToLocal(h);this.pivotJoint=new o(this.body,t.body,l,c),this.pivotJoint.compound=this.body.compound;var u=t.body.rotation-this.body.rotation;this.basePhase=u,this.deltaAngle=a,a>0&&(this.angleJoint=new n(this.body,t.body,u,u,1),this.angleJoint.stiff=!1,this.angleJoint.damping=1,this.angleJoint.frequency=10,this.angleJoint.compound=this.body.compound,this.angleJointStiff=new n(this.body,t.body,u-a,u+a,1),this.angleJointStiff.compound=this.body.compound),l.dispose(),c.dispose(),h.dispose()},e.prototype.disableMuscles=function(){this.angleJoint&&(this.angleJoint.active=!1,this.angleJointStiff.jointMin=this.basePhase-5*this.deltaAngle,this.angleJointStiff.jointMax=this.basePhase+5*this.deltaAngle)},e.prototype.createTrail=function(){this.trail=new c.TrailParticlesSystem,this.trail.init(this.body.position.x,this.body.position.y)},e.prototype.update=function(t){if(this.trailAnimObject){var e=this.trailAnimObject.graphic;e.position.set(this.body.position.x,this.body.position.y);var i=this.body.velocity,s=i.length;if((this.started||s>400)&&(this.started=!0,s>50)){var n=i.angle;n>.25*Math.PI?n=.25*Math.PI:n<-.25*Math.PI&&(n=-.25*Math.PI),e.rotation=n}}this.effector.update(t)},e}(h.GameObject);e.DriverPartObject=d},function(t,e,i){"use strict";e.__esModule=!0;var s=Phaser.Signal,n=i(0),o=i(0),a=i(0),r=i(4),h=i(86),l=i(20),c=i(88),u=function(){function t(){this.complete=new s,this.handlers={}}return t.prototype.start=function(){this.parseParams(),this.parseLayers(),this.buildBg(),r.MaxGameCore.instance.initialDeactivate(),this.complete.dispatch(this)},t.prototype.parseParams=function(){var t=n.RacesData.map.settings;n.RacesData.data.gravityY=t.gravityY,a.MaxPhysics.space.gravity.setxy(0,n.RacesData.data.gravityY),n.RacesData.data.countdown=0},t.prototype.buildBg=function(){var t=new n.BgObject;t.create();var e=1,i=t.layer0.height;e=a.GraphicUtil.game.width/a.GraphicUtil.game.height>=l.default.WIDTH/l.default.HEIGHT?a.GraphicUtil.game.width/l.default.WIDTH:a.GraphicUtil.game.height/l.default.HEIGHT,t.layer0.scale.set(e),t.layer0.y=i-t.layer0.height,t.layer1W=t.layer0.width,r.MaxGameCore.instance.add(t)},t.prototype.parseLayers=function(){r.MaxGameCore.instance;for(var t=n.RacesData.map,e=t.layers,i=e.length,s=0;s=0?new n.GroundObject:i.indexOf("BonesPather")>=0?new n.GroundObject:i.indexOf("LandscapeShaper")>=0||i.indexOf("FinishShaper")>=0?new n.ShaperObject:i.indexOf("WaterShaper")>=0?new n.WaterObject:i.indexOf("GeyserE")>=0?new h.GeyserObject:i.indexOf("MoverPather")>=0?new n.MoverPatherObject:i.indexOf("DynamicPather")>=0||i.indexOf("PillarPather")>=0?new n.PlankObject:0===i.indexOf("Glass")?new n.GlassBlock:"TiltZone"===i||"BrakeZone"===i?new n.WaypointObject:"Dec2_1"===i?new n.DecorMultiObject(e<=1):0===i.indexOf("Dec")||0===i.indexOf("Sign")||0===i.indexOf("Pillar")?null!==t.params.id&&t.params.id>=0?new o.DecorActObject(e<=1):new o.DecorObject(e<=1):"BarrelE"===i||0===i.indexOf("Plank")?new o.DynamicBodyObject:0===i.indexOf("VecDec_")?new o.VectorDecor:"SphereE"===i?new c.SphereObject:"ToggleE"===i?new o.ToggleObject:"BoostE"===i?new o.BoostObject:"SafePointE"===i?new o.SafePointObject:"MotorJointE"===i?new o.MotorObject:"PivotJointE"===i?new o.PivotObject:"CameraZoneE"===i?new a.CameraZone:"SpikesE"===i?new a.SpikesObject:0===i.indexOf("Removed")?new a.RemovedBodyObjects:0===i.indexOf("Tnt")?new a.TntObject:"FinishZone"===i?new a.FinishObject:i.indexOf("Ball")>=0?new o.DynamicBodyObject:null},t.prototype.dispose=function(){this.complete.removeAll()},t}();e.RaceBuilder=u},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.phys.BodyType,o=i(0),a=i(5),r=i(11),h=i(7),l=i(1),c=i(6),u=i(8),d=i(2),p=i(87),f=function(t){function e(){var i=t.call(this)||this;return i.parts=new Array(e.PART_COUNT),i.id=-1,i.safeId=-1,i}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.type=l.ObjectTypes.OBJECT;var e=t.params,i=e.x,s=e.y;null!=e.id&&(this.id=e.id),null!=e.safeId&&(this.safeId=e.id),this.emitCounter=0,this.emitRate=null==e.rate?1:e.rate,this.body=o.NapeUtil.createRectBodyWH(n.STATIC,h.Filters.SENSOR,!0,e.width,e.height,i,s,c.default.TO_RAD*e.rotation,r.CbTypes.GEYSER,u.Materials.DEFAULT),this.width=e.width;var p=this.body.rotation,f=t.params.speed;this.velX=f*Math.cos(p),this.velY=f*Math.sin(p);var y=a.GraphicUtil.game.add.group();this.graphic=y;var g=d.AssetsStorage.instance;this.partPos=0,this.partMinX=-.5*this.width+16,this.partDeltaX=32;var m=a.GraphicUtil.game.add.sprite(0,0,a.GraphicUtil.currentAtlass,"GeyserBase0000");m.x=-.5*this.width,m.anchor.set(.7,.5),y.addChild(m),this.anim=a.GraphicUtil.createMovieClip(null,g.getByKey("geyser_anim"),15,!0),this.anim=a.GraphicUtil.game.add.sprite(0,0,a.GraphicUtil.currentAtlass,"geyser_anim0000"),this.anim.animations.add("geyser_anim",Phaser.Animation.generateFrameNames("geyser_anim",0,5,"",4)),this.anim.anchor.set(-.1,.5),this.anim.animations.getAnimation("geyser_anim").play(30,!0),this.anim.x=m.x,y.addChild(this.anim),this.createBoostParts(1e3,this.width/f),this.partMinY=-.5*e.height,this.partDeltaY=e.height,this.body.userData.handler=this,this.activate(this.id<0),y.x=this.body.position.x,y.y=this.body.position.y,y.rotation=c.default.TO_RAD*e.rotation},e.prototype.createBoostParts=function(t,i){for(var s=0;s=0)for(;t>0;){var i=this.parts[this.partPos],s=this.partMinX+Math.random()*this.partDeltaX,n=this.partMinY+Math.random()*this.partDeltaY;i.emit(s,n),this.partPos++,this.partPos>=e.PART_COUNT&&(this.partPos=0),t--}},e.prototype.update=function(t){if(void 0===t&&(t=0),this.active){this.emitCounter+=this.emitRate;var i=this.emitCounter>>0;if(this.emit(i),this.emitCounter-=i,this.partPos>=0)for(var s=0;s=0&&this.activate(!1)},e.PART_COUNT=60,e}(o.GameObject);e.GeyserObject=f},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=function(t){function e(e,i){var s=t.call(this,n.GraphicUtil.game,0,0,n.GraphicUtil.currentAtlass,"particle_boost0000")||this;return s.scaleSpeed=4,s.alphaSpeed=1,s.velocity=e,s.alphaSpeed=.9/i,s.scaleSpeed=1.5/i,s.ttl=i,s.anchor.set(.5),s.visible=!1,s}return s(e,t),e.prototype.update=function(t){void 0===t&&(t=0),this.visible&&(this.x+=this.velX*t,this.scale.x-=this.scaleSpeed*t,this.timer+=t,this.timer>=this.ttl&&(this.visible=!1))},e.prototype.emit=function(t,e){this.visible=!0,this.timer=0,this.x=t,this.y=e,this.velX=this.velocity*(.95+.1*Math.random()),this.scale.x=2,this.alpha=1},e}(Phaser.Sprite);e.GeyserPartClip=o},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.constraint.LineJoint,o=nape.constraint.DistanceJoint,a=nape.phys.Material,r=nape.phys.BodyType,h=nape.geom.Vec2,l=i(0),c=i(1),u=i(6),d=i(8),p=i(7),f=i(5),y=i(2),g=i(31),m=function(t){function e(){var e=t.call(this)||this;return e.id=-1,e}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.space=g.NapePhysics.space,this.type=c.ObjectTypes.OBJECT,null!=t.params.id&&(this.id=t.params.id);var e=y.AssetsStorage.instance,i=t.className,s=e.getByKey(i+"_data"),m=t.params,v=m.x,b=m.y,x=m.len,_=b+x;b=_-m.pos*x;var w=m.rotation*u.default.TO_RAD,P=null==m.scale?1:m.scale,C=p.Filters.GROUND,T=f.GraphicUtil.createImageWithObj(m,i);this.graphic=T,this.graphic.y=b,T.scale.set(P),T.anchor.set(.5,.5);var S;S=1!=m.density?new a(m.density):d.Materials.DEFAULT,this.body=l.NapeUtil.createCircleBody(r.DYNAMIC,C,!1,.5*s.w*P,v,b,w,null,S),this.body.allowRotation=!1,l.NapeUtil.setupStartPos(this.body),this.body.userData.graphicEx=this.graphic,this.lineJoint=new n(this.space.world,this.body,h.weak(v,_),h.weak(),h.weak(0,-1),0,x),this.distanceJoint=new o(this.space.world,this.body,h.weak(v,_+m.dySpring),h.weak(),m.lenSpring,m.lenSpring),this.distanceJoint.damping=m.damp,this.distanceJoint.frequency=m.freq,this.distanceJoint.stiff=!1,this.lineJoint.space=this.distanceJoint.space=this.space,0==t.params.active?this.activeOnStart=!1:this.activeOnStart=!0},e.prototype.activate=function(t){void 0===t&&(t=!0);var e,i;if(t)for(this.body.space=this.space,e=this.body.constraints.iterator();e.hasNext();)i=e.next(),i.active=!0;else{for(e=this.body.constraints.iterator();e.hasNext();)i=e.next(),i.active=!1,i.userData.skipActive=!0;this.body.space=null}},e.prototype.isActive=function(){return this.activeOnStart},e.prototype.restart=function(){l.NapeUtil.stopBody(this.body),l.NapeUtil.resetStartPos(this.body),this.activeOnStart||(this.graphic.x=this.body.position.x,this.graphic.y=this.body.position.y,this.graphic.rotation=this.body.rotation,this.activate(!1))},e.prototype.review=function(){this.restart()},e.prototype.release=function(){t.prototype.release.call(this),l.NapeUtil.disposeJoint(this.lineJoint),l.NapeUtil.disposeJoint(this.distanceJoint),this.lineJoint=null,this.distanceJoint=null,this.space=null},e}(l.GameObject);e.SphereObject=m},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(45),o=Phaser.Image,a=i(0),r=i(5),h=i(3),l=i(2),c=function(t){function e(e,i){var s=t.call(this,r.GraphicUtil.game,0,0)||this;s.parts=[],s.parts2=[],s.inputEnabled=!1,s.skinId=a.Inventory.instance.skin;var n=l.AssetsStorage.instance,c="bike_"+a.Inventory.instance.skin+"_base";return s.image=new o(s.game,0,0,h.Atlases.Cars,c+"0000"),s.image.anchor.set(l.AssetsList.FRAMES_ANCHORX[s.skinId-1],l.AssetsList.FRAMES_ANCHORY[s.skinId-1]),s.addChild(s.image),s.explodedImage=r.GraphicUtil.createImage(0,0,0,n.getByKey("Car"+s.skinId.toString()+"FrameExploded")),s.explodedImage.visible=!1,s.addChild(s.explodedImage),s.boostAnim=r.GraphicUtil.createMovieClip(null,"RocketAnim",30,!0),s.boostAnim.x=-28,s.boostAnim.y=-10,s.boostAnim.animations.play("RocketAnim",30,!0),s.addChildAt(s.boostAnim,0),s}return s(e,t),e.prototype.update2=function(t){for(var i=0;i=e.PART_COUNT&&(this.partPos=0)},e.PART_COUNT=60,e}(Phaser.Sprite);e.FrameGraphic=c},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(2),a=function(t){function e(){var e=t.call(this,n.GraphicUtil.game,0,0)||this,i=o.AssetsStorage.instance.getByKey("Car4TrailPart");return e}return s(e,t),e}(Phaser.Sprite);e.TrailPart=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(46),o=i(0),a=i(3),r=function(t){function e(e,i){var s=t.call(this,o.GraphicUtil.game,0,0,a.Atlases.Cars,"Wheel_"+o.Inventory.instance.skin+"_"+e.wheels.toString()+"0000")||this;return s.parts=[],s.anchor.set(.5),s}return s(e,t),e.prototype.createGroundParts=function(){for(var t=0;t=e.PART_COUNT&&(this.partPos=0),this.hasParts=!0},e.prototype.update2=function(t){if(this.hasParts){this.hasParts=!1;for(var i=0;i0&&s){var r=this.speed/this.wheelRadius;if(rthis.MIN_AC_BR_TIME&&(this.maxVelTimer=this.MAX_VEL_TIME),this.accelWithBrakeTimer=0),this.brakePart=this.accelWithBrakeTimer/this.MIN_AC_BR_TIME,this.brakePart>1&&(this.brakePart=1);var f;n?(f=this.frontWheel.body,Math.abs(f.angularVel)<1&&(this.brakeJoint.jointMin=this.brakeJoint.jointMax=f.rotation-this.frame.body.rotation,this.brakeJoint.active=!0),f.angularVel*=.25,this.backWheel.brake(!0),s||(this.backWheel.body.angularVel=0)):(this.brakeJoint.active=!1,this.backWheel.brake(!1)),s?(f=this.backWheel.body,this.maxVelTimer>0?(f.angularVel<1.2*a&&f.applyAngularImpulse(1.5*t*o),this.maxVelTimer-=t):(f.angularVel<0&&(f.angularVel*=.5),f.angularVel0&&(this.endGroundCollisionDelay-=t,this.endGroundCollisionDelay<=0&&(this.hasGround=!1)),this.graphic.update(t),this.effector.update(t)},e.prototype.restart=function(){r.NapeUtil.stopBody(this.body),r.NapeUtil.resetStartPos(this.body),r.NapeUtil.clearUserData(this.body),r.NapeUtil.setupStartPos(this.body),this.effector.reset(),this.body.userData.reviewX=this.body.position.x,this.body.userData.reviewY=this.body.position.y},e.prototype.release=function(){this.localSmokePos.dispose(),this.localSmokePos=null,this.localFirePos=null,r.NapeUtil.disposeBody(this.body),this.body=null,this.effector.dispose(),this.effector=null,t.prototype.release.call(this)},e.prototype.review=function(){this.body.position.setxy(this.body.userData.reviewX,this.body.userData.reviewY),this.body.rotation=0},e}(a.GameObject);e.FrameObject=l},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.geom.Vec2,o=i(1),a=i(0),r=i(16),h=function(t){function e(){var e=t.call(this)||this;return e.type=o.ObjectTypes.CAR_PART,e}return s(e,t),e.prototype.restart=function(){this.timer=0,this.hide()},e.prototype.create=function(t){void 0===t&&(t=null),this.space=this.body.space,this.localPos=t,this.body.userData.graphicEx=this.graphic,this.restart()},e.prototype.put=function(t){var i=t.localPointToWorld(this.localPos,!1);this.body.position.set(i),i.dispose(),this.body.rotation=t.rotation%(2*Math.PI);var s=-.25*Math.PI-.5*Math.PI*Math.random();this.localPos.x>0?s+=.25*Math.PI:s-=.25*Math.PI;var o=250,a=n.fromPolar(250,s);a.addeq(t.velocity),this.body.velocity.set(a),a.dispose(),this.body.angularVel=2*Math.random()-1,this.body.space=this.space,this.graphic.visible=!0,this.graphic.position.set(this.body.position.x,this.body.position.y),this.graphic.rotation=this.body.rotation,this.timer=e.LIFE_TIME},e.prototype.hide=function(){this.body.space=null,this.graphic.visible=!1},e.prototype.release=function(){this.localPos=null,this.body.space=null,this.space=null,r.NapeUtil.disposeBody(this.body),this.body=null},e.prototype.update=function(t){void 0===t&&(t=0),this.timer>0&&(this.timer-=t,this.timer<=0&&(a.RaceCamera.inCamera(this.graphic.x,this.graphic.y,32)?this.timer=e.LIFE_TIME:this.hide()))},e.LIFE_TIME=2,e}(a.GameObject);e.PartObject=h},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(1),a=i(16),r=i(38),h=function(t){function e(){var e=t.call(this)||this;return e.landFlyTime=0,e.DISABLECCD_OFF_TIME=.25,e.DISABLECCD_ON_TIME=.05,e.hasGround=!1,e.endGroundCollisionDelay=0,e.END_GROUND_COLLISION_DELAY=.25,e.START_SPIN_FRICTION=.01,e.START_SPIN_DELAY=1,e.SMOKE_INIT_DELTA=250,e.isPlayer=!0,e.braked=!1,e.type=o.ObjectTypes.CAR,e}return s(e,t),e.prototype.create=function(e){void 0===e&&(e=null),t.prototype.create.call(this,e),this.friction=this.material.dynamicFriction,this.circle=this.body.shapes.at(0),this.radius=this.circle.radius,a.NapeUtil.setupStartPos(this.body),this.freq=this.distanceJoint.frequency,this.jointMax=this.distanceJoint.jointMax,this.jointMin=this.distanceJoint.jointMin,this.lineMax=this.lineJoint.jointMax,this.effector=new n.BodyEffector(this.body),this.restart()},e.prototype.restart=function(){this.body.constraints.length>0&&(this.body.constraints.at(0).active=!1,this.body.constraints.at(1).active=!1),this.flyTime=0,this.material.staticFriction=this.material.dynamicFriction=this.friction,this.body.disableCCD=!0,this.disableOnDelay=0,this.startSpinDelay=0,a.NapeUtil.stopBody(this.body),a.NapeUtil.resetStartPos(this.body),this.body.constraints.length>0&&(this.body.constraints.at(0).active=!0,this.body.constraints.at(1).active=!0),this.brakeJoint&&(this.brakeJoint.active=!1),this.trail&&this.trail.init(this.body.position.x,this.body.position.y),this.effector.reset()},e.prototype.release=function(){this.lineJoint.compound=null,this.lineJoint.body1=null,this.lineJoint.body2=null,this.lineJoint=null,this.distanceJoint.compound=null,this.distanceJoint.body1=null,this.distanceJoint.body2=null,this.distanceJoint=null,a.NapeUtil.disposeBody(this.body),this.body=null,this.circle=null,this.trail=null,this.effector.dispose(),this.effector=null,t.prototype.release.call(this)},e.prototype.update=function(t){void 0===t&&(t=0),this.startSpinDelay>0&&(this.startSpinDelay-=t,this.startSpinDelay<=0?this.material.staticFriction=this.material.dynamicFriction=this.friction:this.startSpinDelay<.5*this.START_SPIN_DELAY&&(this.material.staticFriction=this.START_SPIN_FRICTION+(this.friction-this.START_SPIN_FRICTION)*(.5*this.START_SPIN_DELAY-this.startSpinDelay)/(.5*this.START_SPIN_DELAY),this.material.dynamicFriction=this.material.staticFriction));for(var e=!1,i=this.body.arbiters.iterator(),s=0,n=0,o;i.hasNext();){var a=i.next();if(a.isCollisionArbiter()){if((a.body1===this.body?a.body2:a.body1).userData.isGround){e=!0;var r=a.collisionArbiter.contacts.at(0).position;s=r.x,n=r.y,o=a.collisionArbiter.normal.angle,a.body1===this.body&&(o+=Math.PI);break}}}if(e&&this.graphic&&this.isPlayer&&4!==this.skinId){var h=this.body.velocity.length,l=this.body.angularVel*this.radius;Math.abs(l)-Math.abs(h)>this.SMOKE_INIT_DELTA&&(this.graphic.emitGround(s,n,o,l>0),this.graphic.emitGround(s,n,o,l>0),this.graphic.emitGround(s,n,o,l>0))}e?(this.endGroundCollisionDelay=0,this.hasGround=!0,this.landFlyTime=this.flyTime,this.flyTime=0):this.hasGround&&0===this.endGroundCollisionDelay&&(this.endGroundCollisionDelay=this.END_GROUND_COLLISION_DELAY),this.hasGround?(this.disableOnDelay>0&&(this.disableOnDelay-=t,this.disableOnDelay<=0&&(this.disableOnDelay=0,this.body.disableCCD=!0)),this.endGroundCollisionDelay>0&&(this.endGroundCollisionDelay-=t,this.endGroundCollisionDelay<=0&&(this.hasGround=!1))):(this.flyTime+=t,this.flyTime>this.DISABLECCD_OFF_TIME&&(0===this.disableOnDelay&&(this.body.disableCCD=!1),this.disableOnDelay=this.DISABLECCD_ON_TIME)),this.isPlayer&&this.graphic.update2(t),this.trail&&this.trail.emit(this.body.position.x,this.body.position.y),this.effector.update(t)},e.prototype.startSpin=function(){this.distanceJoint.frequency=this.freq,this.startSpinDelay=this.START_SPIN_DELAY},e.prototype.brake=function(t){t?this.braked||(this.circle.material=this.brakeMaterial,this.body.shapes.remove(this.circle),this.body.shapes.add(this.circle)):this.braked&&(this.circle.material=this.material,this.body.shapes.remove(this.circle),this.body.shapes.add(this.circle)),this.braked=t},e.prototype.connect=function(t){this.body.constraints.length>1&&(this.body.constraints.at(0).active=t,this.body.constraints.at(1).active=t),t&&this.trail&&this.trail.init(this.body.position.x,this.body.position.y)},e.prototype.createTrail=function(){this.trail=new r.TrailParticlesSystem,this.trail.init(this.body.position.x,this.body.position.y)},e}(n.GameObject);e.WheelObject=h},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(1),a=i(2),r=i(32),h=function(t){function e(){var e=t.call(this)||this;return e.PART_1=-.2,e.PART_2=-.4,e.wasStarted=!1,e.type=o.ObjectTypes.BG,e}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null);var e=a.AssetsStorage.instance;this.graphic=n.GraphicUtil.game.add.group();var i=new a.SpriteData(e.getByKey("Bg0"));this.layer0=i.bitmapData,this.graphic.addChild(this.layer0);var s=null;i=new a.SpriteData(e.getByKey("Bg2")),i&&(this.layer2=i.bitmapData,this.layer2W=i.rect.width,this.layer2Rect=i.rect.clone(this.layer2Rect),this.graphic.addChild(this.layer2),s=i.bitmapData,s.x=this.layer2Rect.width-1,this.layer2.addChild(s),s=i.bitmapData,s.x=2*(this.layer2Rect.width-1),this.layer2.addChild(s),s=i.bitmapData,s.x=3*(this.layer2Rect.width-1),this.layer2.addChild(s),s=i.bitmapData,s.x=4*(this.layer2Rect.width-1),this.layer2.addChild(s),s=i.bitmapData,s.x=5*(this.layer2Rect.width-1),this.layer2.addChild(s),this.layer2.y=38),this.startDx=Math.random()*this.layer2W},e.prototype.update=function(t){void 0===t&&(t=0);var e;this.wasStarted?e=this.prevViewX+(n.RacesData.TARGET_X-this.prevTargetX)*r.RaceCamera.scale:(e=n.RacesData.TARGET_X+this.startDx,this.wasStarted=!0),this.prevViewX=e,this.prevTargetX=n.RacesData.TARGET_X,this.layer1&&this.updateLayer(e,this.PART_1,this.layer1,this.layer1W),this.layer2&&this.updateLayer(e,this.PART_2,this.layer2,this.layer2W)},e.prototype.updateLayer=function(t,e,i,s){var n=-t*e%s;i.x=-n},e.prototype.restart=function(){this.wasStarted=!1},e}(n.GameObject);e.BgObject=h},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(48),o=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.create=function(e){void 0===e&&(e=null),this.id=e.params.id,t.prototype.create.call(this,e)},e.prototype.activate=function(t){void 0===t&&(t=!0),this.graphic.visible=!t},e.prototype.isActive=function(){return!0},e}(n.DecorObject);e.DecorActObject=o},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(1),a=function(t){function e(e){var i=t.call(this)||this;return i.type=e?o.ObjectTypes.LANDSCAPE:o.ObjectTypes.FRONT,i}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null);var e=t.className;2===n.RacesData.map.settings.theme&&(this.type=o.ObjectTypes.LANDSCAPE_BACK);var i=e.indexOf("_dup");i>=0&&(e=e.substring(0,i));var s=n.GraphicUtil.game.add.group();s.x=t.params.x,s.y=t.params.y,isNaN(t.params.scaleX)||(s.scale.x=t.params.scaleX),isNaN(t.params.scaleY)||(s.scale.y=t.params.scaleY),s.rotation=t.params.rotation,this.graphic=s},e}(n.GameObject);e.DecorMultiObject=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null)},e}(n.GameObject);e.VectorDecor=o},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(1),a=i(5),r=i(4),h=i(2),l=function(t){function e(){var e=t.call(this)||this;return e.create(),e}return s(e,t),e.get=function(){return e.pool.length>0?e.pool.pop():new e},e.prototype.create=function(t){void 0===t&&(t=null),this.type=o.ObjectTypes.EFFECT,this.graphic=a.GraphicUtil.createMovieClip(null,h.AssetsStorage.instance.getByKey("glass_exp_anim"),30,!1),this.graphic.completeCallback=this.animComplete,this.graphic.scaleX=this.graphic.scaleY=2,this.graphic.visible=!1,r.MaxGameCore.instance.add(this)},e.prototype.animComplete=function(t){this.active=!1,this.graphic.visible=!1,null!=this.completeCallback&&(this.completeCallback(),this.completeCallback=null),e.pool[e.pool.length]=this},e.prototype.activate=function(t,e,i){void 0===i&&(i=null),this.active=!0,this.graphic.x=t,this.graphic.y=e,this.graphic.visible=!0,this.completeCallback=i},e.prototype.restart=function(){this.active&&(this.graphic.visible=!1,this.active=!1,this.completeCallback=null,e.pool[e.pool.length]=this)},e.prototype.update=function(t){void 0===t&&(t=0),this.active&&this.graphic.update(t)},e.prototype.release=function(){this.completeCallback=null,t.prototype.release.call(this)},e.pool=[],e}(n.GameObject);e.GlassExplodeObject=l},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(49),o=nape.geom.Vec2,a=nape.phys.BodyType,r=i(0),h=i(4),l=i(5),c=i(11),u=i(7),d=i(12),p=i(1),f=i(6),y=i(8),g=i(2),m=i(9),v=i(3),b=function(t){function e(){var e=t.call(this)||this;return e.switchOffDelay=0,e.isCrashed=!1,e}return s(e,t),e.getParts=function(){var t=e.pool[e.poolPos];return e.poolPos++,e.poolPos>=e.POOL_SIZE&&(e.poolPos=0),t},e.prototype.create=function(t){void 0===t&&(t=null),this.step=d.default.STEP,this.type=p.ObjectTypes.OBJECT,this.space=h.MaxGameCore.instance.getSpace();var e=t.params;this.safeId=e.safeId,this.ttl=e.ttl;var i=g.AssetsStorage.instance;this.className=t.className;var s=i.getByKey(this.className+"_data"),n=e.x,o=e.y,m=t.params.rotation*f.default.TO_RAD,v=u.Filters.GROUND;this.bodyW=s.w,this.bodyHHalf=.5*s.h,this.body=r.NapeUtil.createRectBodyWH(a.STATIC,v,!1,s.w,s.h,n,o,m,null,y.Materials.DEFAULT),this.body.cbTypes.add(c.CbTypes.GLASS),this.body.cbTypes.add(c.CbTypes.GROUND),this.body.userData.collideCallback=this.processCollide,this.body.userData.collideCallbackContext=this;var b=l.GraphicUtil.createImageWithObj(e,this.className);this.graphic=b,this.className.indexOf("Crashed")>=0&&(this.createParts(this.className),this.isCrashed=!0,this.partScale="GlassCrashed0"===this.className?1:.5),this.counter=0},e.prototype.createParts=function(t){if(null==e.pool){e.pool=[];for(var i=0;i0&&(this.switchOffDelay-=t,this.switchOffDelay<=0&&this.switchOff())},e.prototype.restart=function(){this.switchOffDelay=0,this.collided=!1,this.body.space=this.space,this.graphic.visible=!0,this.graphic.alpha=1,this.graphic.scale.x=1,this.graphic.scale.y=1},e.prototype.release=function(){this.space=null,this.clearPool(),t.prototype.release.call(this)},e.prototype.clearPool=function(){if(null!==e.pool){for(var t=0;te.ANIM_TIME||i.startAnim(i))},e.prototype.startAnim=function(t){t.isCrashed},e.prototype.crashGlass=function(){if(r.RaceCamera.inCamera(this.explodeX,this.explodeY,256)){var t=(new Date).getTime();t-e.lastCrashTime>e.MIN_CRASH_DELTA&&(e.lastCrashTime=t,m.default.getInstance().play(v.Sounds.GlassCrash))}var i=e.getParts(),s=i.length,n=o.get();n.setxy(-.25*this.bodyW+.5*Math.random()*this.bodyW,this.bodyHHalf);var a=this.collidePos;a.y+=2*this.bodyHHalf;for(var h=e.PARTS_DATA[this.className],l=this.body.rotation,c=0;c=0,c=!1;s&&(c=!0===e.isPillar)&&(e.physic=!1);var u=o.RacesData.map.settings.theme;if(3===e.lineId&&0===u?this.type=a.ObjectTypes.FRONT:3===e.lineId&&1===u?this.type=a.ObjectTypes.OBJECT:this.type=a.ObjectTypes.LANDSCAPE,0!==e.rotation){var d=r.default.normalizeVertices(t);t=d,e=d.params}var p=e.vertices,f=p.length,y=e.x,g=e.y;(s&&!c||!0===e.physic)&&(this.body=h.PhysicUtil.createGroundBody(t)),!0===e.physic&&(this.body=h.PhysicUtil.createGroundBody(t));var m=[],v=0,b,x,_,w;for(w=0;wv&&(v=P.y)}if(y+=x,g+=_,s&&(e.shape=!1,e.line=!0,e.lineId=13),!0!==e.shape&&!0!==e.line||(this.graphic=l.GraphicUtil.createGround(y,g,m,e.line,e.shape,v,e.lineId)),!0===e.camera){f=m.length;var C=e.cameraOffsetY;for(w=0;w=0,S=null,A=!1,E=!1;if(T||e.graphic){var I=null;if(T?S="pillar_line"+_.toString():4===_?E=!0:1===_?I="CandyPather":5==_?(I="line_spike",A=!0):6==_?I="line_wood_pather_pool":8==_?I="line_tube_bot":9==_?I="line_tube_top":10==_?I="line_tube_blick":S=4===_||5===_||6===_?"road_line9":"road_line"+(_+5).toString(),E){for(var M=new Array,O=0;O=0;this.type=s||1===i||7===i?h.ObjectTypes.LANDSCAPE_SHAPE:h.ObjectTypes.LANDSCAPE,s||(this.id=e.id,this.safeId=e.safeId,this.safeId<=-10&&(this.skipRevive=!0),null!==e.rem&&!1===e.rem&&(this.removeOnToogle=!1)),this.isStatic=s||e.isStatic;var n=e.x,y=e.y;if(s||!0===e.physic){var g=void 0;s?g=u.Materials.DEFAULT:1===e.density?g=u.Materials.GROUND:(g=u.Materials.GROUND.copy(),g.density=e.density);var m=void 0;if(m=s?d.Filters.SENSOR:!0===e.plr?d.Filters.PLAYER_ONLY:!0===e.ignore?d.Filters.NOTHING:d.Filters.GROUND,this.body=r.NapeUtil.createPolyBody(e,g,m,this.isStatic?a.STATIC:a.DYNAMIC),this.body.userData.isGround=!0,s){for(var v=this.body.shapes.iterator();v.hasNext();){v.next().sensorEnabled=!0}this.body.cbTypes.add(p.CbTypes.ZONE_FINISH)}else this.body.cbTypes.add(p.CbTypes.GROUND),3===i&&this.body.cbTypes.add(p.CbTypes.SAW),9===i&&this.body.cbTypes.add(p.CbTypes.SPIKES);this.body.align(),!0===e.isWheel&&(this.body.userData.isWheel=!0),this.body.space=this.space}if(s||!0===e.graphic){var b=0,x=0;this.body&&(b=-this.body.position.x+n,x=-this.body.position.y+y);var _=f.GraphicUtil.createLandscapeShape(t,b,x,s);this.graphic=_}if(this.body){if(0!==e.rotation){this.body.isDynamic()||(this.body.space=null);var w=o.get(n,y);this.body.rotate(w,l.default.TO_RAD*e.rotation),w.dispose(),this.body.isDynamic()||(this.body.space=this.space)}this.graphic&&(this.graphic.x=this.body.position.x,this.graphic.y=this.body.position.y,this.graphic,r.LandscapeShape,this.graphic.rotation=this.body.rotation),this.body.space=c.MaxGameCore.instance.getSpace()}else this.graphic.rotation=l.default.TO_RAD*e.rotation;this.body&&!this.isStatic&&(r.NapeUtil.setupStartPos(this.body),this.graphic instanceof r.LandscapeShape?this.body.userData.graphic=this.graphic:this.body.userData.graphicEx=this.graphic),this.removeOnToogle||this.id>=0&&this.activate(!1)},e.prototype.release=function(){if(e.textures){for(var i in e.textures)e.textures[i]&&(e.textures[i]=null);e.textures=null}this.space=null,t.prototype.release.call(this)},e.prototype.activate=function(t){if(void 0===t&&(t=!0),this.removeOnToogle){if(this.graphic&&(this.graphic.visible=!1),this.body){for(var e=this.body.constraints.iterator();e.hasNext();){var i=e.next();i instanceof n&&(i.active=!1)}this.body.space=null}}else this.body&&this.body.constraints.length<=0&&(this.body.space=t?this.space:null)},e.prototype.restart=function(){var t,e;if(this.removeOnToogle){if(this.graphic&&(this.graphic.visible=!0),this.body)for(this.body.space=this.space,t=this.body.constraints.iterator();t.hasNext();)(e=t.next())instanceof n&&(e.active=!0)}else this.id>=0&&this.activate(!1);this.body&&!this.isStatic&&(r.NapeUtil.stopBody(this.body),r.NapeUtil.resetStartPos(this.body))},e.prototype.review=function(){this.skipRevive&&this.body&&this.body.isKinematic()||this.restart()},e.prototype.isActive=function(){return!0},e}(r.GameObject);e.ShaperObject=y},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.geom.Vec2,o=nape.phys.BodyType,a=i(0),r=i(6),h=i(1),l=i(11),c=i(7),u=i(8),d=i(4),p=i(110),f=function(t){function e(){var e=t.call(this)||this;return e.id=-1,e}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.type=h.ObjectTypes.LANDSCAPE;var e=t.params;this.id=e.id;var i=e.x,s=e.y,f;f=u.Materials.GROUND;var y=0,g=0,m=c.Filters.WATER;if(this.id>-10&&(this.body=a.NapeUtil.createPolyBody(e,f,m,o.STATIC),this.body.cbTypes.add(l.CbTypes.WATER),3===e.layer&&this.body.cbTypes.add(l.CbTypes.SAW),this.body.align(),this.body&&(y=-this.body.position.x+i,g=-this.body.position.y+s)),this.graphic=new p.WaterShape(t,y,g),this.body){if(0!==e.rotation){var v=n.get(i,s);this.body.rotate(v,r.default.TO_RAD*e.rotation),v.dispose()}this.graphic&&(this.graphic.x=this.body.position.x,this.graphic.y=this.body.position.y,this.graphic instanceof a.LandscapeShape?this.graphic.rotation=r.default.TO_DEG*this.body.rotation:this.graphic.rotation=this.body.rotation),this.body.space=d.MaxGameCore.instance.getSpace();for(var b=0;b>0,u=o/c;for(n=0;n0&&(this.graphic=d.GraphicUtil.createImageWithObj(t.params,f.AssetsStorage.instance.getByKey("Motor"+(t.params.graphic-1).toString())),this.graphicRot=0),this.useWeldJoint=!0===t.params.useWeld,this.useWeldJoint?(this.phaseBase=this.pivot.body2.rotation-this.pivot.body1.rotation,this.weldJoint=new a(this.pivot.body1,this.pivot.body2,this.pivot.anchor1,this.pivot.anchor2,this.phaseBase),this.weldJoint.ignore=!0,this.weldJoint.space=this.space):s.allowRotation=!1}this.snd=!0===t.params.snd,e.dispose()},e.prototype.activate=function(t){if(void 0===t&&(t=!0),this.useWeldJoint,t){if(this.active)return;this.motor&&(this.useWeldJoint?this.weldJoint.active=!1:this.motor.body2.allowRotation=!0,this.motor.active=t,this.timer=this.time,this.active=!0)}else{var e=this.motor.body2;this.motor.active=!1,e.angularVel=0,this.useWeldJoint?(this.weldJoint.phase=this.weldJoint.body2.rotation-this.weldJoint.body1.rotation,this.weldJoint.active=!0):e.allowRotation=!1}},e.prototype.restart=function(){this.motor&&(this.motor.space=null,this.motor.space=this.space,this.pivot.space=null,this.pivot.space=this.space,this.motor.active=!1,this.useWeldJoint?(this.weldJoint.active=!1,this.weldJoint.phase=this.phaseBase,this.weldJoint.active=!0):this.motor.body2.allowRotation=!1),this.active=!1},e.prototype.release=function(){this.pivot&&(this.pivot.body1=null,this.pivot.body2=null,this.pivot.space=null,this.motor.body1=null,this.motor.body2=null,this.motor.space=null),this.useWeldJoint&&(this.weldJoint.body1=null,this.weldJoint.body2=null,this.weldJoint.space=null),this.space=null,t.prototype.release.call(this)},e.prototype.update=function(t){void 0===t&&(t=0);var e=this.motor.body2;if(this.active&&(this.timer>0&&(this.graphic&&(this.graphicRot+=t*this.motor.rate,this.graphic.rotation=this.graphicRot%(2*Math.PI)),this.timer>0&&(this.timer-=t,this.useWeldJoint,this.timer<=0&&(this.motor.active=!1,e.angularVel=0,this.useWeldJoint?(this.weldJoint.phase=this.weldJoint.body2.rotation-this.weldJoint.body1.rotation,this.weldJoint.active=!0):e.allowRotation=!1))),this.graphic&&this.isDynamic)){var i=e.localPointToWorld(this.pivot.anchor2,!1);this.graphic.x=i.x,this.graphic.y=i.y,i.dispose()}},e.prototype.review=function(){this.skipRevive||this.restart()},e.prototype.isActive=function(){return!0},e}(h.GameObject);e.MotorObject=y},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.geom.Vec2,o=nape.phys.Body,a=nape.phys.BodyType,r=nape.shape.Circle,h=i(0),l=i(4),c=i(8),u=i(7),d=i(6),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cpId=-1,e.accelDist=0,e.accel=0,e.breaked=!1,e.dir=1,e.prevDir=1,e}return s(e,t),e.prototype.switchOn=function(t){this.active&&(this.stopOnPoint||this.stopOnEnd)||(this.dir+=t,this.active=0!==this.dir,this.active?this.checkChangePointDir():(this.body.velocity.x=0,this.body.velocity.y=0,this.updateBodyGraphic()))},e.prototype.switchOff=function(t){if(this.stopOnEnd||this.stopOnPoint){if(0!==this.dir)return;this.dir+=t,this.active=0!==this.dir,this.active?this.checkChangePointDir():(this.body.velocity.x=0,this.body.velocity.y=0,this.updateBodyGraphic())}else this.dir-=t,this.active=0!==this.dir,this.active?this.checkChangePointDir():(this.body.velocity.x=0,this.body.velocity.y=0,this.updateBodyGraphic())},e.prototype.checkChangePointDir=function(){this.dir*this.prevDir<0&&(this.pointDir*=-1,this.velocity.muleq(-1),this.timeToPoint=this.timeToPointTotal-this.timeToPoint),this.prevDir=this.dir},e.prototype.release=function(){this.velocity.dispose(),this.velocity=null,this.body=null,t.prototype.release.call(this)},e.prototype.restart=function(){this.startTime=this.baseStartTime,this.active=this.baseActive,this.angleSpeed=0,this.baseActive?this.dir=1:this.dir=0,this.pointId=0,this.pointDir=1,null!=this.body.userData.graphic&&(this.body.userData.graphic.visible=!0),this.body.space=this.space;for(var t=0,e=!1,i=0;i0){var s=this.points[i].sub(this.points[i-1]),n=s.length;if(t+=n,!e&&t>=this.position){this.pointId=i-1;var o=1-(t-this.position)/n;this.body.position.x=this.points[i-1].x+o*(this.points[i].x-this.points[i-1].x),this.body.position.y=this.points[i-1].y+o*(this.points[i].y-this.points[i-1].y),this.calcVel(),e=!0}s.dispose()}this.breaked=!1,this.body.type=a.KINEMATIC,this.body.allowRotation=!1,this.updateBodyGraphic()},e.prototype.create=function(t){void 0===t&&(t=null),this.space=l.MaxGameCore.instance.getSpace(),this.id=t.params.id,this.safeId=t.params.safeId;var e=null;if(t.params.body)this.body=new o(a.KINEMATIC,n.weak()),this.body.shapes.add(new r(16,null,c.Materials.DEFAULT,u.Filters.NOTHING)),this.body.space=this.space;else{for(var i=n.get(t.params.x,t.params.y),s=h.NapeUtil.bodiesUnderPoint(this.space,i);!s.empty()&&(e=s.pop(),!e.isDynamic());)e=null;e&&(this.body=e,e.type=a.KINEMATIC,h.NapeUtil.stopBody(e)),i.dispose()}this.speed=this.baseSpeed=t.params.speed,this.accelDist=null===t.params.accelDist?0:t.params.accelDist,this.accelDist>0&&(this.minSpeed=.05*this.baseSpeed,this.accel=(this.baseSpeed*this.baseSpeed-this.minSpeed*this.minSpeed)/(2*this.accelDist)),this.cycle=1===t.params.cycle,this.active=this.baseActive=1===t.params.active,this.startTime=this.baseStartTime=t.params.startTime,this.sideWait=t.params.sideWait?t.params.sideWait:0,this.sideAngle=t.params.sideAngle?t.params.sideAngle*d.default.TO_RAD:0,this.cpId=t.params.cpId,this.body.userData.correct=!0,this.space=this.body.space,this.baseRot=this.body.rotation,this.stopOnEnd=!0===t.params.stopOnEnd,this.stopOnPoint=!0===t.params.stopOnPoint,this.baseActive?this.dir=1:this.dir=0,this.pointId=0,this.pointDir=1;var p=t.params.vertices;this.points=new Array(p.length),this.position=t.params.position,this.velocity=n.get();for(var f=0,y=!1,g=0;g0){var m=this.points[g].sub(this.points[g-1]),v=m.length;if(f+=v,!y&&f>=this.position){this.pointId=g-1;var b=1-(f-this.position)/v;this.body.position.x=this.points[g-1].x+b*(this.points[g].x-this.points[g-1].x),this.body.position.y=this.points[g-1].y+b*(this.points[g].y-this.points[g-1].y),this.calcVel(),y=!0}m.dispose()}this.totalLength=f,this.body.userData.handler=this,this.body.userData.hasMover=!0},e.prototype.calcVel=function(){var t=this.body.position,e=this.getNextPoint(),i=e.sub(t,!0),s=i.angle;this.velocity.x=Math.cos(s)*this.speed,this.velocity.y=Math.sin(s)*this.speed;var n=i.length;this.timeToPointTotal=this.timeToPoint=n/this.speed},e.prototype.calcAccelVel=function(t){var e=0,i;if(this.pointDir>0){for(i=1;i<=this.pointId;i++)e+=n.distance(this.points[i-1],this.points[i]);e+=n.distance(this.points[this.pointId],this.body.position)}else{for(i=this.points.length-2;i>=this.pointId;i--)e+=n.distance(this.points[i+1],this.points[i]);e+=n.distance(this.points[this.pointId],this.body.position),e=this.totalLength-e}ethis.totalLength-this.accelDist?this.speed=this.minSpeed+(this.totalLength-e)/this.accelDist*(this.baseSpeed-this.minSpeed):this.speed=this.baseSpeed;var s=this.body.position,o=this.getNextPoint(),a=o.sub(s,!0),r=a.angle;this.velocity.x=Math.cos(r)*this.speed,this.velocity.y=Math.sin(r)*this.speed;var h=a.length;this.timeToPointTotal=this.timeToPoint=h/this.speed},e.prototype.getNextPoint=function(){return this.pointDir>0?this.pointId>=this.points.length-1?this.points[0]:this.points[this.pointId+1]:this.pointId<=0?this.points[this.points.length-1]:this.points[this.pointId-1]},e.prototype.update=function(t){void 0===t&&(t=0),this.breaked||(this.active?(!0===this.body.userData.skipMove?this.body.velocity.x=this.body.velocity.y=0:this.startTime>0?(this.body.velocity.x=this.body.velocity.y=0,this.startTime-=t,this.startTime<=0?0!==this.sideAngle&&0!==this.angleSpeed&&(this.angleSpeed=0,this.body.rotation=this.sideTarget):0!==this.sideAngle&&0!==this.angleSpeed&&(this.body.rotation+=this.angleSpeed*t)):(this.timeToPoint>0?this.accelDist>0&&this.calcAccelVel(t):(this.pointId+=this.pointDir,0===this.pointId||this.pointId===this.points.length-1?(this.sideWait>0&&(this.startTime=this.sideWait,0!==this.sideAngle&&(0===this.pointId?(this.sideTarget=this.baseRot,this.angleSpeed=-this.sideAngle/this.sideWait):(this.sideTarget=this.baseRot+this.sideAngle,this.angleSpeed=this.sideAngle/this.sideWait))),this.cycle||(this.pointDir*=-1),this.stopOnEnd&&(this.active=!1,this.dir=0,null!==this.body&&this.body.position.set(this.points[this.pointId]))):(this.pointId<0||this.pointId>this.points.length-1)&&(this.pointDir>0?this.pointId=0:this.pointId=this.points.length-1),this.accelDist>0?this.calcAccelVel(t):this.calcVel(),this.stopOnPoint&&(this.active=!1)),this.active?(this.body.velocity.x=this.velocity.x,this.body.velocity.y=this.velocity.y):(this.body.velocity.x=0,this.body.velocity.y=0),this.timeToPoint-=t),this.updateBodyGraphic()):(this.body.allowMovement=!1,this.body.velocity.x=0,this.body.velocity.y=0))},e.prototype.updateBodyGraphic=function(){var t=this.body.userData.graphic;null!=t?(t.x=this.body.position.x,t.y=this.body.position.y,t.rotation=this.body.rotation):null!=(t=this.body.userData.graphicEx)&&(t.x=this.body.position.x,t.y=this.body.position.y,t.rotation=this.body.rotation)},e.prototype.review=function(){this.restart()},e.prototype.activate=function(t){void 0===t&&(t=!0),t?this.switchOn(1):this.switchOff(1)},e.prototype.isActive=function(){return!0},e}(h.GameObject);e.MoverPatherObject=p},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.constraint.PivotJoint,o=nape.geom.Vec2,a=i(0),r=i(4),h=i(5),l=i(2),c=i(1),u=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.type=c.ObjectTypes.OBJECT,this.space=r.MaxGameCore.instance.getSpace();var e=t.params;this.id=e.id,this.safeId=e.safeId;for(var i=o.get(e.x,e.y),s=a.NapeUtil.bodiesUnderPoint(this.space,i),u=null,d=null,p=!0;!s.empty();){var f=s.pop();if(f.isDynamic()){if(null===u)u=f;else if(!0!==u.userData.isPT&&!0===f.userData.isPT)d=u,u=f;else if(null===d){if(d=f,!0===d.userData.isPT)break}else if(!0!==d.userData.isPT&&!0===f.userData.isPT){d=f;break}}else null===d&&(d=f)}if(u){null===d&&(d=this.space.world);var y=u.worldPointToLocal(i),g=d.worldPointToLocal(i);this.pivot=new n(u,d,y,g),this.pivot.ignore=!0,this.pivot.space=this.space,y.dispose(),g.dispose();var m=null===e.graphic?0:e.graphic;if(m>0){var v=l.AssetsStorage.instance,b="Pivot"+(m-1).toString();this.graphic=h.GraphicUtil.createImageWithObj(e,v.getByKey(b)),this.graphic&&(this.isDynamic=!(u.isStatic()||d.isStatic()),this.body2=d)}}i.dispose()},e.prototype.activate=function(t){void 0===t&&(t=!0),this.active||(this.pivot.active=!1,this.active=!0)},e.prototype.restart=function(){this.pivot&&(this.pivot.space=null,this.pivot.space=this.space,!0!==this.pivot.userData.skipActive&&(this.pivot.active=!0)),this.active=!1},e.prototype.release=function(){this.pivot&&(this.pivot.body1=null,this.pivot.body2=null,this.pivot.space=null),this.body2=null,this.space=null,t.prototype.release.call(this)},e.prototype.review=function(){this.restart()},e.prototype.isActive=function(){return!0},e.prototype.update=function(t){if(void 0===t&&(t=0),this.isDynamic){var e=this.body2.localPointToWorld(this.pivot.anchor2,!1);this.graphic.x=e.x,this.graphic.y=e.y,e.dispose()}},e}(a.GameObject);e.PivotObject=u},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(51),o=i(4),a=function(t){function e(){var e=t.call(this)||this;return e.INIT_TIME=1,e.REMOVE_TIME=1,e.initTimer=0,e}return s(e,t),e.prototype.create=function(e){void 0===e&&(e=null),t.prototype.create.call(this,e),this.space=o.MaxGameCore.instance.getSpace(),this.initTimer=this.INIT_TIME},e.prototype.update=function(t){void 0===t&&(t=0),this.active?this.timer>0&&(this.timer-=t,this.timer<=0?(this.body.space=null,this.graphic.visible=!1):this.timer<.5*this.REMOVE_TIME&&(this.graphic.alpha=this.timer/(.5*this.REMOVE_TIME))):this.initTimer>0?this.initTimer-=t:this.body.velocity.length>100&&(this.active=!0,this.timer=this.REMOVE_TIME)},e.prototype.activate=function(e){void 0===e&&(e=!0),this.active||t.prototype.activate.call(this,e)},e.prototype.restart=function(){this.initTimer=this.INIT_TIME,this.active=!1,this.graphic.alpha=1,this.graphic.visible=!0,this.body.space=this.space,t.prototype.restart.call(this)},e.prototype.release=function(){this.space=null,t.prototype.release.call(this)},e}(n.DynamicBodyObject);e.RemovedBodyObjects=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.phys.BodyType,o=i(0),a=i(1),r=i(7),h=i(5),l=i(11),c=i(8),u=i(9),d=i(24),p=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.type=a.ObjectTypes.OBJECT,this.body=o.NapeUtil.createRectBody(n.STATIC,r.Filters.SENSOR,!0,t.params,l.CbTypes.SAFE_POINT,c.Materials.DEFAULT),this.body.userData.id=t.params.id,this.body.userData.collideCallback=this.processCollide,this.body.userData.collideCallbackContext=this,this.graphic=h.GraphicUtil.createMovieClip(t.params,"SafePointAnim")},e.prototype.processCollide=function(t){t.active||(t.active=!0,u.default.getInstance().play(d.default.SavePoint),t.graphic.animations.getAnimation("SafePointAnim").play(30,!1))},e.prototype.restart=function(){this.active=!1;var t=this.graphic.animations.getAnimation("SafePointAnim");t.play(30,!1,!1),t.frame=0,t.restart(),t.stop()},e}(o.GameObject);e.SafePointObject=p},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.phys.BodyType,o=i(0),a=i(1),r=i(7),h=i(6),l=i(5),c=i(11),u=i(8),d=i(2),p=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.type=a.ObjectTypes.OBJECT;var e=d.AssetsStorage.instance,i=t.className,s=e.getByKey(i+"_data"),p=t.params,f=p.x,y=p.y,g=t.params.rotation*h.default.TO_RAD,m=r.Filters.GROUND;this.body=o.NapeUtil.createRectBodyWH(n.STATIC,m,!1,s.w,s.h,f,y,g,c.CbTypes.SPIKES,u.Materials.DEFAULT),this.graphic=l.GraphicUtil.createImageWithObj(p,e.getByKey(i))},e}(o.GameObject);e.SpikesObject=p},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.geom.Ray,o=nape.geom.Vec2,a=nape.phys.BodyType,r=i(0),h=i(1),l=i(5),c=i(7),u=i(4),d=i(6),p=i(8),f=i(39),y=i(2),g=i(9),m=i(3),v=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.id=t.params.id,this.safeId=t.params.safeId,this.type=h.ObjectTypes.OBJECT;var e=y.AssetsStorage.instance,i=t.className,s=e.getByKey(i+"_data"),f=t.params,g=f.x,m=f.y;this.x=g,this.y=m,this.graphic=l.GraphicUtil.createImageWithObj(f,e.getByKey(i)),t.params.physic&&(this.body=r.NapeUtil.createRectBodyWH(a.DYNAMIC,c.Filters.WITH_EARTH_ONLY,!1,s.w,s.h,g,m,d.default.TO_RAD*f.rotation,null,p.Materials.DEFAULT),this.body.userData.handler=this,this.body.userData.graphicEx=this.graphic,r.NapeUtil.setupStartPos(this.body)),this.space=u.MaxGameCore.instance.getSpace(),f.impulse>0?(this.impulse=f.impulse,this.count=f.count,this.angle=2*Math.PI/this.count,this.ray=new n(o.weak(g,m),o.weak(1,0)),this.radius=f.radius,this.ray.maxDistance=this.radius):this.impulse=0,this.stones=!0===t.params.stones},e.prototype.processCollide=function(){if(this.body&&(this.body.space=null),this.impulse>0)for(var t=0;t=0&&t&&(a.MaxGameCore.instance.activate(i.id,!0),i.deactivated||(i.body.space=null),i.sensCount++),i.id_off>=0&&t&&(a.MaxGameCore.instance.activate(i.id_off,!1),i.deactivated||(i.body.space=null))),t||--i.sensCount<=0&&a.MaxGameCore.instance.activate(i.id,t),t&&(i.active||i.sndId>=0&&c.default.getInstance().play(1===i.sndId?u.Sounds.Wendy:u.Sounds.FlySound()),i.active=!0)},e.prototype.review=function(){this.restart()},e}(o.GameObject);e.ToggleObject=d},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(0),o=i(12),a=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),this.id=t.params.id;var i=t.params.width,s=t.params.height,n=i/s,a=o.default.GAME_W/o.default.GAME_H;this.x=t.params.x,this.y=t.params.y,n===a?(this.scale=o.default.GAME_W/i,this.move=e.STATIC):n>a?(this.move=e.HOR,this.scale=o.default.GAME_H/s,this.minMove=this.x-.5*i+.5*this.scale*i,this.maxMove=this.x+.5*i-.5*this.scale*i):(this.move=e.VER,this.scale=o.default.GAME_W/i,this.minMove=this.y-.5*s+.5*this.scale*s,this.maxMove=this.y+.5*s-.5*this.scale*s)},e.prototype.activate=function(t){void 0===t&&(t=!0),t?(e.focusedOnPoint=!1,e.current=this):this.deactivate()},e.prototype.deactivate=function(){e.current===this&&(e.current=null)},e.prototype.dispose=function(){e.current=null},e.prototype.restart=function(){e.current=null},e.prototype.isActive=function(){return!0},e.STATIC=0,e.HOR=1,e.VER=2,e.focusedOnPoint=!1,e}(n.GameObject);e.CameraZone=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=nape.phys.BodyType,o=i(0),a=i(7),r=i(8),h=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(i){void 0===i&&(i=null),t.prototype.create.call(this,i);var s,h=i.className;this.body=o.NapeUtil.createRectBody(n.STATIC,a.Filters.SENSOR,!0,i.params,void 0,r.Materials.DEFAULT),e.addCarsToUserData(this.body,i.params),"TiltZone"===h?(this.body.userData.backChance=i.params.backChance,this.body.userData.frontChance=i.params.frontChance):"BrakeZone"===h&&(this.body.userData.chance=i.params.chance)},e.addCarsToUserData=function(t,e){var i=e.cars;if(null!=i&&i.length>0){var s=i.split(",");t.userData.cars={};for(var n=0;n400){var e=t.int1.castBody.position;d.RaceCamera.inCamera(e.x,e.y,0)&&c.default.getInstance().play(u.Sounds.Wood)}},e.prototype.onBarrelHit=function(t){if(t.arbiters.at(0).collisionArbiter.normalImpulse().length>400){var e=t.int1.castBody.position;d.RaceCamera.inCamera(e.x,e.y,0)&&c.default.getInstance().play(Math.random()>.5?u.Sounds.Barrel1:u.Sounds.Barrel2)}},e.prototype.onDriverSaw=function(t){var e=t.int1.castBody.userData.handler;e&&(e.processDriverSpikes(),e.processDriverGround(),e.explode())},e.prototype.onCarSaw=function(t){t.int1.castBody.userData.handler.processDriverGround(),t.int1.castBody.userData.handler.explode()},e.prototype.onCarSpikes=function(t){t.int1.castBody.userData.handler.processDriverGround(),t.int1.castBody.userData.handler.explode()},e.prototype.onDriverSpikes=function(t){var e=t.int2.castBody,i=t.int1.castBody;e.isStatic()?(l.NapeUtil.stopBody(i),i.allowMovement=i.allowRotation=!1):i.userData.driverPart.pinTo(e),t.int1.castBody.userData.handler.processDriverSpikes(),t.int1.castBody.userData.handler.processDriverGround()},e.prototype.onDriverGround=function(t){t.int1.castBody.userData.handler.processDriverGround(),t.int1.castBody.userData.handler.explode()},e.prototype.onCarSafePoint=function(t){var e=t.int2.castBody,i=t.int1.castBody.userData.handler;if(i&&!i.dead){i.setReviewPos(e.position.x,e.position.y,e.userData.id);var s=t.int2.castBody.userData.collideCallbackContext;t.int2.castBody.userData.collideCallback(s)}},e.prototype.onCarGlass=function(t){var e=t.int2.castBody.userData.collideCallbackContext;t.int2.castBody.userData.collideCallback(t.arbiters.at(0).collisionArbiter.contacts.at(0).position,e)},e.prototype.onFinish=function(t){var e=t.int1.castBody.userData.handler;e&&e.processFinish(t.int1.castBody.userData.collideCallbackContext)},e.prototype.onDestroyedSens=function(t){var e=t.int2.castBody,i=t.int1.castBody,s=e.userData.collideCallback;s(e.userData.collideCallbackContext)&&s(i)},e.prototype.onBoost=function(t){var e=t.int2.castBody.userData;(0,e.collideCallback)(e.collideCallbackContext)&&t.int1.castBody.userData.handler.addBoost(e.time,e.force)},e.onToggleSens=function(t){if(t.event===n.BEGIN){var e=t.int2.castBody;if(null===e.space)return;var i=null===t.int1.castShape?t.int1.castBody:t.int1.castShape.body,s=e.userData.collideCallback,o=e.userData.collideCallbackContext;s(!0,i.userData.handler.dead,o)}else{var s=t.int2.castBody.userData.collideCallback;if(s){var o=t.int2.castBody.userData.collideCallbackContext;s(!1,!1,o)}}},e.proccessZoneSens=function(t,e,i,s){if(s)t.userData[i]=!1;else if(null===e.userData.cars||!0===e.userData.cars[t.userData.skinId]){var n=e.userData.chance;Math.random()0){var i=this.compound.COM(),n=this.body.rotation,o=s.get(t*this.force*Math.cos(n),t*this.force*Math.sin(n));if(this.body.applyImpulse(o,i),o.dispose(),i.dispose(),e||(this.body.angularVel*=.8),this.timeLeft-=t,this.timeLeft<=0)return this.anim.visible=!1,null!=this.snd&&this.snd.stop(),!0}return!1},t.prototype.dispose=function(){this.anim=null,this.body=null,this.compound=null},t.prototype.restart=function(){this.anim.visible=!1,this.timeLeft=0,this.force=0},t}();e.BoostEffector=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(52),o=i(36),a=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.getDrive=function(){var t=0;return o.default.instance.isbtnDown?(t--,this.brake=!0):this.brake=!1,o.default.instance.isbtnUp?(t++,this.accell=!0):this.accell=!1,t},e.prototype.getBoost=function(){return t.prototype.getBoost.call(this)},e.prototype.getUseItem=function(){return this.car.itemId>=0},e.prototype.getTilt=function(){var t=0;return o.default.instance.isbtnLeft&&t--,o.default.instance.isbtnRight&&t++,t},e}(n.CarController);e.PlayerController=a},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0;var n=i(21),o=i(20),a=i(14),r=function(t){function e(e,i,s){void 0===s&&(s=n.default.Garage);var a=t.call(this,e,i,o.default.styleChooseLevel,null,null,s)||this;return a.signalSelect=new Phaser.Signal,a.selected=!1,a.tween=null,a.tween2=null,a.id=i,a.btn.onInputDown.add(a.onDown,a),a}return s(e,t),e.prototype.getSelect=function(){return this.selected},e.prototype.getID=function(){return this.id},e.prototype.setColor=function(t){this.color=t},e.prototype.setSelect=function(t){this.selected=t,this.color>=0?this.selectTint():this.selectTween(),this.signalSelect.dispatch(this)},e.prototype.selectTint=function(){this.selected?(this.btn.tint=this.color,this.label.alpha=.7):(this.label.alpha=1,this.btn.tint=16777215)},e.prototype.selectTween=function(){this.selected?(this.tween=this.game.add.tween(this.scale),this.tween.to({x:1.1,y:1.1},300,Phaser.Easing.Linear.None,!1),this.tween2=this.game.add.tween(this.scale),this.tween2.to({x:1,y:1},300,Phaser.Easing.Linear.None,!1),this.tween2.onComplete.add(this.startTween1,this),this.tween.onComplete.add(this.startTween2,this),this.startTween1()):(this.tween&&(this.tween.stop(!1),this.game.tweens.remove(this.tween),this.tween2.stop(!1),this.game.tweens.remove(this.tween2)),this.scale.set(1),this.tween=null,this.tween2=null)},e.prototype.startTween1=function(){this.tween.start()},e.prototype.startTween2=function(){this.tween2.start()},e.prototype.onDown=function(){this.setSelect(!0)},e.prototype.destroy=function(e){this.signalSelect.removeAll(),this.signalSelect=null,t.prototype.destroy.call(this,e)},e}(a.default);e.default=r},function(t,e,i){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}();e.__esModule=!0,i(13),i(10);var n=i(18),o=i(3),a=i(9),r=function(t){function e(e,i,s,a,r,h,l,c,u,d){var p=t.call(this,e,i,s,d,h,l)||this;return p.anchor.set(.5),p.maxWidth=c||p.width,p.maxHeight=u||p.height,p.label=new n.default(p.game,0,2*o.Constants.GAME_SCALE,a,r,p.maxWidth,p.maxHeight),p.label.anchor.set(.5),p.addChild(p.label),p.onInputUp.add(p.playSound,p),p.game.add.existing(p),p}return s(e,t),e.prototype.createTexture=function(t){var e=this.game.make.graphics(0,0);e.beginFill(0,.3).drawRoundedRect(5,5*o.Constants.GAME_SCALE,this.maxWidth-10*o.Constants.GAME_SCALE,this.maxHeight,15*o.Constants.GAME_SCALE).beginFill(t).drawRoundedRect(0,0,this.maxWidth,this.maxHeight,15*o.Constants.GAME_SCALE).lineStyle(3,16777215).drawRoundedRect(0,0,this.maxWidth-2,this.maxHeight-2,15*o.Constants.GAME_SCALE).endFill(),this.texture=e.generateTexture(),e.destroy(!0)},e.prototype.setText=function(t){this.label.setText(t)},e.prototype.updateScaling=function(t){this.scale.set(t),this.label.setMaxSize(.9*this.width,.98*this.height),this.label.setText(this.label.text)},e.prototype.destroy=function(e){this.label.destroy(e),this.id=null,this.label=null,t.prototype.destroy.call(this,e)},e.prototype.playSound=function(){a.default.getInstance().play(o.Sounds.Click)},e}(Phaser.Button);e.default=r}]); \ No newline at end of file diff --git a/rooftopsnipers2/icon.png b/rooftopsnipers2/icon.png new file mode 100755 index 00000000..84975aa7 Binary files /dev/null and b/rooftopsnipers2/icon.png differ