commit 70aefd11ad9dc1112db876f47ee47f75e7c70390 Author: Omghi I <112293999+broplsss@users.noreply.github.com> Date: Sun Oct 9 02:48:47 2022 +0000 Initial commit diff --git a/.replit b/.replit new file mode 100644 index 0000000..6ea2d23 --- /dev/null +++ b/.replit @@ -0,0 +1,179 @@ +hidden=[".config"] + +# hosting is currently hardcoded for this language +# [hosting] +# route = "/" +# directory= "/" + +[nix] +channel = "stable-21_11" + +[languages.html] +pattern = "**/*.html" + [languages.html.languageServer] +start = "vscode-html-language-server --stdio" + [languages.html.languageServer.initializationOptions] + provideFormatter = true + [languages.html.languageServer.configuration.html] + customData = [ ] + autoCreateQuotes = true + autoClosingTags = true + mirrorCursorOnMatchingTag = false + + [languages.html.languageServer.configuration.html.completion] + attributeDefaultValue = "doublequotes" + + [languages.html.languageServer.configuration.html.format] + enable = true + wrapLineLength = 120 + unformatted = "wbr" + contentUnformatted = "pre,code,textarea" + indentInnerHtml = false + preserveNewLines = true + indentHandlebars = false + endWithNewline = false + extraLiners = "head, body, /html" + wrapAttributes = "auto" + templating = false + unformattedContentDelimiter = "" + + [languages.html.languageServer.configuration.html.suggest] + html5 = true + + [languages.html.languageServer.configuration.html.validate] + scripts = true + styles = true + + [languages.html.languageServer.configuration.html.hover] + documentation = true + references = true + + [languages.html.languageServer.configuration.html.trace] + server = "off" + +[languages.javascript] +pattern = "**/{*.js,*.jsx,*.ts,*.tsx,*.mjs,*.cjs}" + [languages.javascript.languageServer] +start = "typescript-language-server --stdio" + +[languages.css] +pattern = "**/{*.less,*.scss,*.css}" + [languages.css.languageServer] +start = "vscode-css-language-server --stdio" + [languages.css.languageServer.configuration.css] + customData = [ ] + validate = true + + [languages.css.languageServer.configuration.css.completion] + triggerPropertyValueCompletion = true + completePropertyWithSemicolon = true + + [languages.css.languageServer.configuration.css.hover] + documentation = true + references = true + + [languages.css.languageServer.configuration.css.lint] + # Configure linting + # ignore = don't show any warning or error + # warning = show yellow underline + # error = show red underline + argumentsInColorFunction = "error" # Invalid number of parameters + boxModel = "ignore" # Do not use width or height when using padding or border + compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties" + duplicateProperties = "warning" # Do not use duplicate style definitions + emptyRules = "warning" # Do not use empty rulesets + float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. + fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties + hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers + idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML. + ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older + important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. + importStatement = "ignore" # Import statements do not load in parallel + propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display + universalSelector = "ignore" # The universal selector (*) is known to be slow + unknownAtRules = "warning" # Unknown at-rule + unknownProperties = "warning" # Unknown property. + validProperties = [ ] # add some properties that the linter doesn't know about + unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property. + vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property + zeroUnits = "ignore" # No unit for zero needed + + [languages.css.languageServer.configuration.css.trace] + server = "off" + + [languages.css.languageServer.configuration.scss] + validate = true + + [languages.css.languageServer.configuration.scss.completion] + triggerPropertyValueCompletion = true + completePropertyWithSemicolon = true + + [languages.css.languageServer.configuration.scss.hover] + documentation = true + references = true + + [languages.css.languageServer.configuration.scss.lint] + # Configure linting + # ignore = don't show any warning or error + # warning = show yellow underline + # error = show red underline + argumentsInColorFunction = "error" # Invalid number of parameters + boxModel = "ignore" # Do not use width or height when using padding or border + compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties" + duplicateProperties = "warning" # Do not use duplicate style definitions + emptyRules = "warning" # Do not use empty rulesets + float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. + fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties + hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers + idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML. + ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older + important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. + importStatement = "ignore" # Import statements do not load in parallel + propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display + universalSelector = "ignore" # The universal selector (*) is known to be slow + unknownAtRules = "warning" # Unknown at-rule + unknownProperties = "warning" # Unknown property. + validProperties = [ ] # add some properties that the linter doesn't know about + unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property. + vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property + zeroUnits = "ignore" # No unit for zero needed" + + [languages.css.languageServer.configuration.less] + validate = true + + [languages.css.languageServer.configuration.less.completion] + triggerPropertyValueCompletion = true + completePropertyWithSemicolon = true + + [languages.css.languageServer.configuration.less.hover] + documentation = true + references = true + + [languages.css.languageServer.configuration.less.lint] + # Configure linting + # ignore = don't show any warning or error + # warning = show yellow underline + # error = show red underline + argumentsInColorFunction = "error" # Invalid number of parameters + boxModel = "ignore" # Do not use width or height when using padding or border + compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties" + duplicateProperties = "warning" # Do not use duplicate style definitions + emptyRules = "warning" # Do not use empty rulesets + float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. + fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties + hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers + idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML. + ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older + important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. + importStatement = "ignore" # Import statements do not load in parallel + propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display + universalSelector = "ignore" # The universal selector (*) is known to be slow + unknownAtRules = "warning" # Unknown at-rule + unknownProperties = "warning" # Unknown property. + validProperties = [ ] # add some properties that the linter doesn't know about + unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property. + vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property + zeroUnits = "ignore" # No unit for zero needed" + +[gitHubImport] +requiredFiles = [".replit", "replit.nix", ".config"] \ No newline at end of file diff --git a/assets/atlases/x1/cars_game.json b/assets/atlases/x1/cars_game.json new file mode 100644 index 0000000..fea36a6 --- /dev/null +++ b/assets/atlases/x1/cars_game.json @@ -0,0 +1,323 @@ +{"frames": { + +"Car1FrameExploded0000": +{ + "frame": {"x":135,"y":2,"w":117,"h":66}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":117,"h":66}, + "sourceSize": {"w":117,"h":66} +}, +"Car3FrameExploded0000": +{ + "frame": {"x":2,"y":64,"w":129,"h":59}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":129,"h":59}, + "sourceSize": {"w":129,"h":59} +}, +"Car5FrameExploded0000": +{ + "frame": {"x":2,"y":2,"w":131,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":131,"h":60}, + "sourceSize": {"w":131,"h":60} +}, +"RocketAnim0000": +{ + "frame": {"x":2,"y":182,"w":128,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":28}, + "sourceSize": {"w":128,"h":28} +}, +"RocketAnim0001": +{ + "frame": {"x":2,"y":212,"w":128,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":28}, + "sourceSize": {"w":128,"h":28} +}, +"RocketAnim0002": +{ + "frame": {"x":2,"y":242,"w":128,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":28}, + "sourceSize": {"w":128,"h":28} +}, +"RocketAnim0003": +{ + "frame": {"x":2,"y":272,"w":128,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":28}, + "sourceSize": {"w":128,"h":28} +}, +"RocketAnim0004": +{ + "frame": {"x":2,"y":302,"w":128,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":28}, + "sourceSize": {"w":128,"h":28} +}, +"RocketAnim0005": +{ + "frame": {"x":2,"y":332,"w":128,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":28}, + "sourceSize": {"w":128,"h":28} +}, +"Wheel_1_00000": +{ + "frame": {"x":177,"y":230,"w":42,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":42,"h":41}, + "sourceSize": {"w":42,"h":41} +}, +"Wheel_3_00000": +{ + "frame": {"x":132,"y":226,"w":43,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":43,"h":43}, + "sourceSize": {"w":43,"h":43} +}, +"Wheel_5_00000": +{ + "frame": {"x":132,"y":271,"w":40,"h":39}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":39}, + "sourceSize": {"w":40,"h":39} +}, +"bike_1_base0000": +{ + "frame": {"x":2,"y":125,"w":110,"h":55}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":55}, + "sourceSize": {"w":110,"h":55} +}, +"bike_3_base0000": +{ + "frame": {"x":133,"y":70,"w":121,"h":56}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":121,"h":56}, + "sourceSize": {"w":121,"h":56} +}, +"bike_5_base0000": +{ + "frame": {"x":114,"y":128,"w":106,"h":52}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":52}, + "sourceSize": {"w":106,"h":52} +}, +"driver_arm10000": +{ + "frame": {"x":2,"y":362,"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":132,"y":347,"w":22,"h":15}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":15}, + "sourceSize": {"w":22,"h":15} +}, +"driver_arm50000": +{ + "frame": {"x":226,"y":350,"w":23,"h":13}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":23,"h":13}, + "sourceSize": {"w":23,"h":13} +}, +"driver_corpse10000": +{ + "frame": {"x":153,"y":312,"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":221,"y":230,"w":22,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":35}, + "sourceSize": {"w":22,"h":35} +}, +"driver_corpse50000": +{ + "frame": {"x":222,"y":128,"w":25,"h":36}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":25,"h":36}, + "sourceSize": {"w":25,"h":36} +}, +"driver_forearm10000": +{ + "frame": {"x":24,"y":362,"w":22,"h":9}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":9}, + "sourceSize": {"w":22,"h":9} +}, +"driver_forearm30000": +{ + "frame": {"x":156,"y":357,"w":25,"h":11}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":25,"h":11}, + "sourceSize": {"w":25,"h":11} +}, +"driver_forearm50000": +{ + "frame": {"x":233,"y":216,"w":21,"h":9}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":21,"h":9}, + "sourceSize": {"w":21,"h":9} +}, +"driver_head10000": +{ + "frame": {"x":216,"y":273,"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":174,"y":273,"w":40,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":28}, + "sourceSize": {"w":40,"h":28} +}, +"driver_head50000": +{ + "frame": {"x":132,"y":182,"w":54,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":42}, + "sourceSize": {"w":54,"h":42} +}, +"driver_hip10000": +{ + "frame": {"x":233,"y":202,"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":200,"y":350,"w":24,"h":13}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":24,"h":13}, + "sourceSize": {"w":24,"h":13} +}, +"driver_hip50000": +{ + "frame": {"x":173,"y":321,"w":28,"h":18}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":28,"h":18}, + "sourceSize": {"w":28,"h":18} +}, +"driver_shin10000": +{ + "frame": {"x":233,"y":166,"w":21,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":21,"h":34}, + "sourceSize": {"w":21,"h":34} +}, +"driver_shin30000": +{ + "frame": {"x":132,"y":312,"w":19,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":32}, + "sourceSize": {"w":19,"h":32} +}, +"driver_shin50000": +{ + "frame": {"x":216,"y":302,"w":22,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":29}, + "sourceSize": {"w":22,"h":29} +}, +"suspend_back10000": +{ + "frame": {"x":174,"y":303,"w":38,"h":16}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":38,"h":16}, + "sourceSize": {"w":38,"h":16} +}, +"suspend_back30000": +{ + "frame": {"x":249,"y":128,"w":5,"h":5}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":5,"h":5}, + "sourceSize": {"w":5,"h":5} +}, +"suspend_back50000": +{ + "frame": {"x":203,"y":333,"w":33,"h":15}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":15}, + "sourceSize": {"w":33,"h":15} +}, +"suspend_front10000": +{ + "frame": {"x":173,"y":341,"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":249,"y":135,"w":5,"h":5}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":5,"h":5}, + "sourceSize": {"w":5,"h":5} +}, +"suspend_front50000": +{ + "frame": {"x":188,"y":182,"w":43,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":43,"h":46}, + "sourceSize": {"w":43,"h":46} +}}, +"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/assets/atlases/x1/cars_game.png b/assets/atlases/x1/cars_game.png new file mode 100644 index 0000000..401d151 Binary files /dev/null and b/assets/atlases/x1/cars_game.png differ diff --git a/assets/atlases/x1/garage.json b/assets/atlases/x1/garage.json new file mode 100644 index 0000000..e6cc834 --- /dev/null +++ b/assets/atlases/x1/garage.json @@ -0,0 +1,387 @@ +{"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":709,"y":890,"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":741,"y":890,"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":2,"y":922,"w":337,"h":230}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":337,"h":230}, + "sourceSize": {"w":337,"h":230} +}, +"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":959,"y":408,"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":560,"y":1178,"w":53,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":53,"h":44}, + "sourceSize": {"w":53,"h":44} +}, +"InGameMusicButton0002": +{ + "frame": {"x":615,"y":1178,"w":53,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":53,"h":44}, + "sourceSize": {"w":53,"h":44} +}, +"InGamePauseButton0000": +{ + "frame": {"x":979,"y":936,"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":341,"y":1097,"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":406,"y":1097,"w":63,"h":79}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":79}, + "sourceSize": {"w":63,"h":79} +}, +"LeveMapItemLocked0002": +{ + "frame": {"x":471,"y":1097,"w":63,"h":79}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":79}, + "sourceSize": {"w":63,"h":79} +}, +"LeveMapItemLocked0003": +{ + "frame": {"x":536,"y":1097,"w":63,"h":79}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":79}, + "sourceSize": {"w":63,"h":79} +}, +"LeveMapItemLocked0004": +{ + "frame": {"x":601,"y":1097,"w":63,"h":79}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":79}, + "sourceSize": {"w":63,"h":79} +}, +"LeveMapItemLocked0005": +{ + "frame": {"x":773,"y":1127,"w":63,"h":79}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":79}, + "sourceSize": {"w":63,"h":79} +}, +"apple_btn0000": +{ + "frame": {"x":773,"y":1015,"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":165,"y":1154,"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":221,"y":1154,"w":54,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":86}, + "sourceSize": {"w":54,"h":86} +}, +"arrow_key0000": +{ + "frame": {"x":838,"y":1127,"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":277,"y":1178,"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":1012,"y":94,"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":666,"y":1097,"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":2,"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":918,"y":228,"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":918,"y":228,"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":955,"y":1015,"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":918,"y":326,"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":2,"y":1154,"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":341,"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":773,"y":953,"w":203,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":203,"h":60}, + "sourceSize": {"w":203,"h":60} +}, +"improved_bg0000": +{ + "frame": {"x":724,"y":94,"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} +}, +"next_btn0000": +{ + "frame": {"x":943,"y":1077,"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":724,"y":232,"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":341,"y":1012,"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":74,"y":1154,"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":496,"y":1178,"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":863,"y":333,"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":863,"y":408,"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":918,"y":1155,"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":724,"y":333,"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":879,"y":94,"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":773,"y":1077,"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":773,"y":890,"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":362,"y":1178,"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":429,"y":1178,"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":979,"y":890,"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/assets/atlases/x1/garage.png b/assets/atlases/x1/garage.png new file mode 100644 index 0000000..0102e39 Binary files /dev/null and b/assets/atlases/x1/garage.png differ diff --git a/assets/atlases/x1/theme0.json b/assets/atlases/x1/theme0.json new file mode 100644 index 0000000..485daf5 --- /dev/null +++ b/assets/atlases/x1/theme0.json @@ -0,0 +1,1491 @@ +{"frames": { + +"BarrelE0000": +{ + "frame": {"x":716,"y":422,"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":516,"y":2,"w":427,"h":160}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":427,"h":160}, + "sourceSize": {"w":427,"h":160} +}, +"Bg2_00000": +{ + "frame": {"x":2,"y":2,"w":512,"h":240}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":512,"h":240}, + "sourceSize": {"w":512,"h":240} +}, +"CandyGround0000": +{ + "frame": {"x":878,"y":230,"w":58,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":58,"h":28}, + "sourceSize": {"w":58,"h":28} +}, +"CandyPather0000": +{ + "frame": {"x":1467,"y":970,"w":58,"h":16}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":58,"h":16}, + "sourceSize": {"w":58,"h":16} +}, +"CandyPillar0000": +{ + "frame": {"x":1999,"y":752,"w":32,"h":8}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":8}, + "sourceSize": {"w":32,"h":8} +}, +"CarExplode0000": +{ + "frame": {"x":260,"y":244,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0001": +{ + "frame": {"x":774,"y":260,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0002": +{ + "frame": {"x":1002,"y":260,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0003": +{ + "frame": {"x":1230,"y":260,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0004": +{ + "frame": {"x":1458,"y":260,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0005": +{ + "frame": {"x":1686,"y":260,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0006": +{ + "frame": {"x":488,"y":422,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0007": +{ + "frame": {"x":2,"y":502,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0008": +{ + "frame": {"x":230,"y":503,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0009": +{ + "frame": {"x":716,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0010": +{ + "frame": {"x":944,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0011": +{ + "frame": {"x":1172,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0012": +{ + "frame": {"x":1172,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0013": +{ + "frame": {"x":1400,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0014": +{ + "frame": {"x":1400,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0015": +{ + "frame": {"x":1628,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0016": +{ + "frame": {"x":1628,"y":519,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0017": +{ + "frame": {"x":458,"y":681,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0018": +{ + "frame": {"x":458,"y":681,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0019": +{ + "frame": {"x":2,"y":761,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0020": +{ + "frame": {"x":2,"y":761,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0021": +{ + "frame": {"x":230,"y":762,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0022": +{ + "frame": {"x":230,"y":762,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0023": +{ + "frame": {"x":686,"y":778,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0024": +{ + "frame": {"x":686,"y":778,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0025": +{ + "frame": {"x":914,"y":778,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"CarExplode0026": +{ + "frame": {"x":914,"y":778,"w":226,"h":257}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":226,"h":257}, + "sourceSize": {"w":226,"h":257} +}, +"Dec130000": +{ + "frame": {"x":1856,"y":519,"w":141,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":141,"h":241}, + "sourceSize": {"w":141,"h":241} +}, +"Dec140000": +{ + "frame": {"x":1142,"y":778,"w":193,"h":284}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":193,"h":284}, + "sourceSize": {"w":193,"h":284} +}, +"Dec150000": +{ + "frame": {"x":1337,"y":778,"w":89,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":89,"h":130}, + "sourceSize": {"w":89,"h":130} +}, +"Dec160000": +{ + "frame": {"x":1914,"y":260,"w":120,"h":239}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":239}, + "sourceSize": {"w":120,"h":239} +}, +"Dec190000": +{ + "frame": {"x":1664,"y":923,"w":79,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":79,"h":102}, + "sourceSize": {"w":79,"h":102} +}, +"Dec290000": +{ + "frame": {"x":1977,"y":146,"w":64,"h":83}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":83}, + "sourceSize": {"w":64,"h":83} +}, +"Dec300000": +{ + "frame": {"x":1428,"y":778,"w":80,"h":140}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":80,"h":140}, + "sourceSize": {"w":80,"h":140} +}, +"Dec310000": +{ + "frame": {"x":1977,"y":2,"w":62,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":62,"h":142}, + "sourceSize": {"w":62,"h":142} +}, +"Dec320000": +{ + "frame": {"x":1745,"y":923,"w":54,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":130}, + "sourceSize": {"w":54,"h":130} +}, +"Dec330000": +{ + "frame": {"x":1337,"y":923,"w":195,"h":45}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":195,"h":45}, + "sourceSize": {"w":195,"h":45} +}, +"Dec340000": +{ + "frame": {"x":458,"y":982,"w":198,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":198,"h":38}, + "sourceSize": {"w":198,"h":38} +}, +"Dec350000": +{ + "frame": {"x":458,"y":940,"w":195,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":195,"h":40}, + "sourceSize": {"w":195,"h":40} +}, +"GeyserBase0000": +{ + "frame": {"x":488,"y":244,"w":25,"h":129}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":25,"h":129}, + "sourceSize": {"w":25,"h":129} +}, +"GlassCrashed00000": +{ + "frame": {"x":320,"y":1021,"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":1078,"y":1037,"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":1597,"y":1055,"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":1977,"y":231,"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":1999,"y":715,"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":1977,"y":247,"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":1337,"y":910,"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":1729,"y":1055,"w":70,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":22}, + "sourceSize": {"w":70,"h":22} +}, +"LineChain0000": +{ + "frame": {"x":1999,"y":697,"w":32,"h":16}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":16}, + "sourceSize": {"w":32,"h":16} +}, +"LineSpike00000": +{ + "frame": {"x":1534,"y":923,"w":128,"h":64}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":64}, + "sourceSize": {"w":128,"h":64} +}, +"Motor00000": +{ + "frame": {"x":810,"y":1037,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +}, +"Motor10000": +{ + "frame": {"x":716,"y":478,"w":36,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":38}, + "sourceSize": {"w":36,"h":38} +}, +"Pivot00000": +{ + "frame": {"x":754,"y":478,"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":1965,"y":1039,"w":74,"h":21}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":74,"h":21}, + "sourceSize": {"w":74,"h":21} +}, +"PlankCandy00000": +{ + "frame": {"x":320,"y":1045,"w":86,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":86,"h":20}, + "sourceSize": {"w":86,"h":20} +}, +"PlankCandy10000": +{ + "frame": {"x":990,"y":1037,"w":86,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":86,"h":22}, + "sourceSize": {"w":86,"h":22} +}, +"PlankCandy20000": +{ + "frame": {"x":1877,"y":1039,"w":86,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":86,"h":22}, + "sourceSize": {"w":86,"h":22} +}, +"PlankCandy30000": +{ + "frame": {"x":1337,"y":1044,"w":86,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":86,"h":20}, + "sourceSize": {"w":86,"h":20} +}, +"Removed00000": +{ + "frame": {"x":458,"y":503,"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":458,"y":580,"w":18,"h":51}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":18,"h":51}, + "sourceSize": {"w":18,"h":51} +}, +"RoadLine0_00000": +{ + "frame": {"x":1467,"y":970,"w":58,"h":16}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":58,"h":16}, + "sourceSize": {"w":58,"h":16} +}, +"RoadLine0_40000": +{ + "frame": {"x":1663,"y":1027,"w":64,"h":36}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":36}, + "sourceSize": {"w":64,"h":36} +}, +"RoadLine0_70000": +{ + "frame": {"x":1337,"y":1022,"w":128,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":20}, + "sourceSize": {"w":128,"h":20} +}, +"RoadLine0_80000": +{ + "frame": {"x":686,"y":765,"w":20,"h":6}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":20,"h":6}, + "sourceSize": {"w":20,"h":6} +}, +"RoadLine0_Bg0000": +{ + "frame": {"x":1999,"y":629,"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":1914,"y":501,"w":128,"h":12}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":12}, + "sourceSize": {"w":128,"h":12} +}, +"RoadPillar0_20000": +{ + "frame": {"x":680,"y":1037,"w":128,"h":18}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":18}, + "sourceSize": {"w":128,"h":18} +}, +"RoadTile0_10000": +{ + "frame": {"x":1856,"y":762,"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":1986,"y":762,"w":58,"h":58}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":58,"h":58}, + "sourceSize": {"w":58,"h":58} +}, +"SafePointAnim0001": +{ + "frame": {"x":1986,"y":822,"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":1801,"y":995,"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":146,"y":1021,"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":2,"y":1020,"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":774,"y":164,"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":2036,"y":231,"w":10,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":10,"h":130}, + "sourceSize": {"w":10,"h":130} +}, +"SpikesE0000": +{ + "frame": {"x":1337,"y":970,"w":128,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":50}, + "sourceSize": {"w":128,"h":50} +}, +"Tnt10000": +{ + "frame": {"x":260,"y":1021,"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":858,"y":1037,"w":64,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":32}, + "sourceSize": {"w":64,"h":32} +}, +"UnLine10000": +{ + "frame": {"x":924,"y":1037,"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":2015,"y":247,"w":11,"h":11}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":11,"h":11}, + "sourceSize": {"w":11,"h":11} +}, +"boost_anim0000": +{ + "frame": {"x":1510,"y":820,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0001": +{ + "frame": {"x":1510,"y":820,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0002": +{ + "frame": {"x":1613,"y":820,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0003": +{ + "frame": {"x":1613,"y":820,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0004": +{ + "frame": {"x":1716,"y":820,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0005": +{ + "frame": {"x":1716,"y":820,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0006": +{ + "frame": {"x":1819,"y":892,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0007": +{ + "frame": {"x":1819,"y":892,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0008": +{ + "frame": {"x":1922,"y":892,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"boost_anim0009": +{ + "frame": {"x":1922,"y":892,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +}, +"finish0000": +{ + "frame": {"x":1597,"y":989,"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":1999,"y":515,"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":1999,"y":515,"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":2013,"y":515,"w":12,"h":112}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, + "sourceSize": {"w":12,"h":112} +}, +"geyser_anim0003": +{ + "frame": {"x":2013,"y":515,"w":12,"h":112}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, + "sourceSize": {"w":12,"h":112} +}, +"geyser_anim0004": +{ + "frame": {"x":2027,"y":515,"w":12,"h":112}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, + "sourceSize": {"w":12,"h":112} +}, +"geyser_anim0005": +{ + "frame": {"x":2027,"y":515,"w":12,"h":112}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":12,"h":112}, + "sourceSize": {"w":12,"h":112} +}, +"glass_explode_anim0000": +{ + "frame": {"x":1768,"y":778,"w":76,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, + "sourceSize": {"w":76,"h":38} +}, +"glass_explode_anim0001": +{ + "frame": {"x":1768,"y":778,"w":76,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, + "sourceSize": {"w":76,"h":38} +}, +"glass_explode_anim0002": +{ + "frame": {"x":458,"y":1022,"w":76,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, + "sourceSize": {"w":76,"h":38} +}, +"glass_explode_anim0003": +{ + "frame": {"x":458,"y":1022,"w":76,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, + "sourceSize": {"w":76,"h":38} +}, +"glass_explode_anim0004": +{ + "frame": {"x":536,"y":1022,"w":76,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, + "sourceSize": {"w":76,"h":38} +}, +"glass_explode_anim0005": +{ + "frame": {"x":536,"y":1022,"w":76,"h":38}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":76,"h":38}, + "sourceSize": {"w":76,"h":38} +}, +"ground_part_anim0000": +{ + "frame": {"x":754,"y":496,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0001": +{ + "frame": {"x":754,"y":496,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0002": +{ + "frame": {"x":1840,"y":818,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0003": +{ + "frame": {"x":1840,"y":818,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0004": +{ + "frame": {"x":1840,"y":834,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0005": +{ + "frame": {"x":1840,"y":834,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0006": +{ + "frame": {"x":1840,"y":850,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0007": +{ + "frame": {"x":1840,"y":850,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0008": +{ + "frame": {"x":1840,"y":866,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0009": +{ + "frame": {"x":1840,"y":866,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0010": +{ + "frame": {"x":1801,"y":923,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0011": +{ + "frame": {"x":1801,"y":923,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0012": +{ + "frame": {"x":2025,"y":924,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0013": +{ + "frame": {"x":2025,"y":924,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0014": +{ + "frame": {"x":1801,"y":939,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0015": +{ + "frame": {"x":1801,"y":939,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0016": +{ + "frame": {"x":655,"y":940,"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":655,"y":940,"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":2025,"y":940,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0019": +{ + "frame": {"x":2025,"y":940,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0020": +{ + "frame": {"x":1801,"y":955,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0021": +{ + "frame": {"x":1801,"y":955,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0022": +{ + "frame": {"x":655,"y":956,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0023": +{ + "frame": {"x":655,"y":956,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0024": +{ + "frame": {"x":2025,"y":956,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"ground_part_anim0025": +{ + "frame": {"x":2025,"y":956,"w":14,"h":14}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":14,"h":14}, + "sourceSize": {"w":14,"h":14} +}, +"hell_rider_head0000": +{ + "frame": {"x":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"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":76,"y":1020,"w":68,"h":68}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":68}, + "sourceSize": {"w":68,"h":68} +}, +"ive_side0000": +{ + "frame": {"x":614,"y":1022,"w":64,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":44}, + "sourceSize": {"w":64,"h":44} +}, +"line0000": +{ + "frame": {"x":1999,"y":663,"w":30,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":32}, + "sourceSize": {"w":30,"h":32} +}, +"line_ivy0000": +{ + "frame": {"x":878,"y":164,"w":64,"h":64}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":64}, + "sourceSize": {"w":64,"h":64} +}, +"line_metal_g0000": +{ + "frame": {"x":1877,"y":995,"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":924,"y":1037,"w":64,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":32}, + "sourceSize": {"w":64,"h":32} +}, +"line_stone_shape0000": +{ + "frame": {"x":1510,"y":778,"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":1467,"y":1035,"w":128,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":20}, + "sourceSize": {"w":128,"h":20} +}, +"line_wood_g0000": +{ + "frame": {"x":1467,"y":989,"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":680,"y":1057,"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":488,"y":375,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0001": +{ + "frame": {"x":488,"y":396,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0002": +{ + "frame": {"x":458,"y":633,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0003": +{ + "frame": {"x":458,"y":654,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0004": +{ + "frame": {"x":686,"y":681,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0005": +{ + "frame": {"x":686,"y":702,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0006": +{ + "frame": {"x":686,"y":723,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0007": +{ + "frame": {"x":1999,"y":731,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0008": +{ + "frame": {"x":2020,"y":731,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0009": +{ + "frame": {"x":686,"y":744,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0010": +{ + "frame": {"x":1819,"y":818,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0011": +{ + "frame": {"x":1819,"y":839,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0012": +{ + "frame": {"x":1819,"y":860,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0013": +{ + "frame": {"x":2025,"y":882,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"smoke_part_anim0014": +{ + "frame": {"x":2025,"y":903,"w":19,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":19,"h":19}, + "sourceSize": {"w":19,"h":19} +}, +"tile0000": +{ + "frame": {"x":1719,"y":2,"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":516,"y":164,"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":1203,"y":2,"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":1461,"y":2,"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":945,"y":2,"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":2,"y":244,"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":2048,"h":2048}, + "scale": "1" +} +} diff --git a/assets/atlases/x1/theme0.png b/assets/atlases/x1/theme0.png new file mode 100644 index 0000000..132dcd2 Binary files /dev/null and b/assets/atlases/x1/theme0.png differ diff --git a/assets/box2dweb/dragonBones.min.js b/assets/box2dweb/dragonBones.min.js new file mode 100644 index 0000000..804b45a --- /dev/null +++ b/assets/box2dweb/dragonBones.min.js @@ -0,0 +1 @@ +"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/assets/box2dweb/nape.min.js b/assets/box2dweb/nape.min.js new file mode 100644 index 0000000..99feba0 --- /dev/null +++ b/assets/box2dweb/nape.min.js @@ -0,0 +1 @@ +(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/assets/css/AllerDisplay.css b/assets/css/AllerDisplay.css new file mode 100644 index 0000000..7dfcce5 --- /dev/null +++ b/assets/css/AllerDisplay.css @@ -0,0 +1,9 @@ +@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/assets/css/CfCrackBold.css b/assets/css/CfCrackBold.css new file mode 100644 index 0000000..e0f44ab --- /dev/null +++ b/assets/css/CfCrackBold.css @@ -0,0 +1,9 @@ +@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/assets/css/app.css b/assets/css/app.css new file mode 100644 index 0000000..1058bca --- /dev/null +++ b/assets/css/app.css @@ -0,0 +1,84 @@ +/*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/assets/css/impact.css b/assets/css/impact.css new file mode 100644 index 0000000..db6b539 --- /dev/null +++ b/assets/css/impact.css @@ -0,0 +1,9 @@ +@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/assets/fonts/AllerDisplay/AllerDisplay.woff b/assets/fonts/AllerDisplay/AllerDisplay.woff new file mode 100644 index 0000000..0f3666a Binary files /dev/null and b/assets/fonts/AllerDisplay/AllerDisplay.woff differ diff --git a/assets/fonts/CfCrackBold/cfcrackandbold.woff b/assets/fonts/CfCrackBold/cfcrackandbold.woff new file mode 100644 index 0000000..edf5ce2 Binary files /dev/null and b/assets/fonts/CfCrackBold/cfcrackandbold.woff differ diff --git a/assets/fonts/Impact/impact.woff b/assets/fonts/Impact/impact.woff new file mode 100644 index 0000000..604daf8 Binary files /dev/null and b/assets/fonts/Impact/impact.woff differ diff --git a/assets/images/x1/bikes_texture.png b/assets/images/x1/bikes_texture.png new file mode 100644 index 0000000..e94d6f6 Binary files /dev/null and b/assets/images/x1/bikes_texture.png differ diff --git a/assets/images/x1/menu_texture.png b/assets/images/x1/menu_texture.png new file mode 100644 index 0000000..3532bc4 Binary files /dev/null and b/assets/images/x1/menu_texture.png differ diff --git a/assets/levels/1.json b/assets/levels/1.json new file mode 100644 index 0000000..5fcd854 --- /dev/null +++ b/assets/levels/1.json @@ -0,0 +1 @@ +{"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/assets/levels/bike.json b/assets/levels/bike.json new file mode 100644 index 0000000..d5bad56 --- /dev/null +++ b/assets/levels/bike.json @@ -0,0 +1 @@ +{"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/assets/levels/bikes_skeleton.json b/assets/levels/bikes_skeleton.json new file mode 100644 index 0000000..ccc1cad --- /dev/null +++ b/assets/levels/bikes_skeleton.json @@ -0,0 +1 @@ +{"frameRate":24,"name":"bikes","version":"5.5","compatibleVersion":"5.5","armature":[{"name":"biker0_anim_btn","bone":[{"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_hip","transform":{"x":-17.15,"y":-58.55,"skX":30,"skY":30}},{"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":"wheel back","transform":{"x":-42.9,"y":-17.95}},{"inheritScale":false,"name":"wheel front","transform":{"x":40.2,"y":-17.95}},{"inheritScale":false,"name":"fx","transform":{"x":-104.2,"y":-4.9,"scX":1.4022,"scY":1.4022}}],"slot":[{"name":"base","parent":"base"},{"name":"driver_corpse","parent":"driver_corpse"},{"name":"driver_hip","parent":"driver_hip"},{"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":"wheel back","parent":"wheel back"},{"name":"wheel front","parent":"wheel front"},{"name":"fx","parent":"fx"}],"skin":[{"slot":[{"name":"base","display":[{"name":"base","transform":{"x":5.45,"y":-6.5}}]},{"name":"driver_corpse","display":[{"name":"driver_corpse","transform":{"x":0.95,"y":-1}}]},{"name":"driver_hip","display":[{"name":"drive_hip","transform":{"x":-0.45,"y":-0.1}}]},{"name":"driver_shin","display":[{"name":"driver_shin","transform":{"x":2.85,"y":-0.25}}]},{"name":"driver_arm","display":[{"name":"driver_arm","transform":{"x":0.15,"y":2}}]},{"name":"driver_forearm","display":[{"name":"driver_forearm","transform":{"x":0.4,"y":1}}]},{"name":"driver_head","display":[{"name":"driver_head","transform":{"x":6.6,"y":0.75}}]},{"name":"wheel back","display":[{"name":"wheel"}]},{"name":"wheel front","display":[{"name":"wheel"}]},{"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":"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_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_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":"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":"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.25,"y":0.25}}]},{"name":"wheel front","display":[{"name":"wheel1","transform":{"x":0.25,"y":0.25}}]},{"name":"suspend_front","display":[{"name":"suspend_front","transform":{"x":-13.1,"y":-3.25}}]},{"name":"suspend_back","display":[{"name":"supend_back","transform":{"x":19.15,"y":0.25}}]},{"name":"base","display":[{"name":"base1","transform":{"x":-10,"y":-7.15}}]},{"name":"driver_hip","display":[{"name":"drive_hip1","transform":{"x":-2.05,"y":0.45}}]},{"name":"driver_corpse","display":[{"name":"driver_corpse1","transform":{"x":-2.1,"y":-4.15}}]},{"name":"driver_shin","display":[{"name":"driver_shin1","transform":{"x":2.05,"y":1.35}}]},{"name":"driver_arm","display":[{"name":"driver_arm1","transform":{"x":1.15,"y":-1.1}}]},{"name":"driver_forearm","display":[{"name":"driver_forearm1","transform":{"x":3.8,"y":-0.05}}]},{"name":"driver_head","display":[{"name":"driver_head1","transform":{"x":-5.75,"y":7.85}}]},{"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/assets/levels/bikes_texture.json b/assets/levels/bikes_texture.json new file mode 100644 index 0000000..9e46e78 --- /dev/null +++ b/assets/levels/bikes_texture.json @@ -0,0 +1 @@ +{"name":"bikes","imagePath":"bikes_texture.png","SubTexture":[{"name":"base","x":0,"height":55,"width":120,"y":0},{"name":"driver_corpse","x":228,"height":33,"width":20,"y":0},{"name":"drive_hip","x":33,"height":12,"width":22,"y":130},{"name":"driver_shin","x":102,"height":30,"width":18,"y":56},{"name":"driver_arm","x":150,"height":13,"width":20,"y":134},{"name":"driver_forearm","x":0,"height":9,"width":23,"y":138},{"name":"driver_head","x":178,"height":43,"width":48,"y":52},{"name":"wheel","x":58,"height":42,"width":42,"y":56},{"name":"dust1","x":205,"height":12,"width":14,"y":138},{"name":"dust2","x":102,"height":16,"width":18,"y":87},{"name":"dust3","x":33,"height":20,"width":24,"y":109},{"name":"dust4","x":94,"height":23,"width":26,"y":104},{"name":"dust5","x":151,"height":24,"width":26,"y":109},{"name":"dust6","x":218,"height":24,"width":26,"y":113},{"name":"dust7","x":227,"height":22,"width":28,"y":60},{"name":"dust8","x":121,"height":21,"width":29,"y":109},{"name":"dust9","x":118,"height":16,"width":31,"y":131},{"name":"dust10","x":218,"height":8,"width":7,"y":96},{"name":"wheel1","x":178,"height":39,"width":39,"y":96},{"name":"suspend_front","x":121,"height":56,"width":56,"y":52},{"name":"supend_back","x":171,"height":14,"width":33,"y":136},{"name":"base1","x":121,"height":51,"width":106,"y":0},{"name":"drive_hip1","x":0,"height":28,"width":32,"y":109},{"name":"driver_corpse1","x":58,"height":40,"width":35,"y":99},{"name":"driver_shin1","x":227,"height":29,"width":21,"y":83},{"name":"driver_arm1","x":228,"height":25,"width":25,"y":34},{"name":"driver_forearm1","x":94,"height":14,"width":23,"y":128},{"name":"driver_head1","x":0,"height":52,"width":57,"y":56}]} \ No newline at end of file diff --git a/assets/levels/map1.json b/assets/levels/map1.json new file mode 100644 index 0000000..9bb3064 --- /dev/null +++ b/assets/levels/map1.json @@ -0,0 +1 @@ +{"settings":{"theme":3,"prizes":"28,35,46","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":2,"vertices":[{"x":-785,"y":-260,"length":826.9371197376497},{"x":-883,"y":-287,"length":928.4707857547269},{"x":-870,"y":-500,"length":1003.4440691936945},{"x":-870,"y":-910,"length":1258.967831201417},{"x":-885,"y":-1070,"length":1388.5694076998816},{"x":-910,"y":-1190,"length":1498.0654191322888},{"x":-925,"y":-1255,"length":1559.0542004689894},{"x":-950,"y":-1305,"length":1614.1638702436628},{"x":-980,"y":-1285,"length":1616.0522887580091},{"x":-1010,"y":-1295,"length":1642.2926048667455},{"x":-1025,"y":-1195,"length":1574.3728910267732},{"x":-1050,"y":-1315,"length":1682.7730090538057},{"x":-1075,"y":-1300,"length":1686.898040783734},{"x":-1085,"y":-1330,"length":1716.427976933492},{"x":-1055,"y":-1355,"length":1717.2798257709778},{"x":-1015,"y":-1380,"length":1713.074721079031},{"x":-970,"y":-1390,"length":1694.9926253526887},{"x":-695,"y":-1405,"length":1567.4980063783175},{"x":-650,"y":-1400,"length":1543.5349040433132},{"x":-615,"y":-1380,"length":1510.8358613694606},{"x":-595,"y":-1320,"length":1447.9036570158942},{"x":-620,"y":-1330,"length":1467.4126890551274},{"x":-635,"y":-1215,"length":1370.930341045817},{"x":-670,"y":-1310,"length":1471.3938969562162},{"x":-680,"y":-1285,"length":1453.83114562868},{"x":-710,"y":-1305,"length":1485.6395929026662},{"x":-735,"y":-1290,"length":1484.6969387723543},{"x":-770,"y":-1245,"length":1463.8732868660456},{"x":-785,"y":-1165,"length":1404.7953587622646},{"x":-790,"y":-1035,"length":1302.046466144738},{"x":-660,"y":-339,"length":741.9710236929742},{"x":-745,"y":-265,"length":790.7275131168765}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5170,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":1170},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":389,"x":9570,"y":-720,"rotation":0,"width":343},"className":"FinishZone"},{"params":{"layer":2,"vertices":[{"x":-61,"y":-13,"length":62.369864518050704},{"x":-77,"y":-73,"length":106.10372283760829},{"x":-104,"y":-124,"length":161.83942659315127},{"x":-140,"y":-161,"length":213.3565091577944},{"x":-179,"y":-188,"length":259.5862091868518},{"x":-221,"y":-209,"length":304.1742921418574},{"x":-283,"y":-224,"length":360.9224293390479},{"x":-340,"y":-226,"length":408.2597212559672},{"x":-391,"y":-217,"length":447.1800532224129},{"x":-433,"y":-200,"length":476.9580694358782},{"x":-432,"y":-242,"length":495.16461909146943},{"x":-415,"y":-278,"length":499.50875868196744},{"x":-364,"y":-315,"length":481.3740749147174},{"x":-290,"y":-331,"length":440.06931272243924},{"x":-225,"y":-340,"length":407.7070026379238},{"x":-140,"y":-345,"length":372.3237838226293},{"x":143,"y":-349,"length":377.1604433129222},{"x":263,"y":-341,"length":430.6390600026895},{"x":368,"y":-321,"length":488.3287826864192},{"x":421,"y":-288,"length":510.08332652616673},{"x":434,"y":-258,"length":504.8960289010006},{"x":436,"y":-216,"length":486.5716802281037},{"x":366,"y":-220,"length":427.0316147546924},{"x":309,"y":-212,"length":374.73323845103465},{"x":248,"y":-184,"length":308.8041450499005},{"x":204,"y":-149,"length":252.62026838715852},{"x":168,"y":-112,"length":201.9108714259834},{"x":145,"y":-69,"length":160.5801980320114},{"x":128,"y":-15,"length":128.87590930814028},{"x":125,"y":50,"length":134.6291201783626},{"x":134,"y":114,"length":175.93180496999398},{"x":161,"y":170,"length":234.138847695123},{"x":200,"y":217,"length":295.10845463998487},{"x":249,"y":258,"length":358.5596184736926},{"x":304,"y":284,"length":416.01923032475315},{"x":361,"y":293,"length":464.94085645380744},{"x":432,"y":290,"length":520.311445194126},{"x":496,"y":266,"length":562.8250172122771},{"x":537,"y":237,"length":586.9735939546174},{"x":574,"y":205,"length":609.5088186400587},{"x":606,"y":157,"length":626.0071884571295},{"x":637,"y":76,"length":641.5177316333509},{"x":661,"y":102,"length":668.823594081429},{"x":675,"y":155,"length":692.567686222798},{"x":676,"y":228,"length":713.4143256201125},{"x":655,"y":274,"length":710.0007042250029},{"x":617,"y":324,"length":696.8966924874877},{"x":576,"y":354,"length":676.0857933724092},{"x":532,"y":361,"length":642.919123996168},{"x":467,"y":378,"length":600.8102861968993},{"x":411,"y":391,"length":567.27594696056},{"x":352,"y":420,"length":548},{"x":304,"y":455,"length":547.2120247216795},{"x":275,"y":490,"length":561.8941181397079},{"x":254,"y":533,"length":590.4278109980932},{"x":241,"y":582,"length":629.9245986624113},{"x":240,"y":640,"length":683.5202996254025},{"x":216,"y":729,"length":760.326903377751},{"x":174,"y":646,"length":669.0231685076385},{"x":138,"y":720,"length":733.1057222529367},{"x":112,"y":646,"length":655.6370947406805},{"x":72,"y":717,"length":720.6059949792258},{"x":36,"y":645,"length":646.0038699574485},{"x":5,"y":710,"length":710.0176054155277},{"x":-30,"y":645,"length":645.6972975009265},{"x":-68,"y":717,"length":720.2173283113924},{"x":-108,"y":647,"length":655.9519799497521},{"x":-142,"y":720,"length":733.8691981545485},{"x":-178,"y":641,"length":665.2555899802721},{"x":-180,"y":578,"length":605.3792199935508},{"x":-193,"y":535,"length":568.7477472482858},{"x":-217,"y":482,"length":528.5953083408895},{"x":-249,"y":437,"length":502.9612311103113},{"x":-294,"y":404,"length":499.6518788116382},{"x":-341,"y":382,"length":512.0595668474518},{"x":-405,"y":369,"length":547.8923251880792},{"x":-479,"y":353,"length":595.0210080324896},{"x":-527,"y":336,"length":625},{"x":-581,"y":310,"length":658.5294222735989},{"x":-602,"y":266,"length":658.1489193184169},{"x":-610,"y":221,"length":648.7996609123652},{"x":-601,"y":176,"length":626.2403691874231},{"x":-575,"y":146,"length":593.2461546440904},{"x":-554,"y":136,"length":570.4489460065643},{"x":-518,"y":188,"length":551.0607951941419},{"x":-471,"y":235,"length":526.3705918837031},{"x":-427,"y":263,"length":501.49576269396334},{"x":-372,"y":281,"length":466.20274559466077},{"x":-306,"y":288,"length":420.21423107743504},{"x":-249,"y":279,"length":373.9545426920229},{"x":-194,"y":254,"length":319.6122650963195},{"x":-148,"y":224,"length":268.47718711279737},{"x":-103,"y":171,"length":199.6246477767713},{"x":-74,"y":108,"length":130.91982279242512},{"x":-57,"y":46,"length":73.24616030891995}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":9550,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1514},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"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":185,"y":110,"length":215.23243250030885},{"x":65,"y":10,"length":65.76473218982953}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":-12,"plr":false,"line":true,"x":5231,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":229},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":515,"y":90,"length":522.8049349422785},{"x":930,"y":40,"length":930.859817588019},{"x":1465,"y":-175,"length":1475.4151958008295},{"x":2735,"y":-120,"length":2737.631275391191},{"x":5130,"y":25,"length":5130.060915817667},{"x":7265,"y":-450,"length":7278.923340714614},{"x":10845,"y":-465,"length":10854.964302106202},{"x":12480,"y":-720,"length":12500.7519773812}],"lineId":-1,"physic":false,"directed":false,"width":12493,"shape":false,"height":873.95,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":80,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":350,"smoothing":true,"y":400,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"layer":4,"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":100,"length":103.07764064044152},{"x":0,"y":100,"length":100},{"x":-115,"y":45,"length":123.4908903522847}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":6,"plr":false,"line":true,"x":1760,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-110},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"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},{"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}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":-138,"stretchTexture":false,"height":500.05,"x":10201,"isStatic":true,"repeatTexture":true,"id":-1,"width":529,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1583,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":2,"vertices":[{"x":0,"y":10,"length":10},{"x":13,"y":-2,"length":13.152946437965905},{"x":33,"y":-11,"length":34.785054261852174},{"x":51,"y":-13,"length":52.630789467763066},{"x":66,"y":-12,"length":67.08203932499369},{"x":84,"y":-5,"length":84.1486779456457},{"x":95,"y":4,"length":95.08417323613851},{"x":109,"y":18,"length":110.47624178980746},{"x":115,"y":35,"length":120.20815280171308},{"x":118,"y":52,"length":128.94960255851896},{"x":115,"y":68,"length":133.60014970051492},{"x":107,"y":87,"length":137.90576492663388},{"x":94,"y":100,"length":137.2443077143821},{"x":77,"y":112,"length":135.9154148726332},{"x":59,"y":117,"length":131.03434664239754},{"x":41,"y":116,"length":123.03251602726817},{"x":25,"y":112,"length":114.75626344561765},{"x":12,"y":104,"length":104.6900186264192},{"x":0,"y":91,"length":91},{"x":-9,"y":76,"length":76.53103945458993},{"x":-13,"y":58,"length":59.43904440685432},{"x":-14,"y":42,"length":44.27188724235731},{"x":-9,"y":25,"length":26.570660511172846}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":-138,"plr":false,"line":true,"x":9928,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1397},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"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},{"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}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":96,"stretchTexture":false,"height":500.05,"x":8988,"isStatic":true,"repeatTexture":true,"id":-1,"width":529,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1642,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":2,"vertices":[{"x":0,"y":10,"length":10},{"x":13,"y":-2,"length":13.152946437965905},{"x":33,"y":-11,"length":34.785054261852174},{"x":51,"y":-13,"length":52.630789467763066},{"x":66,"y":-12,"length":67.08203932499369},{"x":84,"y":-5,"length":84.1486779456457},{"x":95,"y":4,"length":95.08417323613851},{"x":109,"y":18,"length":110.47624178980746},{"x":115,"y":35,"length":120.20815280171308},{"x":118,"y":52,"length":128.94960255851896},{"x":115,"y":68,"length":133.60014970051492},{"x":107,"y":87,"length":137.90576492663388},{"x":94,"y":100,"length":137.2443077143821},{"x":77,"y":112,"length":135.9154148726332},{"x":59,"y":117,"length":131.03434664239754},{"x":41,"y":116,"length":123.03251602726817},{"x":25,"y":112,"length":114.75626344561765},{"x":12,"y":104,"length":104.6900186264192},{"x":0,"y":91,"length":91},{"x":-9,"y":76,"length":76.53103945458993},{"x":-13,"y":58,"length":59.43904440685432},{"x":-14,"y":42,"length":44.27188724235731},{"x":-9,"y":25,"length":26.570660511172846}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":96,"plr":false,"line":true,"x":9299,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1530},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":272,"y":104,"length":291.20439557122074}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":121.7,"x":9250,"isStatic":true,"repeatTexture":true,"id":-1,"width":285,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1814,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-43,"y":2,"length":43.04648650006177},{"x":222,"y":-95,"length":241.47256572952548}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":114.8,"x":9680,"isStatic":true,"repeatTexture":true,"id":-1,"width":278,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1714,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":50,"y":122,"length":131.84839779079607},{"x":-37,"y":140,"length":144.80676779764127},{"x":53,"y":4,"length":53.150729063673246},{"x":138,"y":133,"length":191.65855055279948},{"x":62,"y":122,"length":136.85028315644803}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":167.2,"x":9538,"isStatic":true,"repeatTexture":true,"id":-1,"width":215.2,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1233,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":2,"vertices":[{"x":0,"y":0,"length":0},{"x":40,"y":75,"length":85},{"x":70,"y":0,"length":70},{"x":113,"y":69,"length":132.4009063413087},{"x":145,"y":0,"length":145},{"x":187,"y":65,"length":197.9747458642137},{"x":215,"y":0,"length":215},{"x":251,"y":68,"length":260.0480724789169},{"x":290,"y":0,"length":290},{"x":317,"y":70,"length":324.63672004257313},{"x":360,"y":0,"length":360},{"x":396,"y":74,"length":402.85481255658345},{"x":420,"y":0,"length":420},{"x":450,"y":95,"length":459.91847103590004},{"x":335,"y":205,"length":392.7467377331096},{"x":90,"y":205,"length":223.8861317723811},{"x":-30,"y":90,"length":94.86832980505137}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":9370,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-634},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":2,"vertices":[{"x":12065,"y":-650,"length":12082.496637698683},{"x":14495,"y":-1095,"length":14536.301111355668},{"x":17285,"y":-1695,"length":17367.90862481721},{"x":20977,"y":-1651,"length":21041.870876896854},{"x":21220,"y":1870,"length":21302.23697173609},{"x":17335,"y":1935,"length":17442.661780817743},{"x":17345,"y":785,"length":17362.754677757788},{"x":17429,"y":778,"length":17446.355636636552},{"x":17544,"y":763,"length":17560.583845647045},{"x":17678,"y":730,"length":17693.065986425303},{"x":17795,"y":681,"length":17808.025887222873},{"x":17921,"y":600,"length":17931.04126926264},{"x":18024,"y":510,"length":18031.21393583915},{"x":18115,"y":413,"length":18119.707337592405},{"x":18185,"y":330,"length":18187.993979545958},{"x":18260,"y":175,"length":18260.83856234428},{"x":18314,"y":27,"length":18314.019902795782},{"x":18330,"y":-70,"length":18330.133660178257},{"x":18329,"y":-181,"length":18329.893671268255},{"x":18309,"y":-310,"length":18311.6242043135},{"x":18280,"y":-404,"length":18284.463787598477},{"x":18231,"y":-513,"length":18238.216195670015},{"x":18177,"y":-595,"length":18186.735660915074},{"x":18117,"y":-646,"length":18128.513590473987},{"x":18043,"y":-688,"length":18056.11234457739},{"x":17974,"y":-726,"length":17988.65620328545},{"x":17972,"y":-794,"length":17989.530844355002},{"x":17958,"y":-867,"length":17978.91690286153},{"x":17892,"y":-984,"length":17919.03792060277},{"x":17817,"y":-1060,"length":17848.503830853722},{"x":17738,"y":-1108,"length":17772.571789136204},{"x":17647,"y":-1155,"length":17684.75710887769},{"x":17555,"y":-1181,"length":17594.68061659546},{"x":17418,"y":-1204,"length":17459.56299567661},{"x":17310,"y":-1210,"length":17352.239048606956},{"x":17221,"y":-1206,"length":17263.17690924819},{"x":17148,"y":-1197,"length":17189.72696118237},{"x":17032,"y":-1164,"length":17071.728676381896},{"x":16922,"y":-1123,"length":16959.22206352638},{"x":16827,"y":-1068,"length":16860.858608030612},{"x":16721,"y":-987,"length":16750.104775791704},{"x":16672,"y":-936,"length":16698.25380092182},{"x":16657,"y":-900,"length":16681.296382475794},{"x":16647,"y":-853,"length":16668.839731666987},{"x":16652,"y":-806,"length":16671.49483399734},{"x":16671,"y":-762,"length":16688.405705758712},{"x":16585,"y":-733,"length":16601.19013805938},{"x":16531,"y":-696,"length":16545.64525789188},{"x":16479,"y":-643,"length":16491.539952351326},{"x":16429,"y":-573,"length":16438.98932416467},{"x":16393,"y":-510,"length":16400.93134550596},{"x":16367,"y":-434,"length":16372.753128292139},{"x":16353,"y":-357,"length":16356.896343744433},{"x":16349,"y":-282,"length":16351.431894485571},{"x":16354,"y":-208,"length":16355.32268101122},{"x":16363,"y":-147,"length":16363.66028735625},{"x":16385,"y":-76,"length":16385.176257825242},{"x":16419,"y":-4,"length":16419.000487240384},{"x":16452,"y":43,"length":16452.056193679866},{"x":16491,"y":92,"length":16491.256622828958},{"x":16533,"y":132,"length":16533.52693771054},{"x":16579,"y":170,"length":16579.87156162556},{"x":16630,"y":201,"length":16631.214657985747},{"x":16684,"y":228,"length":16685.55782705511},{"x":16763,"y":255,"length":16764.93942726904},{"x":16833,"y":266,"length":16835.101573795153},{"x":16902,"y":270,"length":16904.156411959753},{"x":16985,"y":270,"length":16987.145875631963},{"x":17065,"y":255,"length":17066.905109011415},{"x":17080,"y":370,"length":17084.007141183243},{"x":17045,"y":420,"length":17050.173752780353},{"x":16925,"y":465,"length":16931.386535071484},{"x":16790,"y":495,"length":16797.295169163397},{"x":16515,"y":510,"length":16522.872782903098},{"x":16261,"y":505,"length":16268.839725069518},{"x":16135,"y":507,"length":16142.963606475732},{"x":16001,"y":489,"length":16008.470320427246},{"x":15831,"y":463,"length":15837.769097950633},{"x":15726,"y":443,"length":15732.23839763433},{"x":15617,"y":398,"length":15622.070701414714},{"x":15550,"y":368,"length":15554.353859932595},{"x":15542,"y":329,"length":15545.481819486973},{"x":15555,"y":284,"length":15557.592390855341},{"x":15565,"y":231,"length":15566.714039899365},{"x":15562,"y":177,"length":15563.006554004916},{"x":15546,"y":128,"length":15546.52694334011},{"x":15515,"y":65,"length":15515.136157958783},{"x":15474,"y":13,"length":15474.005460771947},{"x":15423,"y":-24,"length":15423.018673398537},{"x":15363,"y":-52,"length":15363.088003393068},{"x":15286,"y":-61,"length":15286.121712193712},{"x":15215,"y":-52,"length":15215.088859418469},{"x":15164,"y":-36,"length":15164.042732727972},{"x":15114,"y":1,"length":15114.000033081911},{"x":15072,"y":38,"length":15072.047903320901},{"x":15036,"y":88,"length":15036.257513091481},{"x":15011,"y":147,"length":15011.719754911494},{"x":15004,"y":214,"length":15005.526048759504},{"x":15013,"y":282,"length":15015.648271053768},{"x":15035,"y":330,"length":15038.621113652674},{"x":15060,"y":375,"length":15064.668101222807},{"x":15065,"y":410,"length":15070.578124279107},{"x":15045,"y":425,"length":15051.001627798729},{"x":14935,"y":425,"length":14941.045813462992},{"x":14790,"y":420,"length":14795.96228705656},{"x":14690,"y":430,"length":14696.292049357213},{"x":14575,"y":440,"length":14581.639996927643},{"x":14490,"y":460,"length":14497.29974857387},{"x":14425,"y":500,"length":14433.662910016985},{"x":14340,"y":550,"length":14350.5435437129},{"x":14270,"y":590,"length":14282.191708557899},{"x":14150,"y":635,"length":14164.241066855648},{"x":14050,"y":665,"length":14065.728740452803},{"x":13935,"y":680,"length":13951.581451577453},{"x":13785,"y":675,"length":13801.516221053396},{"x":13680,"y":660,"length":13695.911798781415},{"x":13530,"y":630,"length":13544.65946415782},{"x":13390,"y":570,"length":13402.126696908965},{"x":13211,"y":468,"length":13219.28685671054},{"x":13091,"y":385,"length":13096.660108592572},{"x":12900,"y":282,"length":12903.08195742397},{"x":12670,"y":180,"length":12671.278546381971},{"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}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-7742,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-911},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":2,"vertices":[{"x":-75,"y":-330,"length":338.4154251803543},{"x":-20,"y":-345,"length":345.5792239125495},{"x":25,"y":-375,"length":375.8324094593227},{"x":110,"y":-440,"length":453.54161881794266},{"x":130,"y":-510,"length":526.3078946776307},{"x":150,"y":-625,"length":642.7480066091221},{"x":145,"y":-850,"length":862.278957182651},{"x":140,"y":-905,"length":915.7647077715978},{"x":120,"y":-940,"length":947.6286192385706},{"x":110,"y":-980,"length":986.154146165801},{"x":80,"y":-940,"length":943.3981132056604},{"x":75,"y":-970,"length":972.8951639308318},{"x":50,"y":-900,"length":901.3878188659974},{"x":45,"y":-1005,"length":1006.006958226433},{"x":70,"y":-1060,"length":1062.308806327049},{"x":150,"y":-1115,"length":1125.0444435665643},{"x":305,"y":-1155,"length":1194.5919805523558},{"x":1280,"y":-1155,"length":1724.07221426482},{"x":1392,"y":-1160,"length":1811.977924810344},{"x":1515,"y":-1175,"length":1917.2506356759932},{"x":1602,"y":-1196,"length":1999.2048419309112},{"x":1680,"y":-1220,"length":2076.24661348309},{"x":1781,"y":-1257,"length":2179.910548623498},{"x":1901,"y":-1304,"length":2305.2585538286157},{"x":2280,"y":-1474,"length":2714.972559714002},{"x":2375,"y":-1525,"length":2822.4546054808393},{"x":2415,"y":-1510,"length":2848.21435288849},{"x":2515,"y":-1460,"length":2908.062069488889},{"x":2604,"y":-1418,"length":2965.0531192543585},{"x":2785,"y":-1350,"length":3094.951534353971},{"x":2870,"y":-1330,"length":3163.194587754601},{"x":2980,"y":-1315,"length":3257.2419314505946},{"x":4275,"y":-1300,"length":4468.291060349583},{"x":4435,"y":-1295,"length":4620.200212112025},{"x":4450,"y":-165,"length":4453.0579380915315},{"x":-700,"y":-85,"length":705.141829705202},{"x":-3885,"y":-225,"length":3891.509989708365},{"x":-4916,"y":-395,"length":4931.843570106416},{"x":-4834,"y":-830,"length":4904.738117371813},{"x":-4504,"y":-725,"length":4561.977750932155},{"x":-4425,"y":-710,"length":4481.598487147192},{"x":-4330,"y":-701,"length":4386.3767508047},{"x":-4215,"y":-697,"length":4272.239927719416},{"x":-4146,"y":-703,"length":4205.178355313838},{"x":-4034,"y":-727,"length":4098.985850182945},{"x":-3954,"y":-760,"length":4026.377528250425},{"x":-3882,"y":-798,"length":3963.1714573053737},{"x":-3804,"y":-848,"length":3897.373474533843},{"x":-3743,"y":-898,"length":3849.2145952128985},{"x":-3675,"y":-965,"length":3799.585503709582},{"x":-3615,"y":-1035,"length":3760.246002590788},{"x":-3580,"y":-1115,"length":3749.616647072071},{"x":-3565,"y":-1200,"length":3761.5455600058867},{"x":-2650,"y":-1090,"length":2865.4144551879403},{"x":-2105,"y":-1090,"length":2370.4693628056025},{"x":-2060,"y":-1075,"length":2323.6232482913406},{"x":-2030,"y":-1035,"length":2278.6234879856743},{"x":-2025,"y":-930,"length":2228.3457990177376},{"x":-2070,"y":-990,"length":2294.5587811167534},{"x":-2085,"y":-950,"length":2291.22783677224},{"x":-2115,"y":-985,"length":2333.120228363725},{"x":-2150,"y":-855,"length":2313.768570968151},{"x":-2170,"y":-960,"length":2372.8674636397204},{"x":-2195,"y":-945,"length":2389.780324632371},{"x":-2225,"y":-955,"length":2421.290977970223},{"x":-2255,"y":-895,"length":2426.1182988469463},{"x":-2250,"y":-600,"length":2328.6262044390037},{"x":-1725,"y":-270,"length":1746.0025773176853},{"x":-1652,"y":-220,"length":1666.5845313094683},{"x":-1552,"y":-200,"length":1564.833537472916},{"x":-1438,"y":-198,"length":1451.5674286783924},{"x":-1083,"y":-205,"length":1102.2313731698985},{"x":-1018,"y":-219,"length":1041.2900652555943},{"x":-949,"y":-242,"length":979.3696952632341},{"x":-860,"y":-270,"length":901.3878188659974},{"x":-760,"y":-245,"length":798.5142453331688},{"x":-670,"y":-305,"length":736.1555542139175},{"x":-636,"y":-312,"length":708.4066628709812},{"x":-480,"y":-290,"length":560.8029957123981}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5170,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":1170},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":14,"y":-62,"length":63.56099432828282},{"x":15,"y":-117,"length":117.957619508025},{"x":14,"y":-163,"length":163.6001222493431},{"x":-6,"y":-212,"length":212.08488866489287},{"x":-31,"y":-257,"length":258.8628980754098},{"x":-67,"y":-303,"length":310.31919051196303},{"x":-123,"y":-349,"length":370.04053831979},{"x":-186,"y":-373,"length":416.80331092734855},{"x":-249,"y":-378,"length":452.642242836437},{"x":-313,"y":-372,"length":486.16149580154945},{"x":-372,"y":-357,"length":515.5899533544074},{"x":-417,"y":-329,"length":531.1591098719855},{"x":-466,"y":-286,"length":546.7650318006813},{"x":-499,"y":-239,"length":553.2829294312269},{"x":-518,"y":-198,"length":554.552071495545},{"x":-534,"y":-154,"length":555.7625392197642},{"x":-537,"y":-98,"length":545.8690319115017},{"x":-529,"y":-45,"length":530.9105386032566},{"x":-516,"y":-11,"length":516.1172347442003},{"x":-494,"y":29,"length":494.85048246919996},{"x":-481,"y":69,"length":485.9238623488252}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":489,"x":7800,"isStatic":true,"repeatTexture":true,"id":-1,"width":616.15,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-590,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"height":21.75,"x":1856,"id":2,"active":false,"safeId":-1,"y":-33,"rotation":45,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1888,"id":2,"active":false,"safeId":-1,"y":-41,"rotation":99,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1899,"id":2,"active":false,"safeId":-1,"y":-39,"rotation":84,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1910,"id":2,"active":false,"safeId":-1,"y":-38,"rotation":99,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1921,"id":2,"active":false,"safeId":-1,"y":-36,"rotation":84,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1932,"id":2,"active":false,"safeId":-1,"y":-36,"rotation":99,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1943,"id":2,"active":false,"safeId":-1,"y":-34,"rotation":84,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1954,"id":2,"active":false,"safeId":-1,"y":-33,"rotation":99,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1965,"id":2,"active":false,"safeId":-1,"y":-31,"rotation":84,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1975,"id":2,"active":false,"safeId":-1,"y":-30,"rotation":99,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1986,"id":2,"active":false,"safeId":-1,"y":-28,"rotation":84,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":1997,"id":2,"active":false,"safeId":-1,"y":-28,"rotation":99,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":2008,"id":2,"active":false,"safeId":-1,"y":-26,"rotation":84,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":2019,"id":2,"active":false,"safeId":-1,"y":-24,"rotation":99,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":2030,"id":2,"active":false,"safeId":-1,"y":-22,"rotation":84,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3117,"id":21,"active":true,"safeId":1,"y":112,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3184,"id":21,"active":true,"safeId":1,"y":94,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3319,"id":21,"active":true,"safeId":1,"y":58,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3387,"id":21,"active":true,"safeId":1,"y":40,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3454,"id":21,"active":true,"safeId":1,"y":22,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3252,"id":21,"active":true,"safeId":1,"y":76,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3522,"id":21,"active":true,"safeId":1,"y":4,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3590,"id":21,"active":true,"safeId":1,"y":-15,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3658,"id":21,"active":true,"safeId":1,"y":-32,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3725,"id":21,"active":true,"safeId":1,"y":-50,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3793,"id":21,"active":true,"safeId":1,"y":-68,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3860,"id":21,"active":true,"safeId":1,"y":-86,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3928,"id":21,"active":true,"safeId":1,"y":-104,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3995,"id":21,"active":true,"safeId":1,"y":-122,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4062,"id":21,"active":true,"safeId":1,"y":-141,"rotation":-15,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4566,"id":22,"active":true,"safeId":1,"y":-164,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4630,"id":22,"active":true,"safeId":1,"y":-136,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4694,"id":22,"active":true,"safeId":1,"y":-107,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4758,"id":22,"active":true,"safeId":1,"y":-79,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4822,"id":22,"active":true,"safeId":1,"y":-51,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4885,"id":22,"active":true,"safeId":1,"y":-22,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4950,"id":22,"active":true,"safeId":1,"y":7,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5013,"id":22,"active":true,"safeId":1,"y":35,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5078,"id":22,"active":true,"safeId":1,"y":64,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5142,"id":22,"active":true,"safeId":1,"y":91,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5205,"id":22,"active":true,"safeId":1,"y":120,"rotation":24,"width":86},"className":"PlankCandy"},{"params":{"layer":2,"vertices":[{"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":9520,"y":695,"length":9545.335248172272},{"x":9350,"y":625,"length":9370.86575509435},{"x":9335,"y":415,"length":9344.22013867396},{"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":8550,"y":490,"length":8564.02942545155},{"x":8555,"y":550,"length":8572.661488709326},{"x":8570,"y":600,"length":8590.977825602857},{"x":8615,"y":645,"length":8639.1116441449},{"x":8655,"y":660,"length":8680.128167256518},{"x":8620,"y":760,"length":8653.438622882813},{"x":8550,"y":865,"length":8593.64445389731},{"x":8485,"y":875,"length":8529.99706916714},{"x":8385,"y":815,"length":8424.514822825111},{"x":8300,"y":800,"length":8338.465086573187},{"x":8225,"y":850,"length":8268.804327108},{"x":7940,"y":2015,"length":8191.692438074076},{"x":7180,"y":2055,"length":7468.294651391307},{"x":7155,"y":-400,"length":7166.172269768569},{"x":12070,"y":-650,"length":12087.489400202177},{"x":12050,"y":70,"length":12050.2033177868},{"x":11970,"y":85,"length":11970.301792352606}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-7742,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-911},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"height":128.35,"x":2400,"y":7,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":5560,"y":-48,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":9070,"y":-200,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":213.45,"x":740,"y":350,"rotation":9,"scaleX":1,"scaleY":1,"width":171.75},"className":"Dec13"},{"params":{"height":244.8,"x":1176,"y":300,"rotation":-18,"scaleX":-1,"scaleY":1,"width":165.85},"className":"Dec14"},{"params":{"height":82.25,"x":2370,"y":48,"rotation":0,"width":63.15},"className":"Dec29"},{"params":{"height":234.2,"x":2840,"y":-40,"rotation":0,"scaleX":1,"scaleY":1,"width":197},"className":"Dec15"},{"params":{"height":234.2,"x":4300,"y":-340,"rotation":0,"scaleX":1,"scaleY":1,"width":197},"className":"Dec15"},{"params":{"height":242.2,"x":4390,"y":-347,"rotation":0,"scaleX":1,"scaleY":1,"width":176.2},"className":"Dec16"},{"params":{"height":82.25,"x":5528,"y":-3,"rotation":0,"width":63.15},"className":"Dec29"},{"params":{"height":82.25,"x":9037,"y":-156,"rotation":0,"width":63.15},"className":"Dec29"},{"params":{"height":242.2,"x":8580,"y":-250,"rotation":18,"scaleX":1,"scaleY":1,"width":176.2},"className":"Dec16"},{"params":{"height":213.45,"x":8420,"y":-240,"rotation":0,"scaleX":1,"scaleY":1,"width":171.75},"className":"Dec13"},{"params":{"height":234.2,"x":10090,"y":-390,"rotation":-24,"scaleX":1,"scaleY":1,"width":197},"className":"Dec15"},{"params":{"height":242.2,"x":10158.05,"y":-450,"rotation":-18,"scaleX":-1,"scaleY":1,"width":176.2},"className":"Dec16"},{"params":{"height":213.45,"x":8950,"y":-810,"rotation":36,"scaleX":1,"scaleY":1,"width":171.75},"className":"Dec13"}],[{"params":{"height":18,"x":1614,"y":-94,"rotation":90.00000000000006,"safeId":-1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":1614,"y":-224,"rotation":90.00000000000006,"safeId":-1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":7550,"y":-950,"rotation":-177.99999999999994,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7490,"y":-946,"rotation":169.00000000000003,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7437,"y":-930,"rotation":155.99999999999997,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7386,"y":-900,"rotation":143,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7341,"y":-855,"rotation":128,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7311,"y":-805,"rotation":115,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7287,"y":-684,"rotation":87.00000000000006,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7298,"y":-624,"rotation":72.00000000000006,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7323,"y":-569,"rotation":58.00000000000006,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7362,"y":-525,"rotation":39.00000000000006,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7292,"y":-747,"rotation":100.00000000000009,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7571,"y":-367,"rotation":-36.99999999999999,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7620,"y":-408,"rotation":-41.99999999999999,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7666,"y":-451,"rotation":-44,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7709,"y":-496,"rotation":-47.999999999999986,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7747,"y":-545,"rotation":-57.99999999999999,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7776,"y":-599,"rotation":-67,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7793,"y":-659,"rotation":-82,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7794,"y":-718,"rotation":-95,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7782,"y":-778,"rotation":-107.99999999999996,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7756,"y":-835,"rotation":-122.99999999999994,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7717,"y":-882,"rotation":-137.99999999999994,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7610,"y":-941,"rotation":-164.99999999999994,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":7667,"y":-918,"rotation":-151.99999999999994,"safeId":2,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":99,"force":5000,"y":70,"rotation":0,"safeId":-1,"x":1520,"time":2,"width":100},"className":"BoostE"},{"params":{"stones":false,"safeId":-1,"physic":false,"impulse":1,"rotation":9,"height":53.2,"x":1870,"id":3,"count":1,"radius":1,"y":-43,"width":53.2},"className":"Tnt1"},{"params":{"height":99,"force":3000,"y":-170,"rotation":0,"safeId":3,"x":9600,"time":50,"width":100},"className":"BoostE"}],null,[{"params":{"height":32,"x":950,"y":420,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1033,"x":2400,"y":-60,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":621,"x":5560,"y":-120,"width":128,"id":2,"rotation":0},"className":"SafePointE"},{"params":{"height":650,"x":9070,"y":-270,"width":128,"id":3,"rotation":0},"className":"SafePointE"}],[{"params":{"position":0,"accelDist":0,"vertices":[{"x":0,"y":0,"length":0},{"x":60,"y":-78,"length":98.40731680114035},{"x":105,"y":-115,"length":155.72411502397438},{"x":162,"y":-137,"length":212.16267343715293},{"x":227,"y":-163,"length":279.46019394539894},{"x":339,"y":-186,"length":386.67428153421326},{"x":466,"y":-161,"length":493.0283967480981},{"x":581,"y":-182,"length":608.839059193807},{"x":713,"y":-166,"length":732.0689858203256},{"x":807,"y":-185,"length":827.9335722145829},{"x":936,"y":-154,"length":948.5842081755314},{"x":1059,"y":-191,"length":1076.086427755689},{"x":1162,"y":-168,"length":1174.08176887302},{"x":1273,"y":-214,"length":1290.8621150223598},{"x":1391,"y":-222,"length":1408.6039187791578},{"x":1473,"y":-269,"length":1497.3610119139605},{"x":1588,"y":-288,"length":1613.9045820617773},{"x":1673,"y":-343,"length":1707.7991685207016},{"x":1790,"y":-378,"length":1829.4764278339308},{"x":1856,"y":-428,"length":1904.7099516724325},{"x":1928,"y":-443,"length":1978.2398742316363},{"x":1981,"y":-478,"length":2037.8530368993736},{"x":2041,"y":-494,"length":2099.932617966586},{"x":2112,"y":-525,"length":2176.274109573516},{"x":2167,"y":-513,"length":2226.8942498466336},{"x":2225,"y":-483,"length":2276.8210294179908},{"x":2379,"y":-253,"length":2392.415097762092}],"stopOnEnd":true,"safeId":2,"speed":830,"startTime":"0","sideWait":0,"active":0,"height":538,"x":5410,"cycle":0,"id":9,"width":2392,"body":false,"snapToGrid":false,"y":200,"rotation":0},"className":"frg.game.editor.objects::MoverPather"},{"params":{"height":17,"x":1833,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-55,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1880,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-8,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1893,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-75,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1902,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-3,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1915,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-72,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1924,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":0,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1937,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-70,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1946,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":2,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1959,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-67,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1968,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":5,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1980,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-64,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1989,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":8,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2002,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-62,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2011,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":10,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2024,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-58,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2033,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":14,"width":17},"className":"PivotJointE"},{"params":{"height":64,"hint":-1,"id":2,"rotation":6.000000000000057,"safeId":-1,"x":1530,"off":false,"id_off":-1,"y":0,"width":676,"sndId":-1},"className":"ToggleE"},{"params":{"position":0,"accelDist":0,"vertices":[{"x":0,"y":0,"length":0},{"x":-864,"y":-112,"length":871.2290169639668}],"stopOnEnd":true,"safeId":-1,"speed":1600,"startTime":"0","sideWait":0,"active":0,"height":125,"x":1740,"cycle":0,"id":3,"width":877,"body":false,"snapToGrid":true,"y":-70,"rotation":0},"className":"frg.game.editor.objects::MoverPather"},{"params":{"height":64,"hint":-1,"id":3,"rotation":39.00000000000006,"safeId":-1,"x":870,"off":false,"id_off":-1,"y":-790,"width":676,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":3219,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":86,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3963,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-114,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3895,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-96,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3827,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-78,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3759,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-59,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3692,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-41,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3624,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-23,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3557,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-5,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3489,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":13,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3422,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":31,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4098,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4030,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":-132,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3355,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":49,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3286,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":68,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3151,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":103,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3083,"id":-1,"rotation":-15,"safeId":1,"graphic":0,"y":121,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5110,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":78,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5047,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":49,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4982,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":21,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4919,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":-7,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4855,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":-36,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4790,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":-64,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4727,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":-93,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4663,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":-122,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4599,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":-149,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5238,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":135,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5175,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":107,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4535,"id":-1,"rotation":24,"safeId":1,"graphic":0,"y":-178,"width":17},"className":"PivotJointE"},{"params":{"height":1267,"hint":-1,"id":9,"rotation":0,"safeId":2,"x":5860,"off":false,"id_off":-1,"y":-110,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"position":0,"accelDist":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-224,"length":224}],"stopOnEnd":true,"safeId":3,"speed":500,"startTime":"0","sideWait":0,"active":0,"height":237,"x":9595,"cycle":0,"id":11,"width":13,"body":false,"snapToGrid":true,"y":-510,"rotation":0},"className":"frg.game.editor.objects::MoverPather"},{"params":{"height":352,"hint":-1,"id":11,"rotation":0,"safeId":3,"x":9380,"off":false,"id_off":-1,"y":-720,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1005,"hint":-1,"id":21,"rotation":0,"safeId":-1,"x":2400,"off":false,"id_off":-1,"y":-60,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1348,"hint":-1,"id":22,"rotation":0,"safeId":-1,"x":3540,"off":false,"id_off":-1,"y":-20,"width":64,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map10.json b/assets/levels/map10.json new file mode 100644 index 0000000..7f62f9d --- /dev/null +++ b/assets/levels/map10.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"27,33,40","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":1,"vertices":[{"x":-15,"y":555,"length":555.2026656996525},{"x":140,"y":505,"length":524.0467536394058},{"x":210,"y":500,"length":542.3098745182499},{"x":285,"y":520,"length":592.9797635670209},{"x":345,"y":550,"length":649.2495668077107},{"x":425,"y":565,"length":707.0007072132248},{"x":470,"y":575,"length":742.6472917879657},{"x":510,"y":580,"length":772.3341245859851},{"x":565,"y":600,"length":824.1510783830838},{"x":605,"y":610,"length":859.1420138719791},{"x":650,"y":615,"length":894.8323865395128},{"x":695,"y":615,"length":928.0355596635293},{"x":745,"y":610,"length":962.8733042306241},{"x":785,"y":610,"length":994.1453616046298},{"x":820,"y":620,"length":1028.0077820717117},{"x":855,"y":635,"length":1065.0117370245268},{"x":880,"y":660,"length":1100},{"x":905,"y":695,"length":1141.07405544075},{"x":920,"y":735,"length":1177.5504235488177},{"x":950,"y":760,"length":1216.5936051122412},{"x":980,"y":770,"length":1246.3145670335398},{"x":1000,"y":765,"length":1259.057186945851},{"x":1025,"y":765,"length":1279.0035183688901},{"x":1045,"y":780,"length":1304.0034509156792},{"x":1060,"y":810,"length":1334.053971921676},{"x":1120,"y":875,"length":1421.2758352972867},{"x":-10,"y":860,"length":860.0581375697808}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":6,"plr":false,"line":true,"x":-170,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-500},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":430,"x":6530,"y":-360,"rotation":0,"width":733},"className":"FinishZone"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":90,"y":730,"length":735.5270219373317},{"x":-10,"y":730,"length":730.0684899377592}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":4750,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1210},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":90,"y":730,"length":735.5270219373317},{"x":-10,"y":730,"length":730.0684899377592}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":5470,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1200},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":90,"y":730,"length":735.5270219373317},{"x":-10,"y":730,"length":730.0684899377592}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":4070,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1200},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"sf":true,"bg":true,"x":3140,"vertices":[{"x":0,"y":0,"length":0},{"x":2550,"y":0,"length":2550},{"x":2550,"y":100,"length":2551.9600310349692},{"x":0,"y":100,"length":100}],"id":-1,"density":1.5,"viscosity":1.5,"y":-530,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"sf":true,"bg":true,"x":4450,"vertices":[{"x":0,"y":0,"length":0},{"x":735,"y":0,"length":735},{"x":1155,"y":365,"length":1211.3009535206352},{"x":-405,"y":370,"length":548.5663132201977}],"id":-1,"density":1.5,"viscosity":1.5,"y":-1640,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":2,"vertices":[{"x":55,"y":0,"length":55},{"x":1330,"y":0,"length":1330},{"x":1377,"y":-3,"length":1377.0032679699784},{"x":1431,"y":-16,"length":1431.089445143105},{"x":1482,"y":-40,"length":1482.5397127901836},{"x":1531,"y":-74,"length":1532.787330323421},{"x":1568,"y":-113,"length":1572.0664744214857},{"x":1592,"y":-146,"length":1598.6807060823621},{"x":1610,"y":-177,"length":1619.7002809161947},{"x":1624,"y":-214,"length":1638.0390715730807},{"x":1635,"y":-252,"length":1654.30619898494},{"x":1640,"y":-294,"length":1666.1440513953169},{"x":1639,"y":-334,"length":1672.6855651914977},{"x":1635,"y":-370,"length":1676.342745383533},{"x":1626,"y":-403,"length":1675.1970033402042},{"x":1611,"y":-442,"length":1670.5343456511152},{"x":1580,"y":-493,"length":1655.1280917197919},{"x":1388,"y":-722,"length":1564.5536104589066},{"x":1361,"y":-756,"length":1556.8741118022356},{"x":1356,"y":-786,"length":1567.332766198678},{"x":1359,"y":-820,"length":1587.2243067695254},{"x":1371,"y":-853,"length":1614.6981141996791},{"x":1391,"y":-884,"length":1648.1313661234653},{"x":1413,"y":-905,"length":1677.9731821456503},{"x":1440,"y":-922,"length":1709.8783582465742},{"x":1472,"y":-932,"length":1742.242233445166},{"x":1510,"y":-936,"length":1776.5686026720161},{"x":2940,"y":-935,"length":3085.097243199961},{"x":3056,"y":-876,"length":3179.0740790362215},{"x":5377,"y":-872,"length":5447.2482043688815},{"x":5637,"y":-977,"length":5721.039940430411},{"x":6000,"y":-975,"length":6078.702575385639},{"x":6000,"y":-535,"length":6023.804860717186},{"x":6666,"y":-542,"length":6687.998205741386},{"x":6670,"y":-971,"length":6740.307188845328},{"x":7186,"y":-983,"length":7252.922514407554},{"x":7150,"y":-2665,"length":7630.51276127627},{"x":10050,"y":-2670,"length":10398.624909092548},{"x":8160,"y":806,"length":8199.709507049625},{"x":5950,"y":1785,"length":6211.982372801777},{"x":2063,"y":680,"length":2172.180701507128},{"x":-960,"y":630,"length":1148.2595525402783},{"x":-1053,"y":-250,"length":1082.270298954933},{"x":-436,"y":-1643,"length":1699.866171202898},{"x":-238,"y":-1865,"length":1880.124729904907},{"x":76,"y":-1880,"length":1881.5355431136559},{"x":65,"y":-625,"length":628.3709095749102},{"x":25,"y":-620,"length":620.5038275466155},{"x":-17,"y":-612,"length":612.2360655825496},{"x":-64,"y":-595,"length":598.4321181220139},{"x":-102,"y":-574,"length":582.9922812525051},{"x":-135,"y":-551,"length":567.2971002922543},{"x":-168,"y":-520,"length":546.4650034540181},{"x":-196,"y":-487,"length":524.9619033796642},{"x":-218,"y":-449,"length":499.1242330322181},{"x":-237,"y":-402,"length":466.6615475909709},{"x":-247,"y":-353,"length":430.83407478981974},{"x":-250,"y":-299,"length":389.7447882910046},{"x":-243,"y":-242,"length":342.94751785076386},{"x":-230,"y":-197,"length":302.8349385391322},{"x":-207,"y":-151,"length":256.2225595063791},{"x":-180,"y":-113,"length":212.52999788265186},{"x":-146,"y":-78,"length":165.5294535724685},{"x":-112,"y":-51,"length":123.06502346320826},{"x":-72,"y":-27,"length":76.89603370785778},{"x":-34,"y":-14,"length":36.76955262170047},{"x":4,"y":-4,"length":5.656854249492381}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":200,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":390},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1830,"y":5,"length":1830.006830588345},{"x":1970,"y":-95,"length":1972.28927898521},{"x":2385,"y":-855,"length":2533.6238868466644},{"x":2600,"y":-885,"length":2746.493218633536},{"x":3685,"y":-880,"length":3788.6178218447953},{"x":5595,"y":-860,"length":5660.708877870333},{"x":6385,"y":-515,"length":6405.735711063952},{"x":8150,"y":-180,"length":8151.98748772347}],"lineId":-1,"physic":false,"directed":false,"width":8163,"shape":false,"height":954.05,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":90,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":-210,"smoothing":true,"y":400,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":2,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1250,"y":-5,"length":1250.0099999600004}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":20,"rotation":0,"stretchTexture":false,"height":25,"x":264,"isStatic":true,"repeatTexture":true,"id":-1,"width":1263,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":79,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":8,"vertices":[{"x":-5,"y":-685,"length":685.0182479321263},{"x":64,"y":-684,"length":686.9876272539411},{"x":62,"y":-610,"length":613.1427240047785},{"x":68,"y":-539,"length":543.2724914810246},{"x":80,"y":-479,"length":485.6346363265289},{"x":100,"y":-426,"length":437.5797070249031},{"x":128,"y":-371,"length":392.4601890638081},{"x":163,"y":-325,"length":363.5849281804734},{"x":200,"y":-285,"length":348.1738071710737},{"x":244,"y":-246,"length":346.48520891951506},{"x":290,"y":-213,"length":359.8180095548304},{"x":343,"y":-188,"length":391.14319628494115},{"x":400,"y":-169,"length":434.2361108889955},{"x":473,"y":-154,"length":497.43843840218057},{"x":556,"y":-152,"length":576.4026370515666},{"x":623,"y":-154,"length":641.7515095424396},{"x":683,"y":-162,"length":701.9494283778569},{"x":730,"y":-176,"length":750.9167730181555},{"x":767,"y":-199,"length":792.3951034679606},{"x":805,"y":-230,"length":837.2126372672597},{"x":860,"y":-195,"length":881.8304825758747},{"x":915,"y":-160,"length":928.8837386885401},{"x":966,"y":-128,"length":974.4434308876016},{"x":1020,"y":-95,"length":1024.414466902923},{"x":1070,"y":-65,"length":1071.9724809900672},{"x":1130,"y":-30,"length":1130.3981599418853},{"x":1214,"y":22,"length":1214.1993246580234},{"x":1214,"y":73,"length":1216.1928301054895},{"x":1215,"y":120,"length":1220.911544707478},{"x":1115,"y":120,"length":1121.4388079605592},{"x":1010,"y":120,"length":1017.1037311896953},{"x":915,"y":120,"length":922.8353049163214},{"x":835,"y":120,"length":843.5786863120713},{"x":740,"y":120,"length":749.6665925596525},{"x":645,"y":120,"length":656.0678318588712},{"x":550,"y":120,"length":562.9387178015028},{"x":450,"y":120,"length":465.72524088780074},{"x":350,"y":120,"length":370},{"x":250,"y":120,"length":277.308492477241},{"x":165,"y":120,"length":204.02205763103166},{"x":75,"y":120,"length":141.50971698084905},{"x":30,"y":70,"length":76.15773105863909},{"x":-5,"y":25,"length":25.495097567963924},{"x":-5,"y":-30,"length":30.4138126514911},{"x":-5,"y":-95,"length":95.13148795220224},{"x":-5,"y":-155,"length":155.08062419270823},{"x":-5,"y":-220,"length":220.05681084665386},{"x":-5,"y":-290,"length":290.0431002454635},{"x":-5,"y":-360,"length":360.0347205478938},{"x":-5,"y":-430,"length":430.0290687848904},{"x":-5,"y":-495,"length":495.025251881154},{"x":-5,"y":-565,"length":565.022123460666},{"x":-5,"y":-630,"length":630.0198409574099}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":310,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-380},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":642,"x":3139,"directed":false,"isPillar":false,"y":-543,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":70,"y":0,"length":70},{"x":145,"y":0,"length":145},{"x":225,"y":0,"length":225},{"x":310,"y":0,"length":310},{"x":390,"y":0,"length":390},{"x":445,"y":-10,"length":445.1123453691214},{"x":493,"y":-25,"length":493.63346726088173},{"x":538,"y":-50,"length":540.3184246349554},{"x":584,"y":-84,"length":590.0101694038841},{"x":618,"y":-123,"length":630.1214168713836},{"x":644,"y":-166,"length":665.0503740319225},{"x":669,"y":-224,"length":705.5047838250283},{"x":680,"y":-275,"length":733.501874571565},{"x":682,"y":-374,"length":777.8174593052023},{"x":680,"y":-455,"length":818.1839646436491},{"x":680,"y":-534,"length":864.6132083191883},{"x":675,"y":-629,"length":922.6407751665866}],"rotation":0,"width":695},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":1159,"x":3450,"directed":false,"isPillar":false,"y":-1050,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-183,"y":-983,"length":999.8889938388161},{"x":-255,"y":-930,"length":964.3261896267259},{"x":-321,"y":-880,"length":936.7182073601431},{"x":-390,"y":-831,"length":917.9656856331832},{"x":-459,"y":-781,"length":905.8929296555967},{"x":-530,"y":-728,"length":900.4909771896662},{"x":-600,"y":-678,"length":905.3640151894706},{"x":-676,"y":-624,"length":919.9739126736149},{"x":-745,"y":-578,"length":942.9257659010067},{"x":-802,"y":-534,"length":963.5144005151143},{"x":-846,"y":-486,"length":975.6597767664709},{"x":-878,"y":-437,"length":980.7410463521959},{"x":-897,"y":-388,"length":977.3192927595362},{"x":-908,"y":-338,"length":968.8694442493271},{"x":-912,"y":-284,"length":955.1963149007643},{"x":-906,"y":-232,"length":935.23259139104},{"x":-892,"y":-182,"length":910.3779434937998},{"x":-876,"y":-137,"length":886.6481827647311},{"x":-854,"y":-104,"length":860.3092467246879},{"x":-826,"y":-68,"length":828.7943049997388},{"x":-801,"y":-45,"length":802.2630491303959},{"x":-768,"y":-17,"length":768.188127999906},{"x":-731,"y":5,"length":731.0170996632021},{"x":-686,"y":25,"length":686.4553882081486},{"x":-596,"y":46,"length":597.7725319885483},{"x":-514,"y":64,"length":517.9691110481397},{"x":-419,"y":85,"length":427.53479390571243},{"x":-303,"y":112,"length":323.0371495664237},{"x":-211,"y":132,"length":248.8875247978492},{"x":-149,"y":145,"length":207.90863377935992},{"x":-74,"y":162,"length":178.10109488714548},{"x":-36,"y":163,"length":166.9281282468596},{"x":-1,"y":158,"length":158.00316452527144},{"x":25,"y":146,"length":148.12494725737457},{"x":53,"y":126,"length":136.69308687713507},{"x":81,"y":99,"length":127.91403363196706},{"x":100,"y":67,"length":120.37026210821342}],"rotation":0,"width":1025},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":6,"vertices":[{"x":-25,"y":0,"length":25},{"x":570,"y":-475,"length":741.9737192111322},{"x":605,"y":-475,"length":769.1878834199093},{"x":605,"y":-455,"length":757.0006605016933},{"x":225,"y":-110,"length":250.44959572736389},{"x":1690,"y":-110,"length":1693.576098083579},{"x":1320,"y":-445,"length":1392.9913854722863},{"x":1320,"y":-470,"length":1401.1780757633912},{"x":1355,"y":-470,"length":1434.1983823725363},{"x":2005,"y":5,"length":2005.0062344042724}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3860,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1180},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":2,"vertices":[{"x":0,"y":0,"length":0},{"x":655,"y":0,"length":655},{"x":660,"y":430,"length":787.7182237323192},{"x":5,"y":430,"length":430.0290687848904}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":6210,"isStatic":true,"id":35,"isWheel":false,"ignore":false,"graphic":true,"y":-580},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":2,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1250,"y":-5,"length":1250.0099999600004}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":20,"rotation":0,"stretchTexture":false,"height":25,"x":264,"isStatic":true,"repeatTexture":true,"id":-1,"width":1263,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":97,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"height":128.35,"x":2450,"y":-610,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":2420,"y":-590,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":111.4,"x":6113,"y":-707,"rotation":0,"scaleX":1,"scaleY":1,"width":66.9},"className":"Dec22"},{"params":{"height":105.25,"x":6013,"y":-697,"rotation":0,"scaleX":1,"scaleY":1,"width":74.1},"className":"Dec21"}],[{"params":{"height":18,"x":330,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":450,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":580,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":956,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":827,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":700,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":1450,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":1330,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":1210,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":1086,"y":-240,"rotation":0,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":1545,"y":-238,"rotation":3,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":1606,"y":-228,"rotation":13.000000000000004,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":1665,"y":-207,"rotation":25.000000000000004,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":1718,"y":-177,"rotation":34,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":3807,"y":-1203,"rotation":-107.99999999999996,"safeId":1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":3692,"y":-1343,"rotation":-151.99999999999994,"safeId":1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":3781,"y":-1260,"rotation":-122.99999999999994,"safeId":1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":3742,"y":-1307,"rotation":-137.99999999999994,"safeId":1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"rate":1,"height":128,"x":330,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":490,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":650,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":810,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":1290,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":1130,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":970,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":1450,"id":-1,"rotation":-90,"safeId":-1,"speed":1000,"y":-64,"width":263},"className":"GeyserE"},{"params":{"height":99,"force":5000,"y":-590,"rotation":0,"safeId":1,"x":3360,"time":2,"width":100},"className":"BoostE"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":27,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":28,"count":1,"radius":1,"y":-210,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":30,"count":1,"radius":1,"y":-310,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":29,"count":1,"radius":1,"y":-260,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":32,"count":1,"radius":1,"y":-410,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":31,"count":1,"radius":1,"y":-360,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":34,"count":1,"radius":1,"y":-510,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":33,"count":1,"radius":1,"y":-460,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6210,"id":35,"count":1,"radius":1,"y":-560,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":35,"count":1,"radius":1,"y":-560,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":34,"count":1,"radius":1,"y":-510,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":33,"count":1,"radius":1,"y":-460,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":32,"count":1,"radius":1,"y":-410,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":31,"count":1,"radius":1,"y":-360,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":30,"count":1,"radius":1,"y":-310,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":29,"count":1,"radius":1,"y":-260,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":28,"count":1,"radius":1,"y":-210,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6860,"id":27,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6260,"id":26,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6310,"id":25,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6360,"id":24,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6410,"id":23,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6460,"id":22,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6510,"id":21,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6560,"id":21,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6610,"id":22,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6660,"id":23,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6710,"id":24,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6760,"id":25,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":6810,"id":26,"count":1,"radius":1,"y":-160,"width":53.2},"className":"Tnt1"}],null,[{"params":{"height":32,"x":330,"y":270,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1619,"x":2450,"y":-680,"width":128,"id":1,"rotation":0},"className":"SafePointE"}],[{"params":{"height":1708,"hint":-1,"id":35,"rotation":0,"safeId":1,"x":6210,"off":false,"id_off":-1,"y":-1350,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":34,"rotation":0,"safeId":1,"x":6180,"off":false,"id_off":-1,"y":-1360,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":33,"rotation":0,"safeId":1,"x":6150,"off":false,"id_off":-1,"y":-1350,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":32,"rotation":0,"safeId":1,"x":6120,"off":false,"id_off":-1,"y":-1360,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":31,"rotation":0,"safeId":1,"x":6090,"off":false,"id_off":-1,"y":-1360,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":30,"rotation":0,"safeId":1,"x":6060,"off":false,"id_off":-1,"y":-1350,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":29,"rotation":0,"safeId":1,"x":6030,"off":false,"id_off":-1,"y":-1350,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":28,"rotation":0,"safeId":1,"x":6000,"off":false,"id_off":-1,"y":-1340,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":27,"rotation":0,"safeId":1,"x":5970,"off":false,"id_off":-1,"y":-1330,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":26,"rotation":0,"safeId":1,"x":5940,"off":false,"id_off":-1,"y":-1330,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":25,"rotation":0,"safeId":1,"x":5910,"off":false,"id_off":-1,"y":-1340,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":24,"rotation":0,"safeId":1,"x":5880,"off":false,"id_off":-1,"y":-1330,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":23,"rotation":0,"safeId":1,"x":5850,"off":false,"id_off":-1,"y":-1320,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":22,"rotation":0,"safeId":1,"x":5820,"off":false,"id_off":-1,"y":-1320,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1708,"hint":-1,"id":21,"rotation":0,"safeId":1,"x":5790,"off":false,"id_off":-1,"y":-1330,"width":64,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map11.json b/assets/levels/map11.json new file mode 100644 index 0000000..98596db --- /dev/null +++ b/assets/levels/map11.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"30,37,44","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":3,"vertices":[{"x":270,"y":0,"length":270},{"x":260,"y":69,"length":269},{"x":233,"y":134,"length":268.78430013674534},{"x":190,"y":190,"length":268.70057685088807},{"x":135,"y":233,"length":269.2842364491468},{"x":69,"y":260,"length":269},{"x":0,"y":270,"length":270},{"x":-69,"y":260,"length":269},{"x":-134,"y":233,"length":268.78430013674534},{"x":-190,"y":190,"length":268.70057685088807},{"x":-233,"y":134,"length":268.78430013674534},{"x":-260,"y":69,"length":269},{"x":-270,"y":0,"length":270},{"x":-260,"y":-69,"length":269},{"x":-233,"y":-135,"length":269.2842364491468},{"x":-190,"y":-190,"length":268.70057685088807},{"x":-135,"y":-233,"length":269.2842364491468},{"x":-69,"y":-260,"length":269},{"x":0,"y":-270,"length":270},{"x":69,"y":-260,"length":269},{"x":135,"y":-233,"length":269.2842364491468},{"x":190,"y":-190,"length":268.70057685088807},{"x":233,"y":-135,"length":269.2842364491468},{"x":260,"y":-69,"length":269}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":1687,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":267},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":1,"vertices":[{"x":-5,"y":-470,"length":470.02659499224086},{"x":210,"y":-455,"length":501.12373721467236},{"x":240,"y":-390,"length":457.93012567421243},{"x":255,"y":-345,"length":429.01048938225273},{"x":285,"y":-290,"length":406.6017707782395},{"x":310,"y":-245,"length":395.12656200260693},{"x":340,"y":-175,"length":382.39377609997786},{"x":345,"y":-115,"length":363.6619309193636},{"x":365,"y":-45,"length":367.76351096866586},{"x":370,"y":15,"length":370.3039292257105},{"x":375,"y":75,"length":382.4264635194589},{"x":360,"y":155,"length":391.95025194532025},{"x":370,"y":240,"length":441.02154142399894},{"x":385,"y":295,"length":485.02577251111103},{"x":415,"y":355,"length":546.122696836526},{"x":445,"y":415,"length":608.481717063052},{"x":460,"y":445,"length":640.0195309519859},{"x":480,"y":485,"length":682.367203197809},{"x":505,"y":525,"length":728.4572739701348},{"x":525,"y":555,"length":763.9698946948106},{"x":575,"y":605,"length":834.6556176052492},{"x":-130,"y":635,"length":648.1705022600149},{"x":-60,"y":530,"length":533.3854141237834},{"x":-45,"y":470,"length":472.1493407810711},{"x":-30,"y":395,"length":396.13760235554514},{"x":-25,"y":295,"length":296.05742686174926},{"x":-20,"y":235,"length":235.8495283014151},{"x":-30,"y":160,"length":162.78820596099706},{"x":-40,"y":95,"length":103.07764064044152},{"x":-65,"y":5,"length":65.19202405202648},{"x":-80,"y":-40,"length":89.44271909999159},{"x":-85,"y":-95,"length":127.47548783981962},{"x":-60,"y":-140,"length":152.31546211727817},{"x":-55,"y":-195,"length":202.6079958935481},{"x":-35,"y":-260,"length":262.3451924468981},{"x":-20,"y":-315,"length":315.6342820417326},{"x":-5,"y":-360,"length":360.0347205478938}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":12210,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-540},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":1,"vertices":[{"x":475,"y":-290,"length":556.5294241996554},{"x":720,"y":-345,"length":798.3890029302759},{"x":745,"y":-235,"length":781.184997295775},{"x":770,"y":-195,"length":794.3078748193298},{"x":790,"y":-175,"length":809.1507894082537},{"x":800,"y":-135,"length":811.3106679934635},{"x":820,"y":-100,"length":826.0750571225353},{"x":840,"y":-55,"length":841.7986695166487},{"x":845,"y":-5,"length":845.0147927699254},{"x":880,"y":40,"length":880.9086218218097},{"x":870,"y":100,"length":875.7282683572571},{"x":530,"y":115,"length":542.3329235810786},{"x":520,"y":20,"length":520.3844732503075},{"x":525,"y":-25,"length":525.594901040716},{"x":535,"y":-70,"length":539.5600059307584},{"x":530,"y":-125,"length":544.5410911951457},{"x":515,"y":-180,"length":545.5501810099599}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":-440,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":370},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":233,"x":13400,"y":-40,"rotation":0,"width":398},"className":"FinishZone"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":310,"y":-80,"length":320.1562118716424},{"x":1385,"y":-80,"length":1387.3085453495917},{"x":2005,"y":310,"length":2028.823550730817}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":7590,"smoothing":true,"y":60,"width":2018,"height":403,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"layer":6,"vertices":[{"x":-38,"y":-26,"length":46.04345773288535},{"x":-17,"y":-42,"length":45.31004303683677},{"x":8,"y":-55,"length":55.57877292636101},{"x":40,"y":-60,"length":72.11102550927978},{"x":77,"y":-58,"length":96.40020746865642},{"x":116,"y":-43,"length":123.71337841963576},{"x":146,"y":-19,"length":147.2311108427835},{"x":166,"y":6,"length":166.10839834276894},{"x":178,"y":43,"length":183.12017911743098},{"x":180,"y":91,"length":201.6953147695801},{"x":163,"y":134,"length":211.00947846009194},{"x":133,"y":170,"length":215.84485168750263},{"x":98,"y":192,"length":215.56437553547664},{"x":34,"y":199,"length":201.8836298465034},{"x":-12,"y":187,"length":187.3846311734236},{"x":-47,"y":161,"length":167.72000476985446},{"x":-69,"y":128,"length":145.41320435228707},{"x":-81,"y":83,"length":115.97413504743201},{"x":-78,"y":38,"length":86.76404785393545},{"x":-62,"y":0,"length":62}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":8931,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-91},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":-38,"y":-26,"length":46.04345773288535},{"x":-17,"y":-42,"length":45.31004303683677},{"x":8,"y":-55,"length":55.57877292636101},{"x":40,"y":-60,"length":72.11102550927978},{"x":77,"y":-58,"length":96.40020746865642},{"x":116,"y":-43,"length":123.71337841963576},{"x":146,"y":-19,"length":147.2311108427835},{"x":166,"y":6,"length":166.10839834276894},{"x":178,"y":43,"length":183.12017911743098},{"x":180,"y":91,"length":201.6953147695801},{"x":163,"y":134,"length":211.00947846009194},{"x":133,"y":170,"length":215.84485168750263},{"x":98,"y":192,"length":215.56437553547664},{"x":34,"y":199,"length":201.8836298465034},{"x":-12,"y":187,"length":187.3846311734236},{"x":-47,"y":161,"length":167.72000476985446},{"x":-69,"y":128,"length":145.41320435228707},{"x":-81,"y":83,"length":115.97413504743201},{"x":-78,"y":38,"length":86.76404785393545},{"x":-62,"y":0,"length":62}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":7859,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-91},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":-95,"y":0,"length":95},{"x":350,"y":0,"length":350},{"x":350,"y":35,"length":351.7456467392312},{"x":130,"y":130,"length":183.84776310850236},{"x":-95,"y":40,"length":103.07764064044152}],"density":0.8,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":7950,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":120},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"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}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":27,"plr":false,"line":true,"x":4078,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":253},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"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":245,"y":320,"length":403.01985062773275},{"x":255,"y":370,"length":449.36065693382636},{"x":250,"y":448,"length":513.0341119262929},{"x":245,"y":515,"length":570.3069349043548},{"x":230,"y":576,"length":620.2225407061566},{"x":212,"y":629,"length":663.7657719406749},{"x":188,"y":683,"length":708.4017221887592},{"x":153,"y":738,"length":753.6929082855961},{"x":115,"y":789,"length":797.3368171607278},{"x":80,"y":827,"length":830.8603974194461},{"x":30,"y":873,"length":873.5153118291631},{"x":-22,"y":913,"length":913.265021776264},{"x":-92,"y":952,"length":956.4350474548703},{"x":-153,"y":976,"length":987.9195311360131},{"x":-210,"y":992,"length":1013.9842207845248},{"x":-292,"y":1004,"length":1045.6003060443315},{"x":-380,"y":1006,"length":1075.3771431456037},{"x":-465,"y":995,"length":1098.2941318244398},{"x":-551,"y":970,"length":1115.5720505641937},{"x":-623,"y":940,"length":1127.7096257459186},{"x":-735,"y":863,"length":1133.5757583858258},{"x":-960,"y":468,"length":1068},{"x":-612,"y":731,"length":953.3650927110767},{"x":-542,"y":778,"length":948.1814172403929},{"x":-485,"y":804,"length":938.9574005246458},{"x":-406,"y":823,"length":917.6954832622856},{"x":-330,"y":826,"length":889.480747402663},{"x":-247,"y":816,"length":852.5637806052988},{"x":-169,"y":788,"length":805.9187303940764},{"x":-93,"y":742,"length":747.8054559843756},{"x":-37,"y":691,"length":691.9898843191279},{"x":3,"y":641,"length":641.0070202423683},{"x":33,"y":589,"length":589.9237238830118},{"x":56,"y":525,"length":527.9782192477262},{"x":69,"y":464,"length":469.1023342512804},{"x":72,"y":390,"length":396.5904688718578},{"x":65,"y":322,"length":328.49505323520475},{"x":48,"y":267,"length":271.28029784707917},{"x":27,"y":223,"length":224.62858233092243},{"x":14,"y":182,"length":182.53766734567415},{"x":10,"y":145,"length":145.34441853748632},{"x":17,"y":106,"length":107.35455276791944},{"x":37,"y":64,"length":73.92563831310488}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3625,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":150},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":255.1,"x":12345,"y":-802,"rotation":0,"width":255.1},"className":"OvalTemplate"},{"params":{"layer":3,"vertices":[{"x":94,"y":-36,"length":100.65783625729296},{"x":119,"y":-44,"length":126.87395319765204},{"x":154,"y":-47,"length":161.01242188104618},{"x":182,"y":-44,"length":187.2431574183687},{"x":210,"y":-34,"length":212.73457640919588},{"x":240,"y":-15,"length":240.46829312822095},{"x":260,"y":10,"length":260.1922366251537},{"x":273,"y":40,"length":275.9148419349709},{"x":277,"y":73,"length":286.457675756821},{"x":275,"y":100,"length":292.61749776799064},{"x":267,"y":128,"length":296.096268129134},{"x":251,"y":156,"length":295.52834043455124},{"x":231,"y":176,"length":290.4083332137699},{"x":205,"y":194,"length":282.24280327406046},{"x":176,"y":205,"length":270.1869722988138},{"x":141,"y":207,"length":250.4595775769016},{"x":104,"y":200,"length":225.42404485768594},{"x":70,"y":180,"length":193.13207915827965},{"x":46,"y":156,"length":162.64070831129578},{"x":32,"y":131,"length":134.8517704741024},{"x":22,"y":98,"length":100.43903623591775},{"x":22,"y":68,"length":71.47027354082255},{"x":25,"y":44,"length":50.60632371551998},{"x":37,"y":19,"length":41.593268686170845},{"x":53,"y":-4,"length":53.150729063673246},{"x":72,"y":-21,"length":75}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":-27,"plr":false,"line":true,"x":12175,"isStatic":false,"id":-1,"isWheel":true,"ignore":false,"graphic":true,"y":-806},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":-5,"y":40,"length":40.311288741492746},{"x":50,"y":0,"length":50},{"x":930,"y":635,"length":1126.110562955521},{"x":765,"y":640,"length":997.409143731899},{"x":340,"y":655,"length":737.9871272590058},{"x":340,"y":595,"length":685.2919086053768},{"x":685,"y":585,"length":900.8051953669006},{"x":280,"y":290,"length":403.11288741492746},{"x":295,"y":665,"length":727.4957044546724},{"x":55,"y":665,"length":667.2705598181295},{"x":55,"y":595,"length":597.5366097570926},{"x":0,"y":575,"length":575},{"x":0,"y":535,"length":535},{"x":55,"y":510,"length":512.9571132170797},{"x":55,"y":430,"length":433.50317184537414},{"x":0,"y":410,"length":410},{"x":0,"y":365,"length":365},{"x":60,"y":345,"length":350.1785258978626},{"x":60,"y":275,"length":281.4693589007514},{"x":0,"y":250,"length":250},{"x":0,"y":195,"length":195},{"x":50,"y":170,"length":177.2004514666935},{"x":50,"y":120,"length":130},{"x":0,"y":90,"length":90}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":-36,"plr":false,"line":true,"x":4291,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":281},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"sf":true,"bg":true,"x":7420,"vertices":[{"x":0,"y":0,"length":0},{"x":2450,"y":0,"length":2450},{"x":2335,"y":330,"length":2358.2037655809136},{"x":2230,"y":455,"length":2275.944858734499},{"x":2015,"y":595,"length":2101.0116610813943},{"x":15,"y":595,"length":595.1890455981192}],"id":-1,"density":1.5,"viscosity":1.5,"y":-50,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":2,"vertices":[{"x":2125,"y":-345,"length":2152.8237271081903},{"x":2302,"y":-390,"length":2334.8027753966717},{"x":2411,"y":-436,"length":2450.1055079322605},{"x":2515,"y":-485,"length":2561.3375412077185},{"x":2755,"y":-620,"length":2823.9024416576435},{"x":2865,"y":-680,"length":2944.5925015186735},{"x":2920,"y":-695,"length":3001.5704222956356},{"x":2985,"y":-685,"length":3062.5887742235327},{"x":3055,"y":-665,"length":3126.539620730881},{"x":3123,"y":-622,"length":3184.3387068589295},{"x":3197,"y":-578,"length":3248.8294815209983},{"x":3258,"y":-557,"length":3305.2704881749087},{"x":3340,"y":-545,"length":3384.172720178449},{"x":3415,"y":-540,"length":3457.430404216403},{"x":3493,"y":-549,"length":3535.880371279549},{"x":3557,"y":-573,"length":3602.8569219440287},{"x":3626,"y":-582,"length":3672.4106524189256},{"x":3705,"y":-567,"length":3748.1347361054136},{"x":3771,"y":-541,"length":3809.609166305646},{"x":3823,"y":-507,"length":3856.472222122182},{"x":4295,"y":-155,"length":4297.795946761549},{"x":4230,"y":34,"length":4230.136640819064},{"x":4420,"y":737,"length":4481.023209045005},{"x":640,"y":650,"length":912.1951545584968},{"x":1075,"y":-345,"length":1129.0039858211308}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":false,"x":-1634,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":765},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1050,"y":-390,"length":1120.0892821556681},{"x":2055,"y":-385,"length":2090.7534527055072},{"x":2715,"y":-555,"length":2771.1459723370763},{"x":2790,"y":-565,"length":2846.6339771737426},{"x":3570,"y":-460,"length":3599.5138560644546},{"x":3640,"y":-440,"length":3666.4969657699157},{"x":3730,"y":-390,"length":3750.3333185198353},{"x":4860,"y":270,"length":4867.494221876385},{"x":5015,"y":315,"length":5024.8830832169615},{"x":5185,"y":320,"length":5194.865253305421},{"x":5345,"y":280,"length":5352.328932343377},{"x":5505,"y":120,"length":5506.30774657574},{"x":5655,"y":-50,"length":5655.221039004577},{"x":6175,"y":-415,"length":6188.929632820202},{"x":6855,"y":-585,"length":6879.916423910977},{"x":7395,"y":-570,"length":7416.93501387197},{"x":12740,"y":-865,"length":12769.331423375304},{"x":13040,"y":-1085,"length":13085.061138565612},{"x":13115,"y":-1180,"length":13167.977255448159},{"x":13370,"y":-940,"length":13403.003394761936},{"x":13690,"y":-780,"length":13712.202594769376},{"x":14145,"y":-750,"length":14164.869395797477},{"x":15260,"y":-950,"length":15289.542177580073},{"x":17000,"y":-680,"length":17013.59456434765}],"lineId":0,"physic":false,"directed":true,"width":17017.65,"shape":false,"height":1579.35,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":80,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":-1604,"smoothing":true,"y":817,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"layer":2,"vertices":[{"x":1460,"y":-2168,"length":2613.7758128806686},{"x":1611,"y":-1988,"length":2558.8014772545366},{"x":5995,"y":-2780,"length":6608.208910135938},{"x":11620,"y":-3870,"length":12247.501786078661},{"x":15355,"y":-4355,"length":15960.64065130219},{"x":18910,"y":-1445,"length":18965.12918490143},{"x":15755,"y":2280,"length":15919.121363944681},{"x":14383,"y":372,"length":14387.809875029625},{"x":14418,"y":-123,"length":14418.52464713363},{"x":14429,"y":-155,"length":14429.83250076036},{"x":14476,"y":-641,"length":14490.18485044273},{"x":14479,"y":-718,"length":14496.791541579123},{"x":14468,"y":-805,"length":14490.377807358924},{"x":14451,"y":-882,"length":14477.89090302866},{"x":14427,"y":-941,"length":14457.655757417937},{"x":14390,"y":-1006,"length":14425.12169792685},{"x":14335,"y":-1078,"length":14375.4759573379},{"x":14277,"y":-1140,"length":14322.441446904226},{"x":14208,"y":-1189,"length":14257.664079364473},{"x":14126,"y":-1234,"length":14179.796613492028},{"x":14040,"y":-1260,"length":14096.4250787212},{"x":13960,"y":-1275,"length":14018.103473722827},{"x":13875,"y":-1275,"length":13933.457934052121},{"x":13780,"y":-1265,"length":13837.941501538442},{"x":13690,"y":-1240,"length":13746.043067006593},{"x":13605,"y":-1200,"length":13657.819189021357},{"x":13540,"y":-1155,"length":13589.173080066352},{"x":13485,"y":-1105,"length":13530.19770735077},{"x":13435,"y":-1050,"length":13475.968425311778},{"x":13400,"y":-1000,"length":13437.26162579266},{"x":13370,"y":-945,"length":13403.35499044922},{"x":13345,"y":-885,"length":13374.313066471863},{"x":13325,"y":-815,"length":13349.900748694727},{"x":13291,"y":-786,"length":13314.220855911923},{"x":13253,"y":-788,"length":13276.405876591753},{"x":13177,"y":-866,"length":13205.426346771239},{"x":13113,"y":-933,"length":13146.149930683128},{"x":12873,"y":-1176,"length":12926.604542570334},{"x":12790,"y":-1234,"length":12849.3912696283},{"x":12700,"y":-1273,"length":12763.640899053844},{"x":12574,"y":-1324,"length":12643.514226669735},{"x":12415,"y":-1370,"length":12490.361283806005},{"x":12248,"y":-1404,"length":12328.208304534768},{"x":12080,"y":-1425,"length":12163.758670739895},{"x":11875,"y":-1440,"length":11961.99084600887},{"x":11695,"y":-1450,"length":11784.546024349007},{"x":11545,"y":-1435,"length":11633.840724369575},{"x":11415,"y":-1405,"length":11501.141247719723},{"x":11295,"y":-1385,"length":11379.597971809022},{"x":6575,"y":-1345,"length":6711.158618301314},{"x":6495,"y":-1365,"length":6636.88556478112},{"x":6415,"y":-1410,"length":6568.129490197342},{"x":6290,"y":-1495,"length":6465.224280719115},{"x":6125,"y":-1590,"length":6328.011140951002},{"x":6010,"y":-1630,"length":6227.118113541769},{"x":5870,"y":-1655,"length":6098.846202356639},{"x":5650,"y":-1665,"length":5890.222831099007},{"x":5545,"y":-1655,"length":5786.713229459362},{"x":5420,"y":-1620,"length":5656.9249597285625},{"x":5330,"y":-1590,"length":5562.103918482646},{"x":3680,"y":-665,"length":3739.602251577031},{"x":3560,"y":-615,"length":3612.7309614749893},{"x":3445,"y":-590,"length":3495.157364125398},{"x":3360,"y":-610,"length":3414.923132370625},{"x":3140,"y":-725,"length":3222.611518628952},{"x":3010,"y":-815,"length":3118.3849986812083},{"x":2870,"y":-880,"length":3001.8827425467503},{"x":2735,"y":-910,"length":2882.416520907414},{"x":2595,"y":-920,"length":2753.2571619810597},{"x":2455,"y":-910,"length":2618.2293635203164},{"x":2320,"y":-885,"length":2483.0676591667816},{"x":2215,"y":-840,"length":2368.9290829402216},{"x":2135,"y":-770,"length":2269.6089971622864},{"x":2034,"y":-602,"length":2121.2166320298356},{"x":1980,"y":-460,"length":2032.732151563506},{"x":1935,"y":-345,"length":1965.5151996359632},{"x":1843,"y":-212,"length":1855.1530934130476},{"x":1694,"y":-36,"length":1694.3824833844335},{"x":1580,"y":55,"length":1580.9569886622469},{"x":1495,"y":105,"length":1498.682754955164},{"x":1405,"y":120,"length":1410.1152435173517},{"x":1255,"y":145,"length":1263.3487246204033},{"x":1085,"y":155,"length":1096.0155108391486},{"x":940,"y":150,"length":951.8928511129811},{"x":795,"y":147,"length":808.4763447374327},{"x":755,"y":185,"length":777.3351915358007},{"x":715,"y":225,"length":749.5665414091},{"x":710,"y":270,"length":759.6051605933177},{"x":710,"y":345,"length":789.3826701923472},{"x":730,"y":450,"length":857.5546629807338},{"x":665,"y":425,"length":789.2084642222231},{"x":365,"y":435,"length":567.8468103282786},{"x":-450,"y":165,"length":479.2963592601137},{"x":1091,"y":-2242,"length":2493.3601825648857}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-924,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-3},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"sf":true,"bg":true,"x":3840,"vertices":[{"x":0,"y":0,"length":0},{"x":1630,"y":0,"length":1630},{"x":1630,"y":685,"length":1768.0851223852317},{"x":0,"y":685,"length":685}],"id":-1,"density":1.5,"viscosity":1.5,"y":140,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":2,"vertices":[{"x":4685,"y":145,"length":4687.243326305986},{"x":4740,"y":175,"length":4743.229385134141},{"x":4805,"y":200,"length":4809.160529655877},{"x":4875,"y":210,"length":4879.520980588156},{"x":4955,"y":210,"length":4959.448053967296},{"x":5005,"y":205,"length":5009.196542360861},{"x":5060,"y":195,"length":5063.756017029256},{"x":5105,"y":170,"length":5107.82977398425},{"x":5145,"y":145,"length":5147.042840311318},{"x":5190,"y":110,"length":5191.16557239316},{"x":5230,"y":65,"length":5230.403904097656},{"x":5260,"y":25,"length":5260.059410310876},{"x":5285,"y":-15,"length":5285.021286617491},{"x":5305,"y":-55,"length":5305.285100727387},{"x":5315,"y":-95,"length":5315.848944430231},{"x":5325,"y":-145,"length":5326.973812588157},{"x":5330,"y":-185,"length":5333.209633982148},{"x":5330,"y":-250,"length":5335.859818248601},{"x":5305,"y":-351,"length":5316.599100929089},{"x":5273,"y":-432,"length":5290.666593161962},{"x":5272,"y":-481,"length":5293.896957818503},{"x":5280,"y":-516,"length":5305.153720675773},{"x":5298,"y":-552,"length":5326.678890265491},{"x":5322,"y":-583,"length":5353.837222030569},{"x":5353,"y":-609,"length":5387.5309743889175},{"x":5393,"y":-628,"length":5429.44131564197},{"x":5434,"y":-635,"length":5470.97623829605},{"x":5481,"y":-631,"length":5517.2023707672715},{"x":5524,"y":-617,"length":5558.350924509895},{"x":5565,"y":-584,"length":5595.559042669463},{"x":5593,"y":-548,"length":5619.782291156838},{"x":5615,"y":-468,"length":5634.469717728546},{"x":5622,"y":-402,"length":5636.354140754464},{"x":5635,"y":-350,"length":5645.859102032214},{"x":5660,"y":-295,"length":5667.682506986432},{"x":5755,"y":-365,"length":5766.5631011894775},{"x":5777,"y":-377,"length":5789.288211861627},{"x":5804,"y":-384,"length":5816.689092602423},{"x":5834,"y":-380,"length":5846.362629875091},{"x":5861,"y":-368,"length":5872.541613305094},{"x":5882,"y":-347,"length":5892.226489197441},{"x":5894,"y":-321,"length":5902.734705202327},{"x":5897,"y":-292,"length":5904.225012649839},{"x":5892,"y":-265,"length":5897.956340970998},{"x":5834,"y":-172,"length":5836.534930932908},{"x":5900,"y":-137,"length":5901.590378872461},{"x":5976,"y":-78,"length":5976.5090144665555},{"x":6049,"y":-2,"length":6049.000330633154},{"x":6166,"y":41,"length":6166.136310527038},{"x":6258,"y":50,"length":6258.19974113962},{"x":6341,"y":46,"length":6341.166848459359},{"x":6417,"y":9,"length":6417.006311357345},{"x":6492,"y":-32,"length":6492.078865817944},{"x":6583,"y":-105,"length":6583.837330918801},{"x":7091,"y":1028,"length":7165.128400803435},{"x":4445,"y":895,"length":4534.2088615325165},{"x":4220,"y":15,"length":4220.026658683568},{"x":4295,"y":-155,"length":4297.795946761549}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":false,"x":-1634,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":765},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":2,"vertices":[{"x":2125,"y":-325,"length":2149.709282670566},{"x":2225,"y":-345,"length":2251.588328269624},{"x":2335,"y":-390,"length":2367.345559904595},{"x":2445,"y":-450,"length":2486.066169674492},{"x":2710,"y":-635,"length":2783.4016957672493},{"x":2790,"y":-685,"length":2872.8600731675047},{"x":2855,"y":-705,"length":2940.7567053396306},{"x":2930,"y":-710,"length":3014.7968422432714},{"x":2990,"y":-695,"length":3069.7108984397864},{"x":3055,"y":-665,"length":3126.539620730881},{"x":3123,"y":-622,"length":3184.3387068589295},{"x":3180,"y":-570,"length":3230.681042752441},{"x":3235,"y":-515,"length":3275.736558394158},{"x":3305,"y":-440,"length":3334.160314082093},{"x":3380,"y":-355,"length":3398.5916200685247},{"x":3475,"y":-260,"length":3484.713044140077},{"x":3635,"y":-90,"length":3636.113997112852},{"x":3720,"y":-55,"length":3720.4065638045527},{"x":3855,"y":-50,"length":3855.324240579513},{"x":3935,"y":-30,"length":3935.1143566610617},{"x":4060,"y":15,"length":4060.027709265049},{"x":4205,"y":40,"length":4205.190245399131},{"x":4330,"y":60,"length":4330.415684434925},{"x":4435,"y":80,"length":4435.721474574345},{"x":4560,"y":95,"length":4560.989475979965},{"x":4690,"y":105,"length":4691.175225889564},{"x":4820,"y":110,"length":4821.255023331581},{"x":4935,"y":100,"length":4936.0130672436435},{"x":5060,"y":95,"length":5060.891719845426},{"x":5190,"y":65,"length":5190.407016795503},{"x":5295,"y":25,"length":5295.0590176125515},{"x":5395,"y":-40,"length":5395.1482834116805},{"x":5460,"y":-140,"length":5461.794576876725},{"x":5520,"y":-245,"length":5525.4343720652405},{"x":5550,"y":-340,"length":5560.404661533187},{"x":5570,"y":-425,"length":5586.190562449512},{"x":5585,"y":-510,"length":5608.237245338325},{"x":5625,"y":-530,"length":5649.913716155318},{"x":5680,"y":-520,"length":5703.753150338819},{"x":5790,"y":-500,"length":5811.548846908197},{"x":5945,"y":-485,"length":5964.750623454429},{"x":6080,"y":-485,"length":6099.313485958891},{"x":6295,"y":-485,"length":6313.655834775918},{"x":6500,"y":-496,"length":6518.896839189894},{"x":6744,"y":-526,"length":6764.481650503607},{"x":6932,"y":-564,"length":6954.906181969674},{"x":7032,"y":-602,"length":7057.721161961557},{"x":7112,"y":-646,"length":7141.2785970020805},{"x":7180,"y":-700,"length":7214.041862922615},{"x":7227,"y":-756,"length":7266.434132365062},{"x":7260,"y":-838,"length":7308.203883308128},{"x":7282,"y":-868,"length":7333.5494816630235},{"x":7322,"y":-868,"length":7373.269830950174},{"x":7348,"y":-837,"length":7395.517088074369},{"x":7388,"y":-728,"length":7423.781246777144},{"x":7440,"y":-660,"length":7469.216826414936},{"x":7530,"y":-590,"length":7553.078842432403},{"x":7620,"y":-531,"length":7638.478971627794},{"x":7707,"y":-485,"length":7722.245398846116},{"x":7785,"y":-451,"length":7798.0527056438905},{"x":7858,"y":-423,"length":7869.376913072597},{"x":7944,"y":-402,"length":7954.16494674331},{"x":8042,"y":-381,"length":8051.020121698864},{"x":8146,"y":-370,"length":8154.398567644336},{"x":8253,"y":-366,"length":8261.111608010147},{"x":8345,"y":-371,"length":8353.242843351318},{"x":8434,"y":-382,"length":8442.646504503195},{"x":8537,"y":-408,"length":8546.74399991014},{"x":8618,"y":-438,"length":8629.123246309558},{"x":8706,"y":-480,"length":8719.222213018773},{"x":8808,"y":-552,"length":8825.28005221364},{"x":8874,"y":-624,"length":8895.912094889427},{"x":8921,"y":-647,"length":8944.431228423638},{"x":8954,"y":-643,"length":8977.057702833374},{"x":8980,"y":-626,"length":9001.792932521832},{"x":9018,"y":-584,"length":9036.88995174778},{"x":9038,"y":-560,"length":9055.3323517141},{"x":9056,"y":-538,"length":9071.966710697301},{"x":9061,"y":-500,"length":9074.78490103209},{"x":9061,"y":-381,"length":9069.006671074843},{"x":9024,"y":-216,"length":9026.584736211144},{"x":8955,"y":520,"length":8970.085005171355},{"x":8535,"y":1075,"length":8602.432795436416},{"x":6695,"y":935,"length":6759.974112376467},{"x":625,"y":1515,"length":1638.8563085273827},{"x":640,"y":315,"length":713.319703919638},{"x":1230,"y":-180,"length":1243.1009613060396},{"x":1085,"y":-325,"length":1132.6296835241428}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":false,"x":4231,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":419},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":8,"vertices":[{"x":94,"y":-36,"length":100.65783625729296},{"x":119,"y":-44,"length":126.87395319765204},{"x":154,"y":-47,"length":161.01242188104618},{"x":182,"y":-44,"length":187.2431574183687},{"x":210,"y":-34,"length":212.73457640919588},{"x":240,"y":-15,"length":240.46829312822095},{"x":260,"y":10,"length":260.1922366251537},{"x":273,"y":40,"length":275.9148419349709},{"x":277,"y":73,"length":286.457675756821},{"x":275,"y":100,"length":292.61749776799064},{"x":267,"y":128,"length":296.096268129134},{"x":251,"y":156,"length":295.52834043455124},{"x":231,"y":176,"length":290.4083332137699},{"x":205,"y":194,"length":282.24280327406046},{"x":176,"y":205,"length":270.1869722988138},{"x":141,"y":207,"length":250.4595775769016},{"x":104,"y":200,"length":225.42404485768594},{"x":70,"y":180,"length":193.13207915827965},{"x":46,"y":156,"length":162.64070831129578},{"x":32,"y":131,"length":134.8517704741024},{"x":22,"y":98,"length":100.43903623591775},{"x":22,"y":68,"length":71.47027354082255},{"x":25,"y":44,"length":50.60632371551998},{"x":37,"y":19,"length":41.593268686170845},{"x":53,"y":-4,"length":53.150729063673246},{"x":72,"y":-21,"length":75}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":-27,"plr":false,"line":true,"x":13215,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-216},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":750,"y":0,"length":750},{"x":830,"y":-15,"length":830.1355311032048},{"x":935,"y":-42,"length":935.9428401350159},{"x":1046,"y":-84,"length":1049.367428501571},{"x":1152,"y":-136,"length":1160},{"x":1255,"y":-197,"length":1270.3676633164116},{"x":1512,"y":-339,"length":1549.5370276311567},{"x":1568,"y":-353,"length":1607.243914283081},{"x":1624,"y":-346,"length":1660.4493367760426},{"x":1703,"y":-321,"length":1732.9887477995926},{"x":1842,"y":-237,"length":1857.1841588813963},{"x":1900,"y":-217,"length":1912.3516935961334},{"x":1985,"y":-201,"length":1995.150620880539},{"x":2065,"y":-195,"length":2074.186587556674},{"x":2138,"y":-206,"length":2147.9013012706146},{"x":2197,"y":-227,"length":2208.6959953782684},{"x":2273,"y":-238,"length":2285.4262184546674},{"x":2351,"y":-227,"length":2361.9335299707313},{"x":2426,"y":-195,"length":2433.824356850757},{"x":2519,"y":-128,"length":2522.2499876102684},{"x":3336,"y":491,"length":3371.9396495192495},{"x":3386,"y":517,"length":3425.2423271938},{"x":3432,"y":534,"length":3473.295265306421},{"x":3477,"y":544,"length":3519.2989358677673},{"x":3520,"y":548,"length":3562.4014372330357},{"x":3590,"y":549,"length":3631.7352601752236},{"x":3664,"y":541,"length":3703.7247467920724},{"x":3721,"y":521,"length":3757.2971668474665},{"x":3778,"y":491,"length":3809.7723029073536},{"x":3824,"y":457,"length":3851.210848551401},{"x":3871,"y":408,"length":3892.442035535019},{"x":3908,"y":363,"length":3924.822671153437},{"x":3938,"y":310,"length":3950.182780581172},{"x":3954,"y":272,"length":3963.3445472227113},{"x":3971,"y":198,"length":3975.933223785329},{"x":3976,"y":148,"length":3978.753573671031},{"x":3974,"y":95,"length":3975.1353436078125},{"x":3961,"y":35,"length":3961.1546296502993},{"x":3947,"y":-11,"length":3947.015328067526},{"x":3918,"y":-90,"length":3919.0335543345377},{"x":3917,"y":-142,"length":3919.573063485359},{"x":3927,"y":-175,"length":3930.8973530225894},{"x":3939,"y":-202,"length":3944.1760863328605},{"x":3953,"y":-223,"length":3959.2850364680744},{"x":3970,"y":-243,"length":3977.429949100298},{"x":3996,"y":-264,"length":4004.711225544234},{"x":4022,"y":-276,"length":4031.458793042538},{"x":4048,"y":-286,"length":4058.090684053278},{"x":4079,"y":-292,"length":4089.4382254779202},{"x":4112,"y":-291,"length":4122.2839543146465},{"x":4140,"y":-283,"length":4149.661311480733},{"x":4167,"y":-273,"length":4175.933189120727},{"x":4189,"y":-258,"length":4196.937573993685},{"x":4215,"y":-237,"length":4221.657731270975},{"x":4241,"y":-204,"length":4245.903555192935},{"x":4262,"y":-126,"length":4263.8620990834115},{"x":4269,"y":-60,"length":4269.4216235925915},{"x":4281,"y":-8,"length":4281.007474882519},{"x":4306,"y":49,"length":4306.278788002467},{"x":4399,"y":-20,"length":4399.045464643438},{"x":4422,"y":-34,"length":4422.130708154158},{"x":4448,"y":-40,"length":4448.179852478989},{"x":4477,"y":-37,"length":4477.1528899513805},{"x":4508,"y":-23,"length":4508.058673087563},{"x":4530,"y":-1,"length":4530.000110375275},{"x":4541,"y":23,"length":4541.05824670858},{"x":4544,"y":53,"length":4544.309078396847},{"x":4539,"y":80,"length":4539.704946359399},{"x":4482,"y":173,"length":4485.337556973834},{"x":4545,"y":206,"length":4549.666031699469},{"x":4620,"y":265,"length":4627.5938672273305},{"x":4696,"y":340,"length":4708.292259407863},{"x":4812,"y":385,"length":4827.377031059414},{"x":4908,"y":393,"length":4923.709272489593},{"x":4988,"y":389,"length":5003.145510576322},{"x":5139,"y":310,"length":5148.341577634491},{"x":5239,"y":233,"length":5244.178677352632},{"x":5333,"y":161,"length":5335.429692161635},{"x":5740,"y":-182,"length":5742.884641014479},{"x":5595,"y":-326,"length":5604.489361217487},{"x":6632,"y":-328,"length":6640.10602324993},{"x":6733,"y":-345,"length":6741.833133503083},{"x":6841,"y":-391,"length":6852.164767429342},{"x":6951,"y":-450,"length":6965.551019122608},{"x":7300,"y":-686,"length":7332.161754898756},{"x":7365,"y":-706,"length":7398.760774616247},{"x":7438,"y":-712,"length":7472.000267665948},{"x":7502,"y":-696,"length":7534.21661488439},{"x":7565,"y":-669,"length":7594.523421518957},{"x":7633,"y":-623,"length":7658.382205139673},{"x":7692,"y":-570,"length":7713.090431208492},{"x":7894,"y":-354,"length":7901.933434293154},{"x":8146,"y":-91,"length":8146.5082704186825},{"x":8233,"y":-56,"length":8233.190450851966},{"x":8365,"y":-53,"length":8365.167900287477},{"x":8570,"y":11,"length":8570.00705950701},{"x":8950,"y":78,"length":8950.339881814545},{"x":9077,"y":94,"length":9077.486711639956},{"x":9208,"y":105,"length":9208.59864474503},{"x":9332,"y":108,"length":9332.624925496577},{"x":9563,"y":93,"length":9563.45220095756},{"x":9701,"y":63,"length":9701.204564382713},{"x":9807,"y":22,"length":9807.024676220612},{"x":9901,"y":-36,"length":9901.06544771824},{"x":9968,"y":-135,"length":9968.914133445027},{"x":10029,"y":-240,"length":10031.87126113568},{"x":10062,"y":-349,"length":10068.050705076927},{"x":10096,"y":-513,"length":10109.024928250994},{"x":10135,"y":-532,"length":10148.9530987191},{"x":10301,"y":-503,"length":10313.27348614396},{"x":10455,"y":-488,"length":10466.382804006358},{"x":10811,"y":-488,"length":10822.008362591483},{"x":11008,"y":-500,"length":11019.349527081897},{"x":11257,"y":-529,"length":11269.422789122786},{"x":11444,"y":-566,"length":11457.988130557651},{"x":11542,"y":-607,"length":11557.950207541127},{"x":11627,"y":-653,"length":11645.322580332415},{"x":11691,"y":-704,"length":11712.177295447675},{"x":11732,"y":-757,"length":11756.397109659065},{"x":11766,"y":-839,"length":11795.875423214675},{"x":11795,"y":-872,"length":11827.189395625657},{"x":11838,"y":-873,"length":11870.146292274581},{"x":11861,"y":-842,"length":11890.848792243554},{"x":11900,"y":-729,"length":11922.308543231047},{"x":11955,"y":-659,"length":11973.14937683482},{"x":12029,"y":-601,"length":12044.00440053058},{"x":12122,"y":-540,"length":12134.02175702681},{"x":12218,"y":-488,"length":12227.74173754091},{"x":12355,"y":-432,"length":12362.550262789631},{"x":12458,"y":-404,"length":12464.548928862207},{"x":12611,"y":-377,"length":12616.63386169227},{"x":12719,"y":-372,"length":12724.438887432325},{"x":12814,"y":-372,"length":12819.398581836826},{"x":12942,"y":-387,"length":12947.784868463023},{"x":13045,"y":-411,"length":13051.4729436949},{"x":13216,"y":-486,"length":13224.932967694014},{"x":13316,"y":-552,"length":13327.436362631786},{"x":13381,"y":-626,"length":13395.634998013345},{"x":13435,"y":-652,"length":13450.811462510357},{"x":13468,"y":-646,"length":13483.483971140397},{"x":13495,"y":-629,"length":13509.650846709548},{"x":13568,"y":-542,"length":13578.821303780383},{"x":13575,"y":-501,"length":13584.241826469373},{"x":13572,"y":-386,"length":13577.487985632688},{"x":13537,"y":-224,"length":13538.853164134693},{"x":13465,"y":517,"length":13474.921669531144}],"lineId":0,"physic":false,"directed":false,"width":13613.55,"shape":false,"height":1486.4,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":170,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-280,"smoothing":true,"y":420,"direction":90,"textureOffset":0,"camera":false,"snapToGrid":false},"className":"frg.game.editor.objects::GroundPather"}],[{"params":{"height":17.05,"x":7940,"id":-1,"active":true,"safeId":1,"y":-154,"rotation":3,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8010,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8640,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8080,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8220,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8290,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8360,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8150,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8920,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8570,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8990,"id":-1,"active":true,"safeId":1,"y":-146,"rotation":9,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8710,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8780,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8850,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8500,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8430,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9053,"id":-1,"active":true,"safeId":1,"y":-117,"rotation":42,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8500,"id":-1,"active":true,"safeId":1,"y":-150,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8150,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8780,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8360,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8570,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8220,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8850,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8010,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7945,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8640,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8920,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8080,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8430,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8710,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8290,"id":-1,"active":true,"safeId":1,"y":110,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9086,"id":-1,"active":true,"safeId":1,"y":-58,"rotation":81,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9082,"id":-1,"active":true,"safeId":1,"y":12,"rotation":108,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9049,"id":-1,"active":true,"safeId":1,"y":73,"rotation":129,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8991,"id":-1,"active":true,"safeId":1,"y":106,"rotation":174,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7882,"id":-1,"active":true,"safeId":1,"y":107,"rotation":-174,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7812,"id":-1,"active":true,"safeId":1,"y":-107,"rotation":-54,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7782,"id":-1,"active":true,"safeId":1,"y":-45,"rotation":-75,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7869,"id":-1,"active":true,"safeId":1,"y":-148,"rotation":-15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7782,"id":-1,"active":true,"safeId":1,"y":25,"rotation":-102,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7818,"id":-1,"active":true,"safeId":1,"y":82,"rotation":-141,"width":85.95},"className":"PlankBone"},{"params":{"height":128.35,"x":5860,"y":30,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":10450,"y":-130,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":1280,"y":23,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":1316,"y":1,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":90.05,"x":1318,"y":-74,"rotation":0,"width":102},"className":"Sign21"},{"params":{"height":95.5,"x":5825,"y":45,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":79.6,"x":10480,"y":-110,"rotation":0,"scaleX":-1,"scaleY":1,"width":77.3},"className":"Dec23"}],[{"params":{"stones":false,"safeId":2,"physic":false,"impulse":14000,"rotation":-54,"height":53.2,"x":12494,"id":41,"count":1,"radius":64,"y":-1031,"width":53.2},"className":"Tnt1"},{"params":{"height":99,"force":5000,"y":-80,"rotation":0,"safeId":2,"x":12860,"time":2,"width":100},"className":"BoostE"},{"params":{"stones":false,"safeId":2,"physic":false,"impulse":21000,"rotation":0,"height":53.2,"x":13350,"id":31,"count":20,"radius":64,"y":-60,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":2,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":13406,"id":31,"count":1,"radius":64,"y":-60,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":2,"physic":false,"impulse":1,"rotation":0,"height":53.2,"x":13462,"id":31,"count":1,"radius":64,"y":-60,"width":53.2},"className":"Tnt1"}],null,[{"params":{"height":32,"x":20,"y":320,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1870,"x":5860,"y":-40,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":1958,"x":10450,"y":-200,"width":128,"id":2,"rotation":0},"className":"SafePointE"}],[{"params":{"safeId":-1,"rotation":0,"rate":50,"height":17,"x":3808,"id":3,"useWeld":false,"snd":false,"graphic":0,"time":1.3,"y":300,"width":17},"className":"MotorJointE"},{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":1686,"id":6,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":267,"width":17},"className":"MotorJointE"},{"params":{"height":1214,"hint":-1,"id":6,"rotation":0,"safeId":1,"x":656,"off":false,"id_off":-1,"y":237,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":4173,"id":-1,"rotation":27,"safeId":2,"graphic":0,"y":470,"width":17},"className":"PivotJointE"},{"params":{"cycle":0,"accelDist":0,"vertices":[{"x":0,"y":0,"length":0},{"x":-110,"y":-164,"length":197.47404892795407}],"stopOnEnd":true,"safeId":-1,"speed":150,"startTime":"0","rotation":0,"body":false,"height":177,"x":4753,"sideWait":0,"id":3,"active":0,"position":0,"snapToGrid":false,"y":440,"width":123},"className":"frg.game.editor.objects::MoverPather"},{"params":{"height":64,"hint":-1,"id":3,"rotation":0,"safeId":-1,"x":3420,"off":false,"id_off":-1,"y":240,"width":550,"sndId":-1},"className":"ToggleE"},{"params":{"height":885,"hint":-1,"id":5,"rotation":0,"safeId":1,"x":6850,"off":false,"id_off":-1,"y":-290,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":415,"hint":-1,"id":41,"rotation":-54,"safeId":2,"x":12407,"off":false,"id_off":-1,"y":-973,"width":49,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":31,"rotation":0,"safeId":2,"x":13730,"off":false,"id_off":-1,"y":-750,"width":1381,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":8397,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8257,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8677,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8467,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7977,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8117,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8047,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8747,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8187,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8537,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8817,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"safeId":1,"rotation":0,"rate":-190,"height":17,"x":7908,"id":5,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-20,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":8327,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8607,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8887,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8957,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9027,"id":-1,"rotation":9,"safeId":1,"graphic":0,"y":-140,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9081,"id":-1,"rotation":42,"safeId":1,"graphic":0,"y":-92,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8537,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8187,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8817,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8397,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8257,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8607,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8887,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8047,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8677,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8117,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8467,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8747,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8327,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":110,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9092,"id":-1,"rotation":81,"safeId":1,"graphic":0,"y":-21,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9070,"id":-1,"rotation":108,"safeId":1,"graphic":0,"y":48,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9025,"id":-1,"rotation":129,"safeId":1,"graphic":0,"y":102,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8953,"id":-1,"rotation":174,"safeId":1,"graphic":0,"y":109,"width":17},"className":"PivotJointE"},{"params":{"safeId":2,"rotation":0,"rate":180,"height":17,"x":12345,"id":29,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":-802,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":7903,"id":-1,"rotation":-9,"safeId":1,"graphic":0,"y":-156,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7834,"id":-1,"rotation":-54,"safeId":1,"graphic":0,"y":-137,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7845,"id":-1,"rotation":-174,"safeId":1,"graphic":0,"y":103,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7792,"id":-1,"rotation":-75,"safeId":1,"graphic":0,"y":-81,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7774,"id":-1,"rotation":-102,"safeId":1,"graphic":0,"y":-11,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7915,"id":-1,"rotation":177,"safeId":1,"graphic":0,"y":109,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7789,"id":-1,"rotation":-141,"safeId":1,"graphic":0,"y":59,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7981,"id":-1,"rotation":177,"safeId":1,"graphic":0,"y":109,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8981,"id":-1,"rotation":0,"safeId":1,"graphic":1,"y":-20,"width":17},"className":"PivotJointE"},{"params":{"height":1970,"hint":-1,"id":29,"rotation":0,"safeId":2,"x":11460,"off":false,"id_off":-1,"y":-590,"width":64,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map12.json b/assets/levels/map12.json new file mode 100644 index 0000000..fbfa03b --- /dev/null +++ b/assets/levels/map12.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"22,28,37","countdown":0,"gravityY":500},"layers":[[{"params":{"height":2384,"x":4400,"y":-900,"rotation":0,"width":985},"className":"FinishZone"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":30,"y":0,"length":30},{"x":30,"y":515,"length":515.8730463980455},{"x":0,"y":515,"length":515}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3680,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-130},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":5555,"y":0,"length":5555}],"lineId":0,"physic":true,"directed":true,"width":5568,"shape":true,"height":64,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":50,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-150,"smoothing":true,"y":390,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"layer":6,"vertices":[{"x":25,"y":-5,"length":25.495097567963924},{"x":39,"y":-13,"length":41.10960958218893},{"x":59,"y":-16,"length":61.1310068623117},{"x":76,"y":-13,"length":77.10382610480494},{"x":92,"y":-1,"length":92.00543462209176},{"x":102,"y":15,"length":103.0970416646375},{"x":106,"y":33,"length":111.01801655587259},{"x":101,"y":52,"length":113.6001760562016},{"x":92,"y":66,"length":113.22543883774529},{"x":76,"y":78,"length":108.90362712049586},{"x":55,"y":82,"length":98.73702446397704},{"x":34,"y":77,"length":84.17244204607586},{"x":22,"y":67,"length":70.51950084905593},{"x":13,"y":55,"length":56.515484603779164},{"x":7,"y":39,"length":39.6232255123179},{"x":7,"y":22,"length":23.08679276123039},{"x":13,"y":10,"length":16.401219466856727}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3640,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-190},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":0,"length":25},{"x":25,"y":40,"length":47.16990566028302},{"x":0,"y":40,"length":40}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":false,"x":3710,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":false,"y":350},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":549,"x":2320,"directed":false,"isPillar":false,"y":-140,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-28,"y":43,"length":51.31276644267},{"x":-49,"y":87,"length":99.84988733093293},{"x":-63,"y":136,"length":149.88328792764054},{"x":-69,"y":193,"length":204.9634113689563},{"x":-64,"y":256,"length":263.8787600395303},{"x":-49,"y":316,"length":319.77648443874045},{"x":-21,"y":370,"length":370.59546678285204},{"x":10,"y":410,"length":410.1219330881976},{"x":48,"y":445,"length":447.5812775351534},{"x":91,"y":476,"length":484.62047005878736},{"x":143,"y":501,"length":521.0086371644908},{"x":195,"y":515,"length":550.6813960903346},{"x":250,"y":520,"length":576.9748694700662},{"x":301,"y":515,"length":596.5115254544543},{"x":350,"y":504,"length":613.6089960227115},{"x":406,"y":478,"length":627.1522941040716},{"x":453,"y":444,"length":634.3067081467766},{"x":496,"y":402,"length":638.4512510756009},{"x":528,"y":357,"length":637.3641031623918},{"x":549,"y":313,"length":631.9572770369845},{"x":564,"y":257,"length":619.7943207226087},{"x":569,"y":206,"length":605.1421320648564},{"x":565,"y":152,"length":585.0888821367229},{"x":551,"y":100,"length":560.000892856431},{"x":522,"y":45,"length":523.9360648018038},{"x":484,"y":-16,"length":484.264390596707}],"rotation":0,"width":651},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":558,"x":1620,"directed":false,"isPillar":false,"y":-140,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":19,"y":-25,"length":31.400636936215164},{"x":-28,"y":43,"length":51.31276644267},{"x":-49,"y":87,"length":99.84988733093293},{"x":-63,"y":136,"length":149.88328792764054},{"x":-69,"y":193,"length":204.9634113689563},{"x":-64,"y":256,"length":263.8787600395303},{"x":-49,"y":316,"length":319.77648443874045},{"x":-21,"y":370,"length":370.59546678285204},{"x":10,"y":410,"length":410.1219330881976},{"x":48,"y":445,"length":447.5812775351534},{"x":91,"y":476,"length":484.62047005878736},{"x":143,"y":501,"length":521.0086371644908},{"x":195,"y":515,"length":550.6813960903346},{"x":250,"y":520,"length":576.9748694700662},{"x":301,"y":515,"length":596.5115254544543},{"x":350,"y":504,"length":613.6089960227115},{"x":406,"y":478,"length":627.1522941040716},{"x":453,"y":444,"length":634.3067081467766},{"x":496,"y":402,"length":638.4512510756009},{"x":528,"y":357,"length":637.3641031623918},{"x":549,"y":313,"length":631.9572770369845},{"x":564,"y":257,"length":619.7943207226087},{"x":569,"y":206,"length":605.1421320648564},{"x":565,"y":152,"length":585.0888821367229},{"x":554,"y":98,"length":562.6011020252271},{"x":530,"y":46,"length":531.992481149875},{"x":500,"y":0,"length":500}],"rotation":0,"width":651},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":562,"x":910,"directed":false,"isPillar":false,"y":-140,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-28,"y":43,"length":51.31276644267},{"x":-49,"y":87,"length":99.84988733093293},{"x":-63,"y":136,"length":149.88328792764054},{"x":-69,"y":193,"length":204.9634113689563},{"x":-64,"y":256,"length":263.8787600395303},{"x":-49,"y":316,"length":319.77648443874045},{"x":-21,"y":370,"length":370.59546678285204},{"x":10,"y":410,"length":410.1219330881976},{"x":48,"y":445,"length":447.5812775351534},{"x":91,"y":476,"length":484.62047005878736},{"x":143,"y":501,"length":521.0086371644908},{"x":195,"y":515,"length":550.6813960903346},{"x":250,"y":520,"length":576.9748694700662},{"x":301,"y":515,"length":596.5115254544543},{"x":350,"y":504,"length":613.6089960227115},{"x":406,"y":478,"length":627.1522941040716},{"x":453,"y":444,"length":634.3067081467766},{"x":496,"y":402,"length":638.4512510756009},{"x":528,"y":357,"length":637.3641031623918},{"x":549,"y":313,"length":631.9572770369845},{"x":564,"y":257,"length":619.7943207226087},{"x":569,"y":206,"length":605.1421320648564},{"x":565,"y":152,"length":585.0888821367229},{"x":554,"y":98,"length":562.6011020252271},{"x":530,"y":46,"length":531.992481149875},{"x":503,"y":4,"length":503.0159043211258},{"x":472,"y":-29,"length":472.8900506460249}],"rotation":0,"width":651},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":533,"x":530,"directed":false,"isPillar":false,"y":-840,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-28,"y":43,"length":51.31276644267},{"x":-49,"y":87,"length":99.84988733093293},{"x":-63,"y":136,"length":149.88328792764054},{"x":-69,"y":193,"length":204.9634113689563},{"x":-64,"y":256,"length":263.8787600395303},{"x":-49,"y":316,"length":319.77648443874045},{"x":-21,"y":370,"length":370.59546678285204},{"x":10,"y":410,"length":410.1219330881976},{"x":48,"y":445,"length":447.5812775351534},{"x":91,"y":476,"length":484.62047005878736},{"x":143,"y":501,"length":521.0086371644908},{"x":195,"y":515,"length":550.6813960903346},{"x":250,"y":520,"length":576.9748694700662},{"x":301,"y":515,"length":596.5115254544543},{"x":350,"y":504,"length":613.6089960227115},{"x":406,"y":478,"length":627.1522941040716},{"x":453,"y":444,"length":634.3067081467766},{"x":496,"y":402,"length":638.4512510756009},{"x":528,"y":357,"length":637.3641031623918},{"x":549,"y":313,"length":631.9572770369845},{"x":564,"y":257,"length":619.7943207226087},{"x":569,"y":206,"length":605.1421320648564},{"x":565,"y":152,"length":585.0888821367229}],"rotation":45,"width":651},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":543,"x":3080,"directed":false,"isPillar":false,"y":-140,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":9,"y":-10,"length":13.45362404707371},{"x":-28,"y":43,"length":51.31276644267},{"x":-49,"y":87,"length":99.84988733093293},{"x":-63,"y":136,"length":149.88328792764054},{"x":-69,"y":193,"length":204.9634113689563},{"x":-64,"y":256,"length":263.8787600395303},{"x":-49,"y":316,"length":319.77648443874045},{"x":-21,"y":370,"length":370.59546678285204},{"x":10,"y":410,"length":410.1219330881976},{"x":48,"y":445,"length":447.5812775351534},{"x":91,"y":476,"length":484.62047005878736},{"x":143,"y":501,"length":521.0086371644908},{"x":195,"y":515,"length":550.6813960903346},{"x":250,"y":520,"length":576.9748694700662}],"rotation":0,"width":332},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":95,"y":5,"length":95.13148795220224},{"x":170,"y":5,"length":170.07351351694948},{"x":249,"y":-6,"length":249.07227866625382},{"x":345,"y":-33,"length":346.5746672796499},{"x":423,"y":-71,"length":428.9172414347551},{"x":492,"y":-115,"length":505.26131852735375},{"x":540,"y":-155,"length":561.8051263561058},{"x":608,"y":-222,"length":647.2619253439832},{"x":665,"y":-297,"length":728.3090003563049},{"x":711,"y":-383,"length":807.5951956271161},{"x":742,"y":-476,"length":881.5554435201452},{"x":760,"y":-569,"length":949.4003370549223},{"x":761,"y":-663,"length":1009.3017388273935},{"x":754,"y":-746,"length":1060.6752566172174},{"x":741,"y":-811,"length":1098.545401883782},{"x":722,"y":-865,"length":1126.7248998757416},{"x":686,"y":-953,"length":1174.225276512135},{"x":624,"y":-1041,"length":1213.6955961030756},{"x":557,"y":-1111,"length":1242.8073060615632},{"x":492,"y":-1165,"length":1264.6299854107524},{"x":410,"y":-1218,"length":1285.1552435406393},{"x":311,"y":-1257,"length":1294.9015406585938},{"x":217,"y":-1277,"length":1295.3061414198576},{"x":128,"y":-1285,"length":1291.359361293362},{"x":-3840,"y":-1273,"length":4045.5072611478527},{"x":-3333,"y":-2706,"length":4293.171904315037},{"x":2060,"y":-2276,"length":3069.8169326524994},{"x":2075,"y":504,"length":2135.3315901751653},{"x":-120,"y":515,"length":528.7958017987662}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3862,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-120},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":788,"x":1380,"directed":true,"isPillar":true,"y":-626,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-75,"length":75},{"x":0,"y":-160,"length":160},{"x":0,"y":-240,"length":240},{"x":0,"y":-320,"length":320},{"x":0,"y":-405,"length":405},{"x":0,"y":-495,"length":495},{"x":0,"y":-575,"length":575},{"x":0,"y":-640,"length":640},{"x":0,"y":-710,"length":710},{"x":0,"y":-775,"length":775}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":788,"x":2140,"directed":true,"isPillar":true,"y":-633,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-75,"length":75},{"x":0,"y":-160,"length":160},{"x":0,"y":-240,"length":240},{"x":0,"y":-320,"length":320},{"x":0,"y":-405,"length":405},{"x":0,"y":-495,"length":495},{"x":0,"y":-575,"length":575},{"x":0,"y":-640,"length":640},{"x":0,"y":-710,"length":710},{"x":0,"y":-775,"length":775}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":-19,"length":27.586228448267445},{"x":45,"y":-30,"length":54.08326913195984},{"x":70,"y":-36,"length":78.71467461661771},{"x":99,"y":-33,"length":104.35516278555652},{"x":125,"y":-21,"length":126.75172582651489},{"x":145,"y":-4,"length":145.0551619212498},{"x":159,"y":15,"length":159.70597985047397},{"x":166,"y":38,"length":170.29386365926402},{"x":168,"y":65,"length":180.13605968822566},{"x":165,"y":87,"length":186.53149868051776},{"x":154,"y":111,"length":189.8341381311591},{"x":136,"y":130,"length":188.13824704190267},{"x":115,"y":144,"length":184.28510520386612},{"x":87,"y":152,"length":175.13708916160505},{"x":59,"y":151,"length":162.1172415260018},{"x":30,"y":142,"length":145.13442045221387},{"x":8,"y":125,"length":125.25573839150046},{"x":-6,"y":106,"length":106.16967551989597},{"x":-17,"y":81,"length":82.76472678623425},{"x":-20,"y":55,"length":58.52349955359813},{"x":-14,"y":27,"length":30.4138126514911}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":2146,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-249},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":-19,"length":27.586228448267445},{"x":45,"y":-30,"length":54.08326913195984},{"x":70,"y":-36,"length":78.71467461661771},{"x":99,"y":-33,"length":104.35516278555652},{"x":125,"y":-21,"length":126.75172582651489},{"x":145,"y":-4,"length":145.0551619212498},{"x":159,"y":15,"length":159.70597985047397},{"x":166,"y":38,"length":170.29386365926402},{"x":168,"y":65,"length":180.13605968822566},{"x":165,"y":87,"length":186.53149868051776},{"x":154,"y":111,"length":189.8341381311591},{"x":136,"y":130,"length":188.13824704190267},{"x":115,"y":144,"length":184.28510520386612},{"x":87,"y":152,"length":175.13708916160505},{"x":59,"y":151,"length":162.1172415260018},{"x":30,"y":142,"length":145.13442045221387},{"x":8,"y":125,"length":125.25573839150046},{"x":-6,"y":106,"length":106.16967551989597},{"x":-17,"y":81,"length":82.76472678623425},{"x":-20,"y":55,"length":58.52349955359813},{"x":-14,"y":27,"length":30.4138126514911}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":1436,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-249},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":-19,"length":27.586228448267445},{"x":45,"y":-30,"length":54.08326913195984},{"x":70,"y":-36,"length":78.71467461661771},{"x":99,"y":-33,"length":104.35516278555652},{"x":125,"y":-21,"length":126.75172582651489},{"x":145,"y":-4,"length":145.0551619212498},{"x":159,"y":15,"length":159.70597985047397},{"x":166,"y":38,"length":170.29386365926402},{"x":168,"y":65,"length":180.13605968822566},{"x":165,"y":87,"length":186.53149868051776},{"x":154,"y":111,"length":189.8341381311591},{"x":136,"y":130,"length":188.13824704190267},{"x":115,"y":144,"length":184.28510520386612},{"x":87,"y":152,"length":175.13708916160505},{"x":59,"y":151,"length":162.1172415260018},{"x":30,"y":142,"length":145.13442045221387},{"x":8,"y":125,"length":125.25573839150046},{"x":-6,"y":106,"length":106.16967551989597},{"x":-17,"y":81,"length":82.76472678623425},{"x":-20,"y":55,"length":58.52349955359813},{"x":-14,"y":27,"length":30.4138126514911}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":735,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-234},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"height":17.05,"x":1869,"id":-1,"active":true,"safeId":-1,"y":-555,"rotation":-15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":1793,"id":-1,"active":true,"safeId":-1,"y":-534,"rotation":-15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":1721,"id":-1,"active":true,"safeId":-1,"y":-536,"rotation":15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":2104,"id":-1,"active":true,"safeId":-1,"y":-616,"rotation":-15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":1490,"id":-1,"active":true,"safeId":-1,"y":-598,"rotation":15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":1644,"id":-1,"active":true,"safeId":-1,"y":-557,"rotation":15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":2027,"id":-1,"active":true,"safeId":-1,"y":-597,"rotation":-15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":1567,"id":-1,"active":true,"safeId":-1,"y":-578,"rotation":15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":1949,"id":-1,"active":true,"safeId":-1,"y":-576,"rotation":-15,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3203,"id":-1,"active":true,"safeId":-1,"y":-106,"rotation":27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3273,"id":-1,"active":true,"safeId":-1,"y":-69,"rotation":27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3132,"id":-1,"active":true,"safeId":-1,"y":-141,"rotation":27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3345,"id":-1,"active":true,"safeId":-1,"y":-32,"rotation":27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3416,"id":-1,"active":true,"safeId":-1,"y":-30,"rotation":-27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3486,"id":-1,"active":true,"safeId":-1,"y":-67,"rotation":-27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3557,"id":-1,"active":true,"safeId":-1,"y":-102,"rotation":-27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":3629,"id":-1,"active":true,"safeId":-1,"y":-138,"rotation":-27,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":1419,"id":-1,"active":true,"safeId":-1,"y":-616,"rotation":15,"width":85.95},"className":"PlankBone"},{"params":{"height":95.5,"x":1470,"y":344,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":79.6,"x":1540,"y":354,"rotation":0,"scaleX":-1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":128.35,"x":1506,"y":328,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":90.05,"x":1510,"y":240,"rotation":0,"width":102},"className":"Sign21"}],[{"params":{"height":18,"x":2781,"y":-187,"rotation":41.00000000000007,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2730,"y":-224,"rotation":31.00000000000007,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2673,"y":-250,"rotation":18.000000000000078,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2612,"y":-263,"rotation":6.00000000000008,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2549,"y":-265,"rotation":-2.9999999999999205,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2488,"y":-256,"rotation":-12.999999999999918,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2430,"y":-236,"rotation":-25.99999999999992,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2378,"y":-204,"rotation":-37.999999999999915,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":2339,"y":-167,"rotation":-47.99999999999992,"safeId":-1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3654,"id":1,"count":12,"radius":64,"y":359,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3654,"id":1,"count":12,"radius":64,"y":309,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3654,"id":1,"count":12,"radius":64,"y":259,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3604,"id":2,"count":12,"radius":64,"y":359,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3554,"id":3,"count":12,"radius":64,"y":359,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3504,"id":4,"count":12,"radius":64,"y":359,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3454,"id":5,"count":12,"radius":64,"y":359,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":3604,"id":3,"count":12,"radius":64,"y":309,"width":53.2},"className":"Tnt1"}],null,[{"params":{"height":32,"x":2570,"y":250,"rotation":0,"width":64},"className":"PlayerWP"}],[{"params":{"height":17,"x":2140,"id":-1,"rotation":-15,"safeId":-1,"graphic":0,"y":-628,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1451,"id":-1,"rotation":15,"safeId":-1,"graphic":0,"y":-607,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1758,"id":-1,"rotation":-51,"safeId":-1,"graphic":0,"y":-525,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1909,"id":-1,"rotation":-15,"safeId":-1,"graphic":0,"y":-566,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1528,"id":-1,"rotation":15,"safeId":-1,"graphic":0,"y":-588,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1831,"id":-1,"rotation":-15,"safeId":-1,"graphic":0,"y":-545,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1684,"id":-1,"rotation":15,"safeId":-1,"graphic":0,"y":-545,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1987,"id":-1,"rotation":-15,"safeId":-1,"graphic":0,"y":-586,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1607,"id":-1,"rotation":15,"safeId":-1,"graphic":0,"y":-566,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2063,"id":-1,"rotation":-15,"safeId":-1,"graphic":0,"y":-606,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3239,"id":-1,"rotation":27,"safeId":-1,"graphic":0,"y":-87,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3309,"id":-1,"rotation":27,"safeId":-1,"graphic":0,"y":-52,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3167,"id":-1,"rotation":27,"safeId":-1,"graphic":0,"y":-124,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3097,"id":-1,"rotation":27,"safeId":-1,"graphic":0,"y":-160,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3381,"id":-1,"rotation":27,"safeId":-1,"graphic":0,"y":-14,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3450,"id":-1,"rotation":-27,"safeId":-1,"graphic":0,"y":-49,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3522,"id":-1,"rotation":-27,"safeId":-1,"graphic":0,"y":-85,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3592,"id":-1,"rotation":-27,"safeId":-1,"graphic":0,"y":-121,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3665,"id":-1,"rotation":-27,"safeId":-1,"graphic":0,"y":-157,"width":17},"className":"PivotJointE"},{"params":{"cycle":0,"accelDist":0,"vertices":[{"x":0,"y":0,"length":0},{"x":128,"y":0,"length":128}],"stopOnEnd":true,"safeId":-1,"speed":1000,"startTime":"0","rotation":0,"body":false,"height":13,"x":3700,"sideWait":0,"id":1,"active":0,"position":0,"snapToGrid":true,"y":-160,"width":141},"className":"frg.game.editor.objects::MoverPather"},{"params":{"height":17,"x":1380,"id":-1,"rotation":15,"safeId":-1,"graphic":0,"y":-624,"width":17},"className":"PivotJointE"},{"params":{"height":87,"hint":-1,"id":1,"rotation":0,"safeId":-1,"x":3630,"off":false,"id_off":-1,"y":-100,"width":331,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":3695,"id":-1,"rotation":-27,"safeId":-1,"graphic":0,"y":-117,"width":17},"className":"PivotJointE"},{"params":{"height":491,"hint":-1,"id":2,"rotation":0,"safeId":-1,"x":3440,"off":false,"id_off":-1,"y":-170,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":831,"hint":-1,"id":3,"rotation":0,"safeId":-1,"x":3390,"off":false,"id_off":-1,"y":-170,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1014,"hint":-1,"id":4,"rotation":0,"safeId":-1,"x":3340,"off":false,"id_off":-1,"y":-170,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1052,"hint":-1,"id":5,"rotation":0,"safeId":-1,"x":3290,"off":false,"id_off":-1,"y":-170,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":2221,"id":5,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-190,"width":17},"className":"MotorJointE"},{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":1511,"id":5,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-190,"width":17},"className":"MotorJointE"},{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":810,"id":5,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-175,"width":17},"className":"MotorJointE"},{"params":{"height":64,"hint":-1,"id":5,"rotation":0,"safeId":-1,"x":2580,"off":false,"id_off":-1,"y":350,"width":407,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map13.json b/assets/levels/map13.json new file mode 100644 index 0000000..fdfcf6f --- /dev/null +++ b/assets/levels/map13.json @@ -0,0 +1 @@ +{"layers":[[{"className":"FinishZone","params":{"rotation":0,"x":6170,"height":1622,"y":690,"width":976}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":-10,"vertices":[{"y":-800,"x":-1406},{"y":-1194,"x":-162},{"y":-1252,"x":3084},{"y":-1875,"x":6155},{"y":-624,"x":3701},{"y":-484,"x":3543},{"y":-310,"x":3435},{"y":-115,"x":3352},{"y":72,"x":3232},{"y":190,"x":3149},{"y":303,"x":3042},{"y":343,"x":2950},{"y":355,"x":2879},{"y":382,"x":2771},{"y":412,"x":2687},{"y":426,"x":2625},{"y":420,"x":2551},{"y":390,"x":2480},{"y":135,"x":2480},{"y":31,"x":2490},{"y":-67,"x":2492},{"y":-130,"x":2492},{"y":-202,"x":2480},{"y":-251,"x":2440},{"y":-278,"x":2382},{"y":-292,"x":2267},{"y":-298,"x":2164},{"y":-297,"x":2062},{"y":-288,"x":1954},{"y":-278,"x":1861},{"y":-258,"x":1789},{"y":-229,"x":1726},{"y":-193,"x":1683},{"y":-155,"x":1651},{"y":-121,"x":1602},{"y":-90,"x":1530},{"y":-46,"x":1448},{"y":-25,"x":1370},{"y":-5,"x":1315},{"y":25,"x":1250},{"y":35,"x":1220},{"y":25,"x":1185},{"y":1,"x":1161},{"y":0,"x":1218},{"y":-12,"x":1272},{"y":-39,"x":1318},{"y":-65,"x":1350},{"y":-92,"x":1373},{"y":-120,"x":1393},{"y":-157,"x":1411},{"y":-199,"x":1421},{"y":-231,"x":1424},{"y":-264,"x":1423},{"y":-303,"x":1416},{"y":-337,"x":1405},{"y":-366,"x":1389},{"y":-400,"x":1364},{"y":-425,"x":1339},{"y":-448,"x":1308},{"y":-466,"x":1276},{"y":-479,"x":1233},{"y":-485,"x":1188},{"y":-482,"x":1141},{"y":-470,"x":1095},{"y":-452,"x":1059},{"y":-428,"x":1025},{"y":-401,"x":995},{"y":-369,"x":971},{"y":-335,"x":954},{"y":-300,"x":942},{"y":-265,"x":935},{"y":-225,"x":935},{"y":-180,"x":940},{"y":-180,"x":365},{"y":-125,"x":285},{"y":0,"x":285},{"y":0,"x":905},{"y":40,"x":925},{"y":85,"x":915},{"y":135,"x":905},{"y":215,"x":880},{"y":240,"x":845},{"y":255,"x":805},{"y":250,"x":755},{"y":240,"x":710},{"y":240,"x":665},{"y":250,"x":620},{"y":265,"x":580},{"y":285,"x":540},{"y":315,"x":510},{"y":348,"x":482},{"y":390,"x":460},{"y":440,"x":445},{"y":485,"x":445},{"y":530,"x":450},{"y":575,"x":460},{"y":607,"x":477},{"y":640,"x":500},{"y":670,"x":530},{"y":695,"x":560},{"y":710,"x":600},{"y":725,"x":640},{"y":730,"x":690},{"y":725,"x":735},{"y":715,"x":775},{"y":690,"x":820},{"y":655,"x":860},{"y":605,"x":900},{"y":562,"x":927},{"y":545,"x":960},{"y":575,"x":970},{"y":620,"x":986},{"y":658,"x":1012},{"y":686,"x":1040},{"y":720,"x":1078},{"y":745,"x":1127},{"y":765,"x":1181},{"y":769,"x":1232},{"y":767,"x":1291},{"y":756,"x":1337},{"y":732,"x":1385},{"y":698,"x":1428},{"y":659,"x":1464},{"y":622,"x":1490},{"y":565,"x":1511},{"y":508,"x":1521},{"y":455,"x":1519},{"y":405,"x":1509},{"y":366,"x":1492},{"y":326,"x":1470},{"y":294,"x":1443},{"y":267,"x":1411},{"y":240,"x":1374},{"y":218,"x":1320},{"y":210,"x":1281},{"y":172,"x":1376},{"y":150,"x":1443},{"y":132,"x":1533},{"y":130,"x":2095},{"y":505,"x":2095},{"y":535,"x":2098},{"y":566,"x":2112},{"y":595,"x":2154},{"y":607,"x":2206},{"y":607,"x":2641},{"y":617,"x":2704},{"y":1272,"x":3946},{"y":1308,"x":4042},{"y":1320,"x":4099},{"y":1327,"x":4159},{"y":1329,"x":4225},{"y":1326,"x":4281},{"y":1313,"x":4354},{"y":1290,"x":4419},{"y":1263,"x":4465},{"y":1222,"x":4505},{"y":1553,"x":4843},{"y":1629,"x":4928},{"y":1659,"x":4969},{"y":1678,"x":5010},{"y":1692,"x":5064},{"y":1700,"x":5118},{"y":1700,"x":5171},{"y":1692,"x":5223},{"y":1673,"x":5281},{"y":1653,"x":5319},{"y":1628,"x":5356},{"y":1596,"x":5392},{"y":1561,"x":5425},{"y":1523,"x":5451},{"y":1481,"x":5472},{"y":1441,"x":5487},{"y":1400,"x":5497},{"y":1346,"x":5501},{"y":1297,"x":5500},{"y":1250,"x":5490},{"y":1187,"x":5468},{"y":1155,"x":5435},{"y":1135,"x":5405},{"y":1105,"x":5425},{"y":1080,"x":5470},{"y":1079,"x":6520},{"y":1128,"x":6994},{"y":1140,"x":7697},{"y":3171,"x":8763},{"y":2577,"x":5626},{"y":2077,"x":888},{"y":2066,"x":145},{"y":1895,"x":-1265}],"y":390,"isStatic":true,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":2,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":-1}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-90,"physic":false,"y":1280,"vertices":[{"y":-300,"x":40},{"y":-155,"x":720},{"y":-95,"x":1555},{"y":-305,"x":2075},{"y":-235,"x":2505},{"y":-220,"x":2725},{"y":450,"x":4115},{"y":535,"x":4630},{"y":815,"x":5100},{"y":815,"x":5480},{"y":715,"x":7650}],"snapToGrid":true,"shape":false,"cameraOffsetY":80,"lineId":-1,"textureMode":true,"straightSides":true,"direction":90,"originOffsetRatio":0,"stretchTexture":false,"directed":false,"repeatTexture":true,"width":7623,"rotation":0,"thick":128,"height":1133,"textureOffset":0,"camera":true,"wireframe":false,"smoothing":true,"isRoad":false,"line":false}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":950,"vertices":[{"y":0,"x":0},{"y":58,"x":26},{"y":98,"x":57},{"y":137,"x":102},{"y":167,"x":145},{"y":192,"x":198},{"y":207,"x":261},{"y":206,"x":309},{"y":191,"x":363},{"y":168,"x":410},{"y":132,"x":461},{"y":89,"x":497},{"y":44,"x":526},{"y":-6,"x":546},{"y":-49,"x":554},{"y":-99,"x":556},{"y":-153,"x":545},{"y":-206,"x":526},{"y":-252,"x":494},{"y":-295,"x":447},{"y":-318,"x":416},{"y":-338,"x":374}],"y":950,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":606,"physic":true,"textureOffset":0,"shapeH":64,"width":617.35,"snapToGrid":false,"action":0,"wireframe":false,"type":5,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}}],[{"className":"SignPillar","params":{"x":1860,"y":460,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"SignPillar","params":{"x":2430,"y":940,"scaleX":1,"width":9.3,"rotation":0,"scaleY":0.9065056486170627,"height":116.35}},{"className":"Dec15","params":{"x":600,"y":270,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2}},{"className":"Dec29","params":{"rotation":0,"x":1830,"height":82.25,"y":500,"width":63.15}},{"className":"Dec13","params":{"x":1600,"y":410,"scaleX":1,"width":171.75,"rotation":12,"scaleY":1,"height":213.45}},{"className":"Dec14","params":{"x":1966,"y":410,"scaleX":-1,"width":165.85,"rotation":0,"scaleY":1,"height":244.8}},{"className":"Dec14","params":{"x":2997,"y":1060,"scaleX":-1,"width":165.85,"rotation":9,"scaleY":1,"height":244.8}},{"className":"Dec15","params":{"x":3350,"y":1220,"scaleX":1,"width":197,"rotation":30,"scaleY":1,"height":234.2}},{"className":"Dec13","params":{"x":3590,"y":1350,"scaleX":1,"width":171.75,"rotation":39,"scaleY":1,"height":213.45}},{"className":"Dec14","params":{"x":5087,"y":1980,"scaleX":-1,"width":165.85,"rotation":0,"scaleY":1,"height":244.8}}],[{"className":"GlassCrashed1","params":{"x":1095,"ttl":0.3,"y":1093,"safeId":1,"width":66,"rotation":31,"height":18}},{"className":"GlassCrashed1","params":{"x":1476,"ttl":0.3,"y":929,"safeId":1,"width":66,"rotation":-78,"height":18}},{"className":"GlassCrashed1","params":{"x":1150,"ttl":0.3,"y":1119,"safeId":1,"width":66,"rotation":18.000000000000057,"height":18}},{"className":"GlassCrashed1","params":{"x":1048,"ttl":0.3,"y":1058,"safeId":1,"width":66,"rotation":44,"height":18}},{"className":"GlassCrashed1","params":{"x":1458,"ttl":0.3,"y":982,"safeId":1,"width":66,"rotation":-65,"height":18}},{"className":"GlassCrashed1","params":{"x":1426,"ttl":0.3,"y":1032,"safeId":1,"width":66,"rotation":-51.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":1383,"ttl":0.3,"y":1076,"safeId":1,"width":66,"rotation":-38.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":1482,"ttl":0.3,"y":871,"safeId":1,"width":66,"rotation":-91,"height":18}},{"className":"GlassCrashed1","params":{"x":1273,"ttl":0.3,"y":1128,"safeId":1,"width":66,"rotation":-11.999999999999943,"height":18}},{"className":"GlassCrashed1","params":{"x":1449,"ttl":0.3,"y":754,"safeId":1,"width":66,"rotation":-119,"height":18}},{"className":"GlassCrashed1","params":{"x":1310,"ttl":0.3,"y":637,"safeId":1,"width":66,"rotation":-161.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":1212,"ttl":0.3,"y":1132,"safeId":1,"width":66,"rotation":3.000000000000057,"height":18}},{"className":"GlassCrashed1","params":{"x":1472,"ttl":0.3,"y":808,"safeId":1,"width":66,"rotation":-106,"height":18}},{"className":"GlassCrashed1","params":{"x":1251,"ttl":0.3,"y":625,"safeId":1,"width":66,"rotation":-175.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":1365,"ttl":0.3,"y":663,"safeId":1,"width":66,"rotation":-146.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":1009,"ttl":0.3,"y":1009,"safeId":1,"width":66,"rotation":59,"height":18}},{"className":"GlassCrashed1","params":{"x":982,"ttl":0.3,"y":954,"safeId":1,"width":66,"rotation":68,"height":18}},{"className":"GlassCrashed1","params":{"x":1331,"ttl":0.3,"y":1108,"safeId":1,"width":66,"rotation":-25.999999999999943,"height":18}},{"className":"GlassCrashed1","params":{"x":1413,"ttl":0.3,"y":705,"safeId":1,"width":66,"rotation":-133.99999999999991,"height":18}},{"className":"GlassCrashed0","params":{"x":959,"ttl":0.5,"y":398,"safeId":-1,"width":132,"rotation":0,"height":18}},{"className":"GlassCrashed0","params":{"x":1089,"ttl":0.5,"y":398,"safeId":-1,"width":132,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2117,"ttl":0.5,"y":540,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2181,"ttl":0.5,"y":540,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2309,"ttl":0.5,"y":540,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2245,"ttl":0.5,"y":540,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2373,"ttl":0.5,"y":540,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2437,"ttl":0.5,"y":540,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2437,"ttl":0.5,"y":587,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2309,"ttl":0.5,"y":587,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2373,"ttl":0.5,"y":587,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2117,"ttl":0.5,"y":587,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2181,"ttl":0.5,"y":587,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2245,"ttl":0.5,"y":587,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2437,"ttl":0.5,"y":634,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2309,"ttl":0.5,"y":634,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2373,"ttl":0.5,"y":634,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2117,"ttl":0.5,"y":634,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2181,"ttl":0.5,"y":634,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2245,"ttl":0.5,"y":634,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2437,"ttl":0.5,"y":680,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2309,"ttl":0.5,"y":680,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2373,"ttl":0.5,"y":680,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2117,"ttl":0.5,"y":680,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2181,"ttl":0.5,"y":680,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2245,"ttl":0.5,"y":680,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2437,"ttl":0.5,"y":727,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2309,"ttl":0.5,"y":727,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2373,"ttl":0.5,"y":727,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2117,"ttl":0.5,"y":727,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2181,"ttl":0.5,"y":727,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":2245,"ttl":0.5,"y":727,"safeId":1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed1","params":{"x":4508,"ttl":0.3,"y":1022,"safeId":2,"width":66,"rotation":-177.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":4448,"ttl":0.3,"y":1026,"safeId":2,"width":66,"rotation":169.00000000000003,"height":18}},{"className":"GlassCrashed1","params":{"x":4395,"ttl":0.3,"y":1042,"safeId":2,"width":66,"rotation":155.99999999999997,"height":18}},{"className":"GlassCrashed1","params":{"x":4344,"ttl":0.3,"y":1072,"safeId":2,"width":66,"rotation":143,"height":18}},{"className":"GlassCrashed1","params":{"x":4299,"ttl":0.3,"y":1117,"safeId":2,"width":66,"rotation":128,"height":18}},{"className":"GlassCrashed1","params":{"x":4269,"ttl":0.3,"y":1167,"safeId":2,"width":66,"rotation":115,"height":18}},{"className":"GlassCrashed1","params":{"x":4245,"ttl":0.3,"y":1288,"safeId":2,"width":66,"rotation":87.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":4256,"ttl":0.3,"y":1348,"safeId":2,"width":66,"rotation":72.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":4281,"ttl":0.3,"y":1403,"safeId":2,"width":66,"rotation":58.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":4320,"ttl":0.3,"y":1447,"safeId":2,"width":66,"rotation":39.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":4250,"ttl":0.3,"y":1225,"safeId":2,"width":66,"rotation":100.00000000000009,"height":18}},{"className":"GlassCrashed1","params":{"x":4705,"ttl":0.3,"y":1427,"safeId":2,"width":66,"rotation":-57.99999999999999,"height":18}},{"className":"GlassCrashed1","params":{"x":4734,"ttl":0.3,"y":1373,"safeId":2,"width":66,"rotation":-67,"height":18}},{"className":"GlassCrashed1","params":{"x":4751,"ttl":0.3,"y":1313,"safeId":2,"width":66,"rotation":-82,"height":18}},{"className":"GlassCrashed1","params":{"x":4752,"ttl":0.3,"y":1254,"safeId":2,"width":66,"rotation":-95,"height":18}},{"className":"GlassCrashed1","params":{"x":4740,"ttl":0.3,"y":1194,"safeId":2,"width":66,"rotation":-107.99999999999996,"height":18}},{"className":"GlassCrashed1","params":{"x":4714,"ttl":0.3,"y":1137,"safeId":2,"width":66,"rotation":-122.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":4568,"ttl":0.3,"y":1031,"safeId":2,"width":66,"rotation":-164.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":4675,"ttl":0.3,"y":1090,"safeId":2,"width":66,"rotation":-137.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":4625,"ttl":0.3,"y":1054,"safeId":2,"width":66,"rotation":-151.99999999999994,"height":18}},{"className":"BoostE","params":{"x":5410,"y":1600,"safeId":2,"width":100,"rotation":0,"height":99,"time":2,"force":4000}}],null,[{"className":"PlayerWP","params":{"rotation":0,"x":390,"height":32,"y":300,"width":64}},{"className":"SafePointE","params":{"x":1860,"id":1,"y":380,"width":128,"rotation":0,"height":960}},{"className":"SafePointE","params":{"x":2430,"id":2,"y":880,"width":128,"rotation":0,"height":303}}]],"settings":{"theme":3,"countdown":0,"gravityY":500,"prizes":"28,34,41"}} \ No newline at end of file diff --git a/assets/levels/map14.json b/assets/levels/map14.json new file mode 100644 index 0000000..452c841 --- /dev/null +++ b/assets/levels/map14.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"25,33,42","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":0,"vertices":[{"x":-15,"y":-225,"length":225.49944567559362},{"x":20,"y":-245,"length":245.81497106563708},{"x":55,"y":-255,"length":260.86394921491166},{"x":90,"y":-245,"length":261.00766272276377},{"x":125,"y":-225,"length":257.390753524675},{"x":120,"y":320,"length":341.76014981270123},{"x":85,"y":340,"length":350.46397817750113},{"x":50,"y":350,"length":353.5533905932738},{"x":15,"y":340,"length":340.3307215048327},{"x":-25,"y":320,"length":320.97507691408066}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":30,"plr":false,"line":true,"x":1493,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":408},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":-15,"y":-225,"length":225.49944567559362},{"x":25,"y":-250,"length":251.24689052802225},{"x":55,"y":-255,"length":260.86394921491166},{"x":95,"y":-250,"length":267.44158240632663},{"x":125,"y":-225,"length":257.390753524675},{"x":120,"y":320,"length":341.76014981270123},{"x":90,"y":345,"length":356.5459297201414},{"x":50,"y":350,"length":353.5533905932738},{"x":10,"y":340,"length":340.14702703389895},{"x":-25,"y":320,"length":320.97507691408066}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":168,"plr":false,"line":true,"x":2242.45,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":507.5},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":-15,"y":-225,"length":225.49944567559362},{"x":20,"y":-245,"length":245.81497106563708},{"x":55,"y":-255,"length":260.86394921491166},{"x":90,"y":-245,"length":261.00766272276377},{"x":125,"y":-225,"length":257.390753524675},{"x":120,"y":320,"length":341.76014981270123},{"x":85,"y":345,"length":355.31676008879737},{"x":50,"y":350,"length":353.5533905932738},{"x":5,"y":345,"length":345.03622998172233},{"x":-25,"y":320,"length":320.97507691408066}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":21,"plr":false,"line":true,"x":2840.05,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":408.4},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":-15,"y":-225,"length":225.49944567559362},{"x":25,"y":-250,"length":251.24689052802225},{"x":55,"y":-255,"length":260.86394921491166},{"x":95,"y":-250,"length":267.44158240632663},{"x":125,"y":-225,"length":257.390753524675},{"x":120,"y":320,"length":341.76014981270123},{"x":90,"y":345,"length":356.5459297201414},{"x":50,"y":350,"length":353.5533905932738},{"x":10,"y":340,"length":340.14702703389895},{"x":-25,"y":320,"length":320.97507691408066}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":111,"plr":false,"line":true,"x":3595.6,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":451.5},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":1032,"x":6070,"directed":false,"isPillar":false,"y":420,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":70,"y":-10,"length":70.71067811865476},{"x":131,"y":-29,"length":134.17153200288055},{"x":180,"y":-56,"length":188.50994668717087},{"x":230,"y":-93,"length":248.09070921741508},{"x":268,"y":-132,"length":298.74403759740545},{"x":300,"y":-172,"length":345.80919594481577},{"x":327,"y":-220,"length":394.11800263372896},{"x":342,"y":-259,"length":429.00466197933093},{"x":354,"y":-311,"length":471.2080220030215},{"x":357,"y":-354,"length":502.7573967630909},{"x":374,"y":-375,"length":529.623451142413},{"x":446,"y":-378,"length":584.6366392897387},{"x":553,"y":-391,"length":677.2665649506108},{"x":642,"y":-431,"length":773.2561024654121},{"x":712,"y":-487,"length":862.6198467459463},{"x":768,"y":-548,"length":943.46595063097},{"x":801,"y":-612,"length":1008.0401777707077},{"x":825,"y":-691,"length":1076.1533347994607},{"x":830,"y":-773,"length":1134.208534617863},{"x":823,"y":-844,"length":1178.8405320483344},{"x":801,"y":-916,"length":1216.8225014356037},{"x":762,"y":-980,"length":1241.3879329202455},{"x":738,"y":-1016,"length":1255.746789762968},{"x":800,"y":-1017,"length":1293.943198135065},{"x":861,"y":-1017,"length":1332.520168702898},{"x":943,"y":-1018,"length":1387.6501720534611},{"x":1011,"y":-1019,"length":1435.4379122762502}],"rotation":0,"width":1024},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":0,"vertices":[{"x":-35,"y":-102,"length":107.83784122468327},{"x":-68,"y":-149,"length":163.783393541592},{"x":-113,"y":-195,"length":225.37524265100637},{"x":-161,"y":-228,"length":279.1146717748818},{"x":-226,"y":-256,"length":341.4849923495907},{"x":-287,"y":-266,"length":391.3118960624632},{"x":-353,"y":-266,"length":442.0011312202719},{"x":-415,"y":-253,"length":486.0390930779128},{"x":-469,"y":-230,"length":522.3609862920468},{"x":-514,"y":-199,"length":551.1778297428154},{"x":-549,"y":-166,"length":573.5477312308018},{"x":-578,"y":-131,"length":592.6592612960671},{"x":-610,"y":-78,"length":614.9666657632754},{"x":-623,"y":-37,"length":624.0977487541514},{"x":-630,"y":0,"length":630},{"x":-634,"y":46,"length":635.6665792693525},{"x":-630,"y":99,"length":637.7311345700475},{"x":-618,"y":153,"length":636.6576788196306},{"x":-595,"y":204,"length":629},{"x":-558,"y":255,"length":613.5055011978295},{"x":-508,"y":303,"length":591.5006339810634},{"x":-460,"y":337,"length":570.2359160908755},{"x":-456,"y":368,"length":585.9692824713596},{"x":-475,"y":393,"length":616.5014193008805},{"x":-546,"y":388,"length":669.8208715768717},{"x":-604,"y":365,"length":705.7201995125264},{"x":-942,"y":19,"length":942.1915941038744},{"x":-973,"y":-4,"length":973.0082219590953},{"x":-1020,"y":45,"length":1020.9921645144981},{"x":-1062,"y":18,"length":1062.152531419099},{"x":-1035,"y":-56,"length":1036.5138686964106},{"x":-1063,"y":-96,"length":1067.3260982473912},{"x":-1132,"y":-100,"length":1136.4083773010475},{"x":-1141,"y":-149,"length":1150.6876205121876},{"x":-1073,"y":-179,"length":1087.8281114220206},{"x":-1065,"y":-227,"length":1088.9233214510562},{"x":-1108,"y":-274,"length":1141.3763621172466},{"x":-1078,"y":-319,"length":1124.2086105345395},{"x":-1015,"y":-292,"length":1056.167126926416},{"x":-969,"y":-317,"length":1019.5342073711897},{"x":-968,"y":-388,"length":1042.8652837255634},{"x":-914,"y":-398,"length":996.8951800465283},{"x":-888,"y":-330,"length":947.3352099441887},{"x":-839,"y":-323,"length":899.0272520897239},{"x":-789,"y":-366,"length":869.7568625771228},{"x":-601,"y":-492,"length":776.7013583096144},{"x":-214,"y":-548,"length":588.3026432033091},{"x":43,"y":-348,"length":350.64654568382673},{"x":94,"y":-202,"length":222.80035906613796},{"x":103,"y":-149,"length":181.13530854032848},{"x":75,"y":-96,"length":121.82364302548172},{"x":25,"y":-78,"length":81.9084855189009}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":9,"plr":false,"line":true,"x":6463,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-49},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"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}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":27,"plr":false,"line":true,"x":5205,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-288},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":229,"x":7670,"y":-1090,"rotation":0,"width":229},"className":"FinishZone"},{"params":{"height":1260,"x":8477,"directed":false,"isPillar":false,"y":180,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":16,"y":-13,"length":20.615528128088304},{"x":40,"y":-60,"length":72.11102550927978},{"x":71,"y":-129,"length":147.24808997063425},{"x":91,"y":-185,"length":206.16983290481662},{"x":116,"y":-285,"length":307.7027786679867},{"x":121,"y":-374,"length":393.086504474524},{"x":122,"y":-439,"length":455.6369168537598},{"x":118,"y":-489,"length":503.03578401541176},{"x":106,"y":-560,"length":569.9438568841672},{"x":90,"y":-615,"length":621.5504806530198},{"x":70,"y":-675,"length":678.6199230791858},{"x":44,"y":-732,"length":733.3212120210352},{"x":9,"y":-791,"length":791.0511993543781},{"x":-28,"y":-846,"length":846.4632301523794},{"x":-73,"y":-902,"length":904.949169843257},{"x":-122,"y":-948,"length":955.8179743026388},{"x":-170,"y":-988,"length":1002.5188277533745},{"x":-235,"y":-1035,"length":1061.3434882261256},{"x":-295,"y":-1069,"length":1108.957167793238},{"x":-348,"y":-1090,"length":1144.2045271716067},{"x":-422,"y":-1117,"length":1194.0573688060385},{"x":-490,"y":-1132,"length":1233.5007093633956},{"x":-555,"y":-1140,"length":1267.9215275402496},{"x":-625,"y":-1143,"length":1302.717928025864},{"x":-699,"y":-1142,"length":1338.9417463056411},{"x":-752,"y":-1133,"length":1359.8503594145939},{"x":-797,"y":-1121,"length":1375.4453824125478},{"x":-848,"y":-1117,"length":1402.423972983919},{"x":-895,"y":-1125,"length":1437.5847801086377},{"x":-935,"y":-1151,"length":1482.9113257373147},{"x":-964,"y":-1184,"length":1526.8110557629584},{"x":-983,"y":-1225,"length":1570.6412703096782},{"x":-991,"y":-1260,"length":1603.0224577341392}],"rotation":0,"width":1126},"className":"frg.game.editor.objects::BonesPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-945,"length":945.6479260274407},{"x":155,"y":-950,"length":962.561686334959},{"x":155,"y":5,"length":155.08062419270823}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":969.85,"x":1418,"isStatic":true,"repeatTexture":true,"id":-1,"width":136,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":475,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"height":1674,"x":8720,"directed":false,"isPillar":false,"y":370,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-18,"y":25,"length":30.805843601498726},{"x":50,"y":-75,"length":90.13878188659973},{"x":94,"y":-160,"length":185.5693940282179},{"x":124,"y":-240,"length":270.1407040784487},{"x":145,"y":-311,"length":343.14137028344453},{"x":160,"y":-376,"length":408.6269692519083},{"x":170,"y":-438,"length":469.834013242975},{"x":177,"y":-501,"length":531.3473440227211},{"x":182,"y":-570,"length":598.3510675180584},{"x":181,"y":-654,"length":678.5845562639928},{"x":173,"y":-734,"length":754.1120606382051},{"x":162,"y":-805,"length":821.1388433145761},{"x":145,"y":-873,"length":884.9598860965394},{"x":122,"y":-944,"length":951.8508286491113},{"x":100,"y":-1004,"length":1008.9677893768462},{"x":80,"y":-1056,"length":1059.0259675758664},{"x":50,"y":-1116,"length":1117.1195101688986},{"x":7,"y":-1178,"length":1178.0207977790544},{"x":-27,"y":-1222,"length":1222.2982451104149},{"x":-67,"y":-1274,"length":1275.760557471503},{"x":-109,"y":-1317,"length":1321.502932270678},{"x":-167,"y":-1372,"length":1382.126260513127},{"x":-218,"y":-1417,"length":1433.6711617382837},{"x":-271,"y":-1456,"length":1481.0054017457194},{"x":-338,"y":-1498,"length":1535.6588162739795},{"x":-399,"y":-1528,"length":1579.2355745739771},{"x":-468,"y":-1561,"length":1629.6456670086293},{"x":-527,"y":-1583,"length":1668.417813378891},{"x":-587,"y":-1603,"length":1707.0963651768461},{"x":-654,"y":-1618,"length":1745.1762088683195},{"x":-727,"y":-1630,"length":1784.7770168847424},{"x":-805,"y":-1636,"length":1823.326904315296},{"x":-886,"y":-1633,"length":1857.8710934830758},{"x":-963,"y":-1628,"length":1891.4949114390977},{"x":-1030,"y":-1623,"length":1922.2458219488994},{"x":-1100,"y":-1613,"length":1952.3752200845001},{"x":-1166,"y":-1589,"length":1970.90765892266},{"x":-1197,"y":-1562,"length":1967.9057396125456},{"x":-1220,"y":-1529,"length":1956.077963681407},{"x":-1231,"y":-1498,"length":1938.9081979299588},{"x":-1234,"y":-1462,"length":1913.164917094185}],"rotation":0,"width":1429},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":775,"x":8099,"directed":false,"isPillar":false,"y":163,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":29,"y":-60,"length":66.64082832618455},{"x":58,"y":-121,"length":134.18271125595876},{"x":83,"y":-181,"length":199.12307751739877},{"x":115,"y":-245,"length":270.64737205448716},{"x":137,"y":-315,"length":343.50254729768744},{"x":142,"y":-377,"length":402.85605369660266},{"x":135,"y":-444,"length":464.0700378175691},{"x":115,"y":-517,"length":529.6357238706619},{"x":79,"y":-595,"length":600.2216257350279},{"x":41,"y":-646,"length":647.2997759925458},{"x":-4,"y":-682,"length":682.0117301044022},{"x":-52,"y":-717,"length":718.8831615777351},{"x":-106,"y":-743,"length":750.523150875441},{"x":-174,"y":-758,"length":777.7146006087323},{"x":-241,"y":-759,"length":796.3428909709686},{"x":-306,"y":-760,"length":819.2899364693795},{"x":-371,"y":-761,"length":846.6179776026493},{"x":-450,"y":-762,"length":884.954236104896},{"x":-509,"y":-762,"length":916.365101910805}],"rotation":0,"width":664},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":122.1,"x":1514,"y":476,"rotation":0,"width":122.1},"className":"OvalTemplate"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":1481,"smoothing":true,"y":486,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":1450,"smoothing":true,"y":485,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"wireframe":false,"vertices":[{"x":-180,"y":-60,"length":189.73665961010275},{"x":405,"y":-20,"length":405.493526458808},{"x":1560,"y":305,"length":1589.5360958468355},{"x":3960,"y":290,"length":3970.6044879841656},{"x":5155,"y":70,"length":5155.475244824671},{"x":6120,"y":-50,"length":6120.204244957843},{"x":6365,"y":-140,"length":6366.53948389547},{"x":7040,"y":-680,"length":7072.76466454243},{"x":7410,"y":-195,"length":7412.565345411803},{"x":7875,"y":-70,"length":7875.311104965949},{"x":9320,"y":-85,"length":9320.387599236417}],"lineId":-1,"physic":false,"directed":false,"width":9513,"shape":false,"height":1062.5,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":80,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":-30,"smoothing":true,"y":480,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2149,"smoothing":true,"y":483,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":220,"y":-210,"length":304.138126514911}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":5320,"smoothing":true,"y":-130,"width":233,"height":223,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"height":122.1,"x":2182,"y":473,"rotation":0,"width":122.1},"className":"OvalTemplate"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-945,"length":945.6479260274407},{"x":155,"y":-950,"length":962.561686334959},{"x":155,"y":5,"length":155.08062419270823}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":969.85,"x":2779,"isStatic":true,"repeatTexture":true,"id":-1,"width":136,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":474,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-945,"length":945.6479260274407},{"x":155,"y":-950,"length":962.561686334959},{"x":155,"y":5,"length":155.08062419270823}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":969.85,"x":2087,"isStatic":true,"repeatTexture":true,"id":-1,"width":136,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":474,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2118,"smoothing":true,"y":482,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2840,"smoothing":true,"y":483,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"height":122.1,"x":2873,"y":473,"rotation":0,"width":122.1},"className":"OvalTemplate"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-1900,"length":1900.3223410779551}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":1918,"x":5427,"isStatic":true,"repeatTexture":true,"id":-1,"width":16,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-229,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2809,"smoothing":true,"y":482,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-1900,"length":1900.3223410779551}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":1918,"x":5327,"isStatic":true,"repeatTexture":true,"id":-1,"width":16,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-129,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":3500,"smoothing":true,"y":490,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-945,"length":945.6479260274407},{"x":155,"y":-950,"length":962.561686334959},{"x":155,"y":5,"length":155.08062419270823}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":969.85,"x":3439,"isStatic":true,"repeatTexture":true,"id":-1,"width":136,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":474,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":220,"y":-210,"length":304.138126514911}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":5360,"smoothing":true,"y":-90,"width":233,"height":223,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-1900,"length":1900.3223410779551}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":1918,"x":5377,"isStatic":true,"repeatTexture":true,"id":-1,"width":16,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-179,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":3469,"smoothing":true,"y":489,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":true,"vertices":[{"x":35,"y":5,"length":35.35533905932738},{"x":35,"y":-1900,"length":1900.3223410779551}],"originOffsetRatio":0,"density":"1","action":0,"physic":false,"shapeH":16,"rotation":0,"stretchTexture":false,"height":1918,"x":5477,"isStatic":true,"repeatTexture":true,"id":-1,"width":16,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-279,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":210,"y":-200,"length":290}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":5343,"smoothing":true,"y":-113,"width":223,"height":213,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"sf":true,"bg":true,"x":940,"vertices":[{"x":0,"y":0,"length":0},{"x":3525,"y":0,"length":3525},{"x":3535,"y":915,"length":3651.4996919074224},{"x":10,"y":915,"length":915.0546431771165}],"id":-1,"density":1.5,"viscosity":1.5,"y":480,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1200,"y":0,"length":1200},{"x":1200,"y":670,"length":1374.3725841270264},{"x":4470,"y":675,"length":4520.677493473738},{"x":4475,"y":20,"length":4475.044692514255},{"x":9510,"y":-20,"length":9510.021030470964}],"lineId":0,"physic":true,"directed":true,"width":9523,"shape":true,"height":759.05,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-220,"smoothing":true,"y":410,"direction":90,"textureOffset":0,"camera":false,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":95,"y":630,"length":637.1224372128171},{"x":-5,"y":630,"length":630.0198409574099}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-110,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-220},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":5268,"smoothing":true,"y":-63,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":5237,"smoothing":true,"y":-64,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":5537,"smoothing":true,"y":-344,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":5568,"smoothing":true,"y":-343,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"}],[{"params":{"height":17.05,"x":7136,"id":-1,"active":true,"safeId":1,"y":-601,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7216,"id":-1,"active":true,"safeId":1,"y":-601,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7536,"id":-1,"active":true,"safeId":1,"y":-601,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7296,"id":-1,"active":true,"safeId":1,"y":-601,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7376,"id":-1,"active":true,"safeId":1,"y":-601,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7456,"id":-1,"active":true,"safeId":1,"y":-601,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":128.35,"x":4760,"y":360,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":7800,"y":-662,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":870,"y":360,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":904,"y":343,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":907,"y":294,"rotation":-12,"width":110.7},"className":"Sign15"},{"params":{"height":79.6,"x":4730,"y":382,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"}],[{"params":{"height":99,"force":5000,"y":-60,"rotation":0,"safeId":1,"x":6420,"time":2,"width":100},"className":"BoostE"},{"params":{"height":99,"force":5000,"y":50,"rotation":0,"safeId":2,"x":8810,"time":4,"width":100},"className":"BoostE"},{"params":{"type":0,"x":8089,"id":-1,"active":true,"safeId":2,"height":72,"y":370,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8119,"id":-1,"active":true,"safeId":2,"height":72,"y":330,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8089,"id":-1,"active":true,"safeId":2,"height":72,"y":290,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8119,"id":-1,"active":true,"safeId":2,"height":72,"y":250,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8089,"id":-1,"active":true,"safeId":2,"height":48,"y":220,"rotation":0,"width":13.1},"className":"Removed1"},{"params":{"type":0,"x":8119,"id":-1,"active":true,"safeId":2,"height":72,"y":190,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8154,"id":-1,"active":true,"safeId":2,"height":72,"y":290,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8154,"id":-1,"active":true,"safeId":2,"height":72,"y":370,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8154,"id":-1,"active":true,"safeId":2,"height":48,"y":220,"rotation":0,"width":13.1},"className":"Removed1"},{"params":{"type":0,"x":8224,"id":-1,"active":true,"safeId":2,"height":72,"y":370,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8189,"id":-1,"active":true,"safeId":2,"height":72,"y":250,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8224,"id":-1,"active":true,"safeId":2,"height":72,"y":290,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8189,"id":-1,"active":true,"safeId":2,"height":72,"y":330,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8189,"id":-1,"active":true,"safeId":2,"height":72,"y":190,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8224,"id":-1,"active":true,"safeId":2,"height":48,"y":220,"rotation":0,"width":13.1},"className":"Removed1"},{"params":{"type":0,"x":8294,"id":-1,"active":true,"safeId":2,"height":72,"y":370,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8259,"id":-1,"active":true,"safeId":2,"height":72,"y":250,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8294,"id":-1,"active":true,"safeId":2,"height":72,"y":290,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8259,"id":-1,"active":true,"safeId":2,"height":72,"y":330,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8259,"id":-1,"active":true,"safeId":2,"height":72,"y":190,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8294,"id":-1,"active":true,"safeId":2,"height":48,"y":220,"rotation":0,"width":13.1},"className":"Removed1"},{"params":{"type":0,"x":8364,"id":-1,"active":true,"safeId":2,"height":72,"y":370,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8329,"id":-1,"active":true,"safeId":2,"height":72,"y":250,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8364,"id":-1,"active":true,"safeId":2,"height":72,"y":290,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8329,"id":-1,"active":true,"safeId":2,"height":72,"y":330,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8329,"id":-1,"active":true,"safeId":2,"height":72,"y":190,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8364,"id":-1,"active":true,"safeId":2,"height":48,"y":220,"rotation":0,"width":13.1},"className":"Removed1"},{"params":{"type":0,"x":8434,"id":-1,"active":true,"safeId":2,"height":72,"y":370,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8399,"id":-1,"active":true,"safeId":2,"height":72,"y":250,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8434,"id":-1,"active":true,"safeId":2,"height":72,"y":290,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8399,"id":-1,"active":true,"safeId":2,"height":72,"y":330,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8399,"id":-1,"active":true,"safeId":2,"height":72,"y":190,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8434,"id":-1,"active":true,"safeId":2,"height":48,"y":220,"rotation":0,"width":13.1},"className":"Removed1"},{"params":{"type":0,"x":8498,"id":-1,"active":true,"safeId":2,"height":72,"y":370,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8469,"id":-1,"active":true,"safeId":2,"height":72,"y":250,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8498,"id":-1,"active":true,"safeId":2,"height":72,"y":290,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8469,"id":-1,"active":true,"safeId":2,"height":72,"y":330,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8469,"id":-1,"active":true,"safeId":2,"height":72,"y":190,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":8498,"id":-1,"active":true,"safeId":2,"height":48,"y":220,"rotation":0,"width":13.1},"className":"Removed1"}],null,[{"params":{"height":32,"x":380,"y":330,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1708,"x":4760,"y":290,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":2456,"x":7800,"y":-730,"width":128,"id":2,"rotation":0},"className":"SafePointE"}],[{"params":{"safeId":-1,"rotation":30,"rate":40,"height":17,"x":1514,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":476,"width":17},"className":"MotorJointE"},{"params":{"safeId":-1,"rotation":-93,"rate":-40,"height":17,"x":2182.55,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":472.55,"width":17},"className":"MotorJointE"},{"params":{"safeId":-1,"rotation":21,"rate":40,"height":17,"x":2874.15,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":473.45,"width":17},"className":"MotorJointE"},{"params":{"height":977,"hint":-1,"id":1,"rotation":0,"safeId":-1,"x":600,"off":false,"id_off":-1,"y":258,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":-1,"rotation":-150,"rate":-40,"height":17,"x":3533.65,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":482.6,"width":17},"className":"MotorJointE"},{"params":{"safeId":1,"rotation":0,"rate":-14,"height":17,"x":5597,"id":2,"useWeld":false,"snd":false,"graphic":2,"time":6,"y":-350,"width":17},"className":"MotorJointE"},{"params":{"height":639,"hint":-1,"id":2,"rotation":90,"safeId":1,"x":6540,"off":false,"id_off":-1,"y":100,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":5300,"id":-1,"rotation":0,"safeId":1,"graphic":1,"y":-72,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7096,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-601,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7176,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-601,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7336,"id":4,"rotation":0,"safeId":1,"graphic":0,"y":-601,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7496,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-601,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7256,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-601,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7576,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-601,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7416,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-601,"width":17},"className":"PivotJointE"},{"params":{"height":64,"hint":-1,"id":4,"rotation":0,"safeId":1,"x":7350,"off":false,"id_off":-1,"y":-530,"width":348,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":5370,"id":2,"rotation":0,"safeId":1,"graphic":0,"y":90,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5760,"id":2,"rotation":0,"safeId":1,"graphic":0,"y":-30,"width":17},"className":"PivotJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map15.json b/assets/levels/map15.json new file mode 100644 index 0000000..8c62ce4 --- /dev/null +++ b/assets/levels/map15.json @@ -0,0 +1 @@ +{"settings":{"theme":3,"prizes":"24,31,39","countdown":0,"gravityY":500},"layers":[[{"params":{"height":1092,"x":4450,"y":-2360,"rotation":0,"width":443},"className":"FinishZone"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":35,"y":-24,"length":42.43819034784589},{"x":80,"y":-47,"length":92.78469701410896},{"x":137,"y":-61,"length":149.96666296213968},{"x":194,"y":-61,"length":203.364205306637},{"x":250,"y":-48,"length":254.566297847928},{"x":292,"y":-30,"length":293.53705047233814},{"x":335,"y":5,"length":335.0373113550191},{"x":364,"y":34,"length":365.5844635648512},{"x":397,"y":93,"length":407.74747086891904},{"x":409,"y":135,"length":430.70407474274026},{"x":416,"y":187,"length":456.0975772792484},{"x":411,"y":229,"length":470.4912326494512},{"x":397,"y":277,"length":484.08470333196857},{"x":366,"y":331,"length":493.4744167634225},{"x":335,"y":367,"length":496.9044173681695},{"x":298,"y":396,"length":495.600645681581},{"x":249,"y":420,"length":488.2632486681749},{"x":199,"y":432,"length":475.631159618459},{"x":140,"y":432,"length":454.1189271545506},{"x":86,"y":420,"length":428.7143571190496},{"x":35,"y":395,"length":396.547601177967},{"x":-4,"y":365,"length":365.0219171501898},{"x":-39,"y":323,"length":325.3459696999488},{"x":-69,"y":266,"length":274.8035662068453},{"x":-81,"y":208,"length":223.21514285549716},{"x":-78,"y":153,"length":171.73526137634053},{"x":-66,"y":99,"length":118.98319209031165},{"x":-35,"y":42,"length":54.67174773134658}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3557,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-664},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":5,"length":5},{"x":435,"y":5,"length":435.0287346831241},{"x":435,"y":100,"length":446.3462781294362},{"x":0,"y":100,"length":100}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5500,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-515},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":2,"vertices":[{"x":173,"y":11,"length":173.34935823359717},{"x":172,"y":103,"length":200.48191938426766},{"x":171,"y":161,"length":234.8659191964641},{"x":610,"y":163,"length":631.4024073441595},{"x":610,"y":10,"length":610.0819617067857},{"x":635,"y":5,"length":635.0196847342609},{"x":630,"y":-105,"length":638.6900656813131},{"x":640,"y":-130,"length":653.0696746902278},{"x":660,"y":-155,"length":677.9564882792995},{"x":1793,"y":-1150,"length":2130.1053964534244},{"x":1815,"y":-1158,"length":2152.948907893543},{"x":1844,"y":-1162,"length":2179.5825288343635},{"x":1883,"y":-1138,"length":2200.166584602175},{"x":1908,"y":-1131,"length":2218.022768142834},{"x":1931,"y":-1134,"length":2239.3563807487185},{"x":1945,"y":-1153,"length":2261.0692161010907},{"x":2048,"y":-1510,"length":2544.485016658577},{"x":2044,"y":-1543,"length":2561.0124950886125},{"x":2031,"y":-1562,"length":2562.1875419258445},{"x":1986,"y":-1583,"length":2539.7017541435844},{"x":1971,"y":-1609,"length":2544.350997798849},{"x":1968,"y":-1637,"length":2559.842377960018},{"x":2135,"y":-2193,"length":3060.6329410760773},{"x":2159,"y":-2231,"length":3104.6162403749677},{"x":2210,"y":-2279,"length":3174.5772946960988},{"x":2260,"y":-2315,"length":3235.2472857573034},{"x":2327,"y":-2349,"length":3306.467903972455},{"x":3362,"y":-2775,"length":4359.319786388697},{"x":3000,"y":365,"length":3022.1225984397124},{"x":-2461,"y":1125,"length":2705.9464148426887},{"x":-4900,"y":1440,"length":5107.210588961454},{"x":-5915,"y":1255,"length":6046.67263873281},{"x":-5580,"y":120,"length":5581.290173427646},{"x":-3550,"y":-1780,"length":3971.2592461333975},{"x":-1037,"y":-2880,"length":3061.0078405649338},{"x":-838,"y":-2850,"length":2970.647067559524},{"x":-688,"y":-2796,"length":2879.4027158422978},{"x":-551,"y":-2711,"length":2766.427660359114},{"x":-446,"y":-2610,"length":2647.8323209750274},{"x":-373,"y":-2518,"length":2545.4769690570765},{"x":-300,"y":-2401,"length":2419.669605545352},{"x":-261,"y":-2295,"length":2309.7934972633375},{"x":-230,"y":-2156,"length":2168.2333822723053},{"x":-216,"y":-1986,"length":1997.7116909103777},{"x":-233,"y":-1852,"length":1866.5993142610976},{"x":-270,"y":-1734,"length":1754.8948686459823},{"x":-328,"y":-1609,"length":1642.0916539584507},{"x":-405,"y":-1493,"length":1546.9563665469043},{"x":-508,"y":-1388,"length":1478.0419479838858},{"x":-610,"y":-1306,"length":1441.435395708042},{"x":-730,"y":-1246,"length":1444.0969496540044},{"x":-856,"y":-1201,"length":1474.8345669938712},{"x":-998,"y":-1178,"length":1543.9196870303845},{"x":-1117,"y":-1180,"length":1624.8350685531132},{"x":-1242,"y":-1193,"length":1722.1535936146927},{"x":-1334,"y":-1220,"length":1807.7488763652987},{"x":-1369,"y":-1256,"length":1857.8743229831236},{"x":-1365,"y":-1292,"length":1879.4916866003957},{"x":-1338,"y":-1305,"length":1869.0288922325412},{"x":-1296,"y":-1298,"length":1834.235535584239},{"x":-1216,"y":-1290,"length":1772.7819944934008},{"x":-1120,"y":-1298,"length":1714.410685920967},{"x":-1014,"y":-1329,"length":1671.656962417828},{"x":-942,"y":-1365,"length":1658.4899758515273},{"x":-873,"y":-1426,"length":1672.0062798925128},{"x":-810,"y":-1500,"length":1704.7287174210446},{"x":-772,"y":-1569,"length":1748.6409008141152},{"x":-746,"y":-1638,"length":1799.877773627976},{"x":-729,"y":-1740,"length":1886.5420748024678},{"x":-735,"y":-1849,"length":1989.730132455153},{"x":-749,"y":-1914,"length":2055.333792842418},{"x":-770,"y":-1972,"length":2116.9988190832796},{"x":-810,"y":-2037,"length":2192.137997480998},{"x":-867,"y":-2110,"length":2281.18149212201},{"x":-929,"y":-2165,"length":2355.9002525573956},{"x":-999,"y":-2202,"length":2418.016749321642},{"x":-1068,"y":-2230,"length":2472.55414500876},{"x":-1136,"y":-2242,"length":2513.376215372462},{"x":-1241,"y":-2244,"length":2564.2965897103245},{"x":-1355,"y":-2222,"length":2602.5581645757698},{"x":-1452,"y":-2185,"length":2623.4574515322333},{"x":-1538,"y":-2120,"length":2619.1303900340663},{"x":-1612,"y":-2034,"length":2595.32271596424},{"x":-1705,"y":-1860,"length":2523.2171923954543},{"x":-1750,"y":-1835,"length":2535.6902413346943},{"x":-1845,"y":-1827,"length":2596.527296217007},{"x":-1947,"y":-1822,"length":2666.550768314753},{"x":-2052,"y":-1797,"length":2727.6203914767907},{"x":-2137,"y":-1742,"length":2757.051504778248},{"x":-2204,"y":-1682,"length":2772.497069430372},{"x":-2273,"y":-1611,"length":2786.0096912968556},{"x":-2283,"y":-1536,"length":2751.6149803342764},{"x":-2253,"y":-1475,"length":2692.8858126552636},{"x":-2240,"y":-1408,"length":2645.7634059000816},{"x":-2241,"y":-1324,"length":2602.893966338237},{"x":-2256,"y":-1232,"length":2570.478554666426},{"x":-2289,"y":-1176,"length":2573.421263609983},{"x":-2344,"y":-1124,"length":2599.559962762929},{"x":-2410,"y":-1095,"length":2647.0974670381897},{"x":-2500,"y":-1072,"length":2720.1441138292653},{"x":-2613,"y":-1070,"length":2823.591507282879},{"x":-2718,"y":-1073,"length":2922.1315849906555},{"x":-2838,"y":-1088,"length":3039.405862993621},{"x":-2954,"y":-1101,"length":3152.509635195426},{"x":-3050,"y":-1104,"length":3243.657811792113},{"x":-3123,"y":-1074,"length":3302.5149507610104},{"x":-3176,"y":-1025,"length":3337.3044512000997},{"x":-3192,"y":-958,"length":3332.6607988212663},{"x":-3172,"y":-898,"length":3296.663161440671},{"x":-3092,"y":-829,"length":3201.2036798679337},{"x":-3009,"y":-771,"length":3106.2070117749718},{"x":-2941,"y":-729,"length":3030.0036303608613},{"x":-2856,"y":-692,"length":2938.6391408269237},{"x":-2786,"y":-667,"length":2864.731226485305},{"x":-2692,"y":-643,"length":2767.7270457904624},{"x":-2575,"y":-628,"length":2650.473353950196},{"x":-2460,"y":-627,"length":2538.647080631729},{"x":-2357,"y":-640,"length":2442.3449797274748},{"x":-2256,"y":-661,"length":2350.841764134711},{"x":-2157,"y":-694,"length":2265.896069990855},{"x":-2071,"y":-735,"length":2197.5591004566863},{"x":-1983,"y":-794,"length":2136.053604196299},{"x":-1927,"y":-835,"length":2100.1319006195777},{"x":-1853,"y":-900,"length":2060.0021844648613},{"x":-1781,"y":-976,"length":2030.8956152397395},{"x":-1740,"y":-1026,"length":2019.9693066975053},{"x":-1683,"y":-1041,"length":1978.9315298918252},{"x":-1612,"y":-1043,"length":1919.998177082468},{"x":-1509,"y":-1023,"length":1823.0770691333923},{"x":-1400,"y":-984,"length":1711.2147731947618},{"x":-1325,"y":-949,"length":1629.7932384201379},{"x":-1234,"y":-907,"length":1531.4715145898078},{"x":-1141,"y":-861,"length":1429.4061704078376},{"x":-1034,"y":-821,"length":1320.3018594245787},{"x":-916,"y":-789,"length":1208.9569884822206},{"x":-788,"y":-765,"length":1098.2572558376294},{"x":-671,"y":-752,"length":1007.8417534514037},{"x":-568,"y":-753,"length":943.2035835385699},{"x":-447,"y":-760,"length":881.708001551534},{"x":-357,"y":-771,"length":849.6411007007606},{"x":-245,"y":-790,"length":827.1184921158516},{"x":-134,"y":-823,"length":833.8375141476905},{"x":-27,"y":-861,"length":861.4232409216737},{"x":105,"y":-930,"length":935.9086493883898},{"x":203,"y":-994,"length":1014.5171265188183},{"x":275,"y":-1045,"length":1080.5785487413675},{"x":365,"y":-1125,"length":1182.7298930863294},{"x":445,"y":-1205,"length":1284.5427201926761},{"x":525,"y":-1270,"length":1374.236151467425},{"x":610,"y":-1300,"length":1436.0013927569848},{"x":745,"y":-1315,"length":1511.3735474726293},{"x":900,"y":-1330,"length":1605.8953888718904},{"x":975,"y":-1340,"length":1657.173798972214},{"x":1135,"y":-1350,"length":1763.724751768257},{"x":1185,"y":-1345,"length":1792.5540438156947},{"x":1225,"y":-1305,"length":1789.8742972622408},{"x":1235,"y":-1255,"length":1760.752679963884},{"x":1235,"y":-1220,"length":1735.979550570801},{"x":1180,"y":-1165,"length":1658.199324568672},{"x":580,"y":-645,"length":867.4243482863506},{"x":495,"y":-605,"length":781.6968721953542},{"x":382,"y":-582,"length":696.1666467161436},{"x":254,"y":-565,"length":619.468320416791},{"x":135,"y":-535,"length":551.7698795693726},{"x":5,"y":-474,"length":474.026370574465},{"x":-118,"y":-440,"length":455.548021617919},{"x":-232,"y":-396,"length":458.9553355175207},{"x":-360,"y":-371,"length":516.9535762522588},{"x":-463,"y":-354,"length":582.8250166216271},{"x":-577,"y":-354,"length":676.937958752499},{"x":-694,"y":-370,"length":786.4705970346254},{"x":-811,"y":-408,"length":907.8463526390354},{"x":-1217,"y":-694,"length":1400.9728762542122},{"x":-1371,"y":-754,"length":1564.6587487372447},{"x":-1577,"y":-771,"length":1755.383149058917},{"x":-1768,"y":-740,"length":1916.6178544509075},{"x":-1997,"y":-628,"length":2093.4165853933614},{"x":-2260,"y":-411,"length":2297.0679136673343},{"x":-2440,"y":-274,"length":2455.3362295213255},{"x":-2605,"y":-177,"length":2611.0063194102},{"x":-2675,"y":-165,"length":2680.083953908907},{"x":-2755,"y":-175,"length":2760.5524809356552},{"x":-2885,"y":-235,"length":2894.5552335376155},{"x":-2990,"y":-295,"length":3004.5174321344853},{"x":-3080,"y":-350,"length":3099.822575567834},{"x":-3170,"y":-410,"length":3196.40422975568},{"x":-3275,"y":-481,"length":3310.133834152329},{"x":-3375,"y":-541,"length":3418.0851364470136},{"x":-3518,"y":-575,"length":3564.680771121027},{"x":-3658,"y":-544,"length":3698.229306032821},{"x":-3756,"y":-484,"length":3787.0558485451465},{"x":-3795,"y":-440,"length":3820.422097098696},{"x":-3860,"y":-405,"length":3881.1886065997874},{"x":-3915,"y":-390,"length":3934.377333200261},{"x":-3935,"y":-345,"length":3950.094935568005},{"x":-3938,"y":-70,"length":3938.622094083158},{"x":-4035,"y":-20,"length":4035.049565990485},{"x":-4110,"y":25,"length":4110.076033359967},{"x":-4160,"y":95,"length":4161.084594189357},{"x":-4195,"y":175,"length":4198.648592106751},{"x":-4230,"y":250,"length":4237.381266773147},{"x":-4290,"y":310,"length":4301.185882986226},{"x":-4376,"y":337,"length":4388.957165432354},{"x":-4530,"y":363,"length":4544.520766813592},{"x":-4706,"y":357,"length":4719.5216918666665},{"x":-4824,"y":357,"length":4837.191850650541},{"x":-4946,"y":381,"length":4960.652880418061},{"x":-5088,"y":483,"length":5110.873995707583},{"x":-5163,"y":601,"length":5197.862060501414},{"x":-5211,"y":741,"length":5263.421130785566},{"x":-5215,"y":780,"length":5273.009102969575},{"x":-5170,"y":895,"length":5246.896701861016},{"x":-3890,"y":895,"length":3991.6318718038115},{"x":-3810,"y":894,"length":3913.4813146353467},{"x":-3755,"y":884,"length":3857.652265303341},{"x":-3706,"y":869,"length":3806.5203270178395},{"x":-3662,"y":842,"length":3757.553459366879},{"x":-3620,"y":816,"length":3710.829556851136},{"x":-3581,"y":780,"length":3664.963983451952},{"x":-3542,"y":739,"length":3618.2709959316203},{"x":-3510,"y":687,"length":3576.6002013084994},{"x":-3483,"y":640,"length":3541.311762610008},{"x":-3470,"y":593,"length":3520.305242447024},{"x":-3460,"y":533,"length":3500.812619949831},{"x":-3457,"y":467,"length":3488.4004930626875},{"x":-3467,"y":396,"length":3489.542233588813},{"x":-3474,"y":331,"length":3489.733084349002},{"x":-3481,"y":266,"length":3491.1483783992912},{"x":-3461,"y":196,"length":3466.5453985199733},{"x":-3430,"y":150,"length":3433.2783167113034},{"x":-3388,"y":92,"length":3389.2488843400097},{"x":-3333,"y":51,"length":3333.3901661821706},{"x":-3263,"y":32,"length":3263.156907045691},{"x":-3190,"y":22,"length":3190.0758611669407},{"x":-3094,"y":32,"length":3094.165477152119},{"x":-2938,"y":54,"length":2938.4962140523508},{"x":-2705,"y":71,"length":2705.9316325435866},{"x":-2568,"y":62,"length":2568.7483333327928},{"x":-2404,"y":33,"length":2404.226486835215},{"x":-2306,"y":8,"length":2306.0138768012653},{"x":-2213,"y":-36,"length":2213.2927958135137},{"x":-2144,"y":-87,"length":2145.7644325507868},{"x":-2093,"y":-132,"length":2097.158315435437},{"x":-2046,"y":-142,"length":2050.921743997074},{"x":-1995,"y":-137,"length":1999.698477271011},{"x":-1966,"y":-112,"length":1969.1876497682997},{"x":-1940,"y":-56,"length":1940.8080791258058},{"x":-1916,"y":5,"length":1916.0065239972437},{"x":-1874,"y":113,"length":1877.4037924751296},{"x":-1854,"y":164,"length":1861.2393720314428},{"x":-1762,"y":261,"length":1781.225701588656},{"x":-1625,"y":320,"length":1656.2080183358612},{"x":-1510,"y":300,"length":1539.5129099815954},{"x":-1420,"y":232,"length":1438.8273002692158},{"x":-1373,"y":182,"length":1385.010108266362},{"x":-1340,"y":120,"length":1345.362404707371},{"x":-1318,"y":81,"length":1320.4866527155812},{"x":-1301,"y":20,"length":1301.15371882034},{"x":-1269,"y":-102,"length":1273.0926910480634},{"x":-1238,"y":-144,"length":1246.3466612463806},{"x":-1175,"y":-163,"length":1186.2520811362144},{"x":-1091,"y":-147,"length":1100.8587556993857},{"x":-991,"y":-113,"length":997.4216761229926},{"x":-886,"y":-48,"length":887.2992730753249},{"x":-793,"y":-17,"length":793.1821984890987},{"x":-629,"y":11,"length":629.0961770667502},{"x":-413,"y":21,"length":413.533553656774},{"x":-276,"y":16,"length":276.4633791300396}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5328,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-522},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1420,"y":-5,"length":1420.0088027896165},{"x":1560,"y":-35,"length":1560.3925788082947},{"x":1680,"y":-135,"length":1685.4153790683174},{"x":2015,"y":-725,"length":2141.4597824848356},{"x":2095,"y":-790,"length":2239.00089325574},{"x":5865,"y":-835,"length":5924.1412879842765},{"x":8225,"y":-2850,"length":8704.775987927547}],"lineId":-1,"physic":false,"directed":false,"width":8252.3,"shape":false,"height":2906.35,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":80,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":100,"smoothing":true,"y":390,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-1,"y":10,"length":10.04987562112089},{"x":-116,"y":17,"length":117.23907198540937},{"x":-220,"y":33,"length":222.46123257772354},{"x":-288,"y":52,"length":292.6567955814455},{"x":-356,"y":88,"length":366.7151483099655},{"x":-420,"y":134,"length":440.8582538639829},{"x":-467,"y":178,"length":499.77294844759257},{"x":-514,"y":235,"length":565.173424711389},{"x":-524,"y":282,"length":595.0630218724737},{"x":-520,"y":320,"length":610.5735008989499},{"x":-494,"y":372,"length":618.4011642938586},{"x":-482,"y":418,"length":638.003134788537},{"x":-482,"y":522,"length":710.4984166062582},{"x":-496,"y":615,"length":790.0892354664757},{"x":-528,"y":671,"length":853.8296082943014},{"x":-566,"y":704,"length":903.3116848574472},{"x":-614,"y":737,"length":959.2523130021632},{"x":-657,"y":761,"length":1005.3705784435906},{"x":-719,"y":773,"length":1055.6940844771273},{"x":-807,"y":782,"length":1123.7317295511416},{"x":-903,"y":775,"length":1189.9722685844406},{"x":-1037,"y":770,"length":1291.6148806823185},{"x":-1167,"y":753,"length":1388.8477238344021},{"x":-1294,"y":746,"length":1493.637171471037}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":836.05,"x":3570,"isStatic":true,"repeatTexture":true,"id":-1,"width":1306,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-2370,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":92,"y":57,"length":108.2266141020775},{"x":179,"y":139,"length":226.63186007267382},{"x":255,"y":226,"length":340.7359681630338},{"x":334,"y":335,"length":473.0549650939096},{"x":386,"y":454,"length":595.912745290785},{"x":432,"y":621,"length":756.4819892105826},{"x":446,"y":785,"length":902.8515935634161},{"x":426,"y":919,"length":1012.9348448937868},{"x":403,"y":1015,"length":1092.0778360538227},{"x":372,"y":1094,"length":1155.5172002181534},{"x":314,"y":1194,"length":1234.5979102525648},{"x":255,"y":1292,"length":1316.9240676667732},{"x":144,"y":1395,"length":1402.4125641194178},{"x":67,"y":1461,"length":1462.5354696553516},{"x":-25,"y":1517,"length":1517.2059846968702},{"x":-114,"y":1556,"length":1560.1705035027421},{"x":-224,"y":1587,"length":1602.7304826451639},{"x":-342,"y":1606,"length":1642.0109622045768},{"x":-460,"y":1600,"length":1664.8123017325406},{"x":-575,"y":1592,"length":1692.657378207415},{"x":-671,"y":1568,"length":1705.5395040866101}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":1665.35,"x":4670,"isStatic":true,"repeatTexture":true,"id":-1,"width":1156.95,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-3300,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-3,"y":-3,"length":4.242640687119285},{"x":-6,"y":-122,"length":122.14745187681976},{"x":1,"y":-149,"length":149.00335566691106},{"x":16,"y":-170,"length":170.75128110793196},{"x":1158,"y":-1166,"length":1643.3258958587612},{"x":1192,"y":-1182,"length":1678.6863911999762},{"x":1228,"y":-1180,"length":1703.0513791427434},{"x":1276,"y":-1162,"length":1725.8099547748589},{"x":1301,"y":-1164,"length":1745.7081657596725},{"x":1313,"y":-1178,"length":1763.9878117492763},{"x":1411,"y":-1530,"length":2081.302717050069},{"x":1405,"y":-1555,"length":2095.7218326867714},{"x":1360,"y":-1580,"length":2084.7062143141416},{"x":1337,"y":-1607,"length":2090.458801316113},{"x":1330,"y":-1639,"length":2110.7394438916426},{"x":1505,"y":-2208,"length":2672.131920396147},{"x":1532,"y":-2255,"length":2726.1784607761833},{"x":1570,"y":-2298,"length":2783.110490081197},{"x":1630,"y":-2341,"length":2852.5744512632796},{"x":1700,"y":-2375,"length":2920.723369304255},{"x":2718,"y":-2790,"length":3895.076892694161}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":2823.15,"x":5950,"isStatic":true,"repeatTexture":true,"id":-1,"width":2768.2,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-510,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"height":128.35,"x":6354,"y":-1930,"rotation":-6,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":2620,"y":-510,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":4780,"y":-570,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":6200,"y":-1912,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":86.25,"x":830,"y":350,"rotation":0,"width":68.15},"className":"Dec29"},{"params":{"height":331.2,"x":550,"y":260,"rotation":0,"scaleX":1,"scaleY":1,"width":264},"className":"Dec14"},{"params":{"height":82.25,"x":2590,"y":-470,"rotation":0,"width":63.15},"className":"Dec29"},{"params":{"height":82.25,"x":4752,"y":-531,"rotation":0,"width":63.15},"className":"Dec29"},{"params":{"height":132.25,"x":5238,"y":-620,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":331.2,"x":5190,"y":-620,"rotation":0,"scaleX":1,"scaleY":1,"width":264},"className":"Dec14"},{"params":{"height":238.5,"x":5331,"y":-627,"rotation":0,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":240.35,"x":5730,"y":-1840,"rotation":-12,"scaleX":1,"scaleY":1,"width":139.45},"className":"Dec13"},{"params":{"height":238.5,"x":4790,"y":-1400,"rotation":-12,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":331.2,"x":4806,"y":-1390,"rotation":0,"scaleX":-1,"scaleY":1,"width":264},"className":"Dec14"},{"params":{"height":132.25,"x":3701,"y":-1680,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":240.35,"x":3400,"y":-1520,"rotation":-15,"scaleX":1,"scaleY":1,"width":139.45},"className":"Dec13"},{"params":{"height":69.8,"x":6344,"y":-1998,"rotation":-9,"width":68.8},"className":"Sign1"},{"params":{"height":82.25,"x":6330,"y":-1882,"rotation":-9,"width":63.15},"className":"Dec29"},{"params":{"height":82.25,"x":5655.25,"y":-1641.5,"rotation":-39,"width":63.15},"className":"Dec29"},{"params":{"height":128.35,"x":5651.9,"y":-1695.15,"rotation":-36,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":5609.45,"y":-1748.9,"rotation":-39,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":5168,"y":-1402,"rotation":-15,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":5148,"y":-1468,"rotation":-18,"width":68.8},"className":"Sign1"},{"params":{"height":82.25,"x":4563,"y":-1305,"rotation":9,"width":63.15},"className":"Dec29"},{"params":{"height":128.35,"x":4600,"y":-1343,"rotation":12,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":4612,"y":-1411,"rotation":9,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":4053,"y":-1519,"rotation":30,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":4085,"y":-1580,"rotation":27,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":3744,"y":-1623,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":3745,"y":-1680,"rotation":0,"width":68.8},"className":"Sign1"},{"params":{"height":82.25,"x":2899,"y":-1174,"rotation":-9,"width":63.15},"className":"Dec29"},{"params":{"height":128.35,"x":2923,"y":-1222,"rotation":-6,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":2913,"y":-1290,"rotation":168,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":2430,"y":-1295,"rotation":30,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":2462,"y":-1356,"rotation":-156,"width":68.8},"className":"Sign1"}],[{"params":{"stones":false,"safeId":2,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":5541,"id":2,"count":12,"radius":1,"y":-385,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":2,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":5901,"id":2,"count":12,"radius":1,"y":-385,"width":53.2},"className":"Tnt1"},{"params":{"rate":1,"height":128,"x":1559,"id":-1,"rotation":0,"safeId":-1,"speed":1000,"y":-660,"width":337},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":1559,"id":-1,"rotation":0,"safeId":-1,"speed":1000,"y":-800,"width":337},"className":"GeyserE"},{"params":{"height":99,"force":5000,"y":330,"rotation":0,"safeId":-1,"x":1210,"time":1,"width":100},"className":"BoostE"},{"params":{"rate":1,"height":128,"x":6873,"id":-1,"rotation":-165,"safeId":-1,"speed":1000,"y":-1830,"width":816},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":6913,"id":-1,"rotation":-165,"safeId":-1,"speed":1000,"y":-1960,"width":816},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":6953,"id":-1,"rotation":-165,"safeId":-1,"speed":1000,"y":-2090,"width":816},"className":"GeyserE"}],null,[{"params":{"height":32,"x":600,"y":310,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":796,"x":2620,"y":-570,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":742,"x":4780,"y":-630,"width":128,"id":2,"rotation":0},"className":"SafePointE"},{"params":{"height":978,"x":6200,"y":-1990,"width":128,"id":3,"rotation":0},"className":"SafePointE"}],[{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":3724,"id":3,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-479,"width":17},"className":"MotorJointE"},{"params":{"position":0,"accelDist":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-96,"length":96}],"stopOnEnd":true,"safeId":2,"speed":1100,"startTime":"0","sideWait":0,"active":0,"height":109,"x":5716,"cycle":0,"id":2,"width":13,"body":false,"snapToGrid":true,"y":-463,"rotation":0},"className":"frg.game.editor.objects::MoverPather"},{"params":{"height":1509,"hint":-1,"id":2,"rotation":0,"safeId":2,"x":5761,"off":false,"id_off":-1,"y":-655,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1234,"hint":-1,"id":3,"rotation":0,"safeId":1,"x":2680,"off":false,"id_off":-1,"y":-460,"width":64,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map16.json b/assets/levels/map16.json new file mode 100644 index 0000000..50c8b49 --- /dev/null +++ b/assets/levels/map16.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"30,37,44","countdown":0,"gravityY":500},"layers":[[{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-51,"y":-107,"length":118.53269591129698},{"x":-168,"y":-382,"length":417.31043600657773}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":45,"stretchTexture":false,"height":288,"x":4125,"isStatic":false,"repeatTexture":true,"id":-1,"width":131.7,"textureOffset":0,"safeId":1,"graphic":true,"smoothing":true,"y":-127,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":3,"vertices":[{"x":332,"y":485,"length":587.7490961286117},{"x":387,"y":467,"length":606.5129841973707},{"x":453,"y":515,"length":685.8819140347703},{"x":536,"y":515,"length":743.3175633603715},{"x":566,"y":552,"length":790.6073614633247},{"x":519,"y":561,"length":764.2525760506143},{"x":438,"y":565,"length":714.8909007673828},{"x":361,"y":552,"length":659.5642500924379},{"x":294,"y":530,"length":606.0825026347486},{"x":235,"y":500,"length":552.4717187331855},{"x":200,"y":470,"length":510.7837115648854},{"x":225,"y":450,"length":503.1152949374527}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":-171,"plr":false,"line":true,"x":4566,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":63},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":430,"length":430}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4160,"smoothing":true,"y":-181,"width":13,"height":443,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4128,"smoothing":true,"y":-236,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4097,"smoothing":true,"y":-237,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":0,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":-155,"y":-225,"length":273.22152184628504}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":8660,"smoothing":true,"y":1170,"width":168,"height":238,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"height":128,"x":9970,"y":-770,"rotation":0,"width":1421},"className":"FinishZone"},{"params":{"sf":true,"bg":true,"x":7970,"vertices":[{"x":0,"y":0,"length":0},{"x":1530,"y":0,"length":1530},{"x":1530,"y":240,"length":1548.7091398968369},{"x":0,"y":240,"length":240}],"id":-1,"density":1.5,"viscosity":1.5,"y":960,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"sf":true,"bg":true,"x":6230,"vertices":[{"x":0,"y":0,"length":0},{"x":700,"y":0,"length":700},{"x":700,"y":240,"length":740},{"x":0,"y":240,"length":240}],"id":-1,"density":1.5,"viscosity":1.5,"y":950,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":323,"y":94,"length":336.40005945302687},{"x":594,"y":64,"length":597.4378628778059}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":0,"stretchTexture":false,"height":109.85,"x":850,"isStatic":true,"repeatTexture":true,"id":-1,"width":607,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-130,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":2,"vertices":[{"x":-60,"y":-1983,"length":1983.9075079247016},{"x":550,"y":-1940,"length":2016.457289406349},{"x":525,"y":-758,"length":922.0569396734672},{"x":487,"y":-696,"length":849.4615941877537},{"x":464,"y":-627,"length":780.0160254764},{"x":463,"y":-562,"length":728.1572632337056},{"x":477,"y":-493,"length":685.9868803410164},{"x":511,"y":-438,"length":673.0267453823808},{"x":562,"y":-388,"length":682.926057490853},{"x":617,"y":-355,"length":711.8384648219004},{"x":675,"y":-337,"length":754.4494681554226},{"x":763,"y":-332,"length":832.1015563018735},{"x":845,"y":-340,"length":910.8375266753121},{"x":941,"y":-365,"length":1009.3096650681593},{"x":917,"y":-311,"length":968.3026386414529},{"x":822,"y":-298,"length":874.3500443186356},{"x":775,"y":-280,"length":824.0297324732888},{"x":725,"y":-240,"length":763.6916917185888},{"x":690,"y":-200,"length":718.4010022264724},{"x":665,"y":-145,"length":680.6247130394253},{"x":655,"y":-90,"length":661.1542936410532},{"x":665,"y":-40,"length":666.2019213421709},{"x":680,"y":0,"length":680},{"x":870,"y":0,"length":870},{"x":885,"y":40,"length":885.9034936154163},{"x":890,"y":95,"length":895.0558641783205},{"x":883,"y":164,"length":898.1007738555846},{"x":898,"y":228,"length":926.492309736028},{"x":920,"y":275,"length":960.2213286529309},{"x":957,"y":322,"length":1009.7192679155925},{"x":1000,"y":364,"length":1064.1879533240358},{"x":1048,"y":402,"length":1122.4562352270132},{"x":1104,"y":432,"length":1185.512547381933},{"x":1170,"y":455,"length":1255.3585145288178},{"x":1242,"y":457,"length":1323.4096115715647},{"x":1311,"y":452,"length":1386.731769305081},{"x":1387,"y":431,"length":1452.422114951435},{"x":1449,"y":395,"length":1501.8741625049684},{"x":1486,"y":363,"length":1529.6944139271739},{"x":1526,"y":320,"length":1559.1908157759267},{"x":1561,"y":269,"length":1584.008207049446},{"x":1582,"y":213,"length":1596.274725728626},{"x":1598,"y":145,"length":1604.5650500992474},{"x":1600,"y":80,"length":1601.9987515600628},{"x":1586,"y":6,"length":1586.011349265824},{"x":1553,"y":-75,"length":1554.8099562325938},{"x":1514,"y":-145,"length":1520.927677439003},{"x":1454,"y":-263,"length":1477.5943286301556},{"x":1459,"y":-313,"length":1492.1963677746974},{"x":1484,"y":-353,"length":1525.4065031984098},{"x":1519,"y":-368,"length":1562.9411377272017},{"x":1569,"y":-368,"length":1611.5784188180232},{"x":1609,"y":-353,"length":1647.2674342680366},{"x":1644,"y":-318,"length":1674.4730514403627},{"x":1714,"y":-288,"length":1738.0276177322385},{"x":1845,"y":-274,"length":1865.2348377617227},{"x":1986,"y":-275,"length":2004.9491265366312},{"x":2160,"y":-290,"length":2179.380645963435},{"x":2270,"y":-295,"length":2289.088246442238},{"x":2350,"y":-290,"length":2367.8260071213003},{"x":2480,"y":-270,"length":2494.6542846655125},{"x":2625,"y":-220,"length":2634.2029154945526},{"x":2760,"y":-140,"length":2763.5484435775684},{"x":2892,"y":-64,"length":2892.708073760641},{"x":3772,"y":405,"length":3793.6801393897194},{"x":3822,"y":409,"length":3843.821665998567},{"x":3879,"y":408,"length":3900.3980566090945},{"x":3931,"y":397,"length":3950.9960769405984},{"x":3978,"y":378,"length":3995.9189180963117},{"x":4023,"y":350,"length":4038.19625575578},{"x":4063,"y":315,"length":4075.1925107901343},{"x":4095,"y":274,"length":4104.156551594981},{"x":4119,"y":228,"length":4125.305443236901},{"x":4139,"y":181,"length":4142.955708187091},{"x":4151,"y":113,"length":4152.537778274871},{"x":4160,"y":50,"length":4160.300469918008},{"x":4175,"y":35,"length":4175.146704009333},{"x":4205,"y":35,"length":4205.145657405936},{"x":4232,"y":58,"length":4232.397429353723},{"x":4885,"y":795,"length":4949.267622588215},{"x":4950,"y":850,"length":5022.449601539073},{"x":5011,"y":890,"length":5089.422462323206},{"x":5076,"y":916,"length":5157.987204326897},{"x":5150,"y":930,"length":5233.297239790609},{"x":5805,"y":930,"length":5879.02415371803},{"x":5860,"y":925,"length":5932.556362985521},{"x":5915,"y":909,"length":5984.4386537084665},{"x":5971,"y":886,"length":6036.376147988129},{"x":6026,"y":850,"length":6085.65329278624},{"x":6074,"y":806,"length":6127.243425880843},{"x":6112,"y":765,"length":6159.689034358797},{"x":6137,"y":728,"length":6180.028559804558},{"x":6266,"y":728,"length":6308.148698310781},{"x":6305,"y":766,"length":6351.360562903038},{"x":6350,"y":812,"length":6401.706335032872},{"x":6391,"y":850,"length":6447.27702212337},{"x":6438,"y":885,"length":6498.543606070517},{"x":6492,"y":912,"length":6555.746181785869},{"x":6568,"y":935,"length":6634.218039829562},{"x":6637,"y":938,"length":6702.955542147061},{"x":6684,"y":933,"length":6748.803227239627},{"x":6732,"y":920,"length":6794.57312860786},{"x":6785,"y":902,"length":6844.693492041846},{"x":6833,"y":871,"length":6888.289337709327},{"x":6876,"y":837,"length":6926.75573410814},{"x":6915,"y":799,"length":6961.007542015739},{"x":6961,"y":733,"length":6999.48640973036},{"x":7120,"y":735,"length":7157.836614508605},{"x":7310,"y":871,"length":7361.707750243825},{"x":7344,"y":893,"length":7398.093335447992},{"x":7390,"y":915,"length":7446.430352860356},{"x":7441,"y":929,"length":7498.768032150348},{"x":7494,"y":937,"length":7552.35095847644},{"x":7552,"y":935,"length":7609.660242087028},{"x":7610,"y":928,"length":7666.373588601067},{"x":7663,"y":909,"length":7716.7253417495685},{"x":7715,"y":885,"length":7765.593988871682},{"x":7758,"y":850,"length":7804.42592379478},{"x":7795,"y":812,"length":7837.178637749685},{"x":7827,"y":776,"length":7865.373799127414},{"x":7852,"y":727,"length":7885.583871851215},{"x":8022,"y":729,"length":8055.055865728058},{"x":8050,"y":775,"length":8087.219856044474},{"x":8080,"y":810,"length":8120.498753155498},{"x":8123,"y":852,"length":8167.559794700006},{"x":8168,"y":887,"length":8216.02050873779},{"x":8217,"y":909,"length":8267.125860902324},{"x":8272,"y":928,"length":8323.891397657708},{"x":8340,"y":932,"length":8391.914203565238},{"x":9192,"y":932,"length":9239.128097391009},{"x":9248,"y":927,"length":9294.344140389896},{"x":9302,"y":905,"length":9345.920446911583},{"x":9364,"y":869,"length":9404.23611996211},{"x":9415,"y":826,"length":9451.164002386162},{"x":9460,"y":768,"length":9491.123431923115},{"x":9489,"y":715,"length":9515.899642177821},{"x":9511,"y":640,"length":9532.508641485723},{"x":9518,"y":573,"length":9535.232194341153},{"x":9515,"y":-257,"length":9518.470150186951},{"x":9647,"y":-256,"length":9650.39610586011},{"x":9647,"y":-149,"length":9648.15059998547},{"x":10673,"y":-154,"length":10674.110970005886},{"x":10678,"y":-1041,"length":10728.623630270567},{"x":9332,"y":-1043,"length":9390.10505798524},{"x":9331,"y":-814,"length":9366.437796729342},{"x":8245,"y":-815,"length":8285.182556829994},{"x":8260,"y":-1912,"length":8478.404566898185},{"x":12292,"y":-2016,"length":12456.224146987723},{"x":14070,"y":1350,"length":14134.617080062693},{"x":10926,"y":1542,"length":11034.27568986746},{"x":8830,"y":2610,"length":9207.659854707927},{"x":5424,"y":1920,"length":5753.796659597904},{"x":-85,"y":985,"length":988.6607102540285}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-30,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":210},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1320,"y":305,"length":1354.778579694852},{"x":1575,"y":245,"length":1593.9416551429981},{"x":1900,"y":-315,"length":1925.9348379423432},{"x":2570,"y":-340,"length":2592.3927171630457},{"x":3860,"y":270,"length":3869.431482789171},{"x":4405,"y":270,"length":4413.266930517573},{"x":5080,"y":765,"length":5137.277975737735},{"x":8120,"y":780,"length":8157.377029413315},{"x":11355,"y":-455,"length":11364.112371848494}],"lineId":-1,"physic":false,"directed":false,"width":11373.6,"shape":false,"height":1296.95,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":-110,"smoothing":true,"y":380,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-168,"y":-382,"length":417.31043600657773}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":0,"stretchTexture":false,"height":395,"x":4155,"isStatic":false,"repeatTexture":true,"id":-1,"width":182.6,"textureOffset":0,"safeId":1,"graphic":true,"smoothing":true,"y":-241,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":3,"vertices":[{"x":332,"y":485,"length":587.7490961286117},{"x":387,"y":467,"length":606.5129841973707},{"x":453,"y":515,"length":685.8819140347703},{"x":536,"y":515,"length":743.3175633603715},{"x":566,"y":552,"length":790.6073614633247},{"x":519,"y":561,"length":764.2525760506143},{"x":438,"y":565,"length":714.8909007673828},{"x":361,"y":552,"length":659.5642500924379},{"x":294,"y":530,"length":606.0825026347486},{"x":235,"y":500,"length":552.4717187331855},{"x":189,"y":465,"length":501.9422277513618},{"x":217,"y":442,"length":492.3951665075521}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":144,"plr":false,"line":true,"x":4601,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-418},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":264,"y":307,"length":404.90122252223443}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":0,"stretchTexture":false,"height":320,"x":1170,"isStatic":false,"repeatTexture":true,"id":-1,"width":277,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-40,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":3,"vertices":[{"x":-10,"y":23,"length":25.079872407968907},{"x":18,"y":-7,"length":19.313207915827967},{"x":59,"y":-24,"length":63.694583757176716},{"x":100,"y":-24,"length":102.83968105745953},{"x":130,"y":-11,"length":130.4645545732633},{"x":153,"y":5,"length":153.08167754502824},{"x":170,"y":33,"length":173.1733235807409},{"x":178,"y":60,"length":187.84035775093702},{"x":177,"y":100,"length":203.2953516438583},{"x":161,"y":137,"length":211.4000946073582},{"x":131,"y":164,"length":209.89759407863636},{"x":92,"y":179,"length":201.25854019146615},{"x":51,"y":175,"length":182.28000438885226},{"x":9,"y":153,"length":153.26447729333762},{"x":-17,"y":114,"length":115.26057435220423},{"x":-24,"y":70,"length":74}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":1394,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":246},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":0,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1015,"y":0,"length":1015}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":20,"rotation":0,"stretchTexture":false,"height":20,"x":9620,"isStatic":false,"repeatTexture":true,"id":-1,"width":1028,"textureOffset":0,"safeId":2,"graphic":true,"smoothing":true,"y":-30,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"height":17.05,"x":8732,"id":-1,"active":true,"safeId":2,"y":726,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8781,"id":-1,"active":true,"safeId":2,"y":677,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8929,"id":-1,"active":true,"safeId":2,"y":528,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8831,"id":-1,"active":true,"safeId":2,"y":628,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9078,"id":-1,"active":true,"safeId":2,"y":379,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8534,"id":-1,"active":true,"safeId":2,"y":923,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8683,"id":-1,"active":true,"safeId":2,"y":777,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8979,"id":-1,"active":true,"safeId":2,"y":479,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9028,"id":-1,"active":true,"safeId":2,"y":429,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8583,"id":-1,"active":true,"safeId":2,"y":875,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8879,"id":-1,"active":true,"safeId":2,"y":578,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8633,"id":-1,"active":true,"safeId":2,"y":824,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9474,"id":-1,"active":true,"safeId":2,"y":-15,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9325,"id":-1,"active":true,"safeId":2,"y":133,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9275,"id":-1,"active":true,"safeId":2,"y":184,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9375,"id":-1,"active":true,"safeId":2,"y":85,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9424,"id":-1,"active":true,"safeId":2,"y":34,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9177,"id":-1,"active":true,"safeId":2,"y":282,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9226,"id":-1,"active":true,"safeId":2,"y":231,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":9127,"id":-1,"active":true,"safeId":2,"y":331,"rotation":-45,"width":85.95},"className":"PlankBone"},{"params":{"height":128.35,"x":1880,"y":-130,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":5110,"y":1077,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":850,"y":180,"rotation":15,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":890,"y":180,"rotation":30,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":90.05,"x":930,"y":110,"rotation":30,"width":102},"className":"Sign21"},{"params":{"height":79.6,"x":1850,"y":-100,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":3839,"y":571,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":3873,"y":545,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":90.05,"x":3873,"y":471,"rotation":0,"width":102},"className":"Sign21"},{"params":{"height":79.6,"x":5120,"y":1540,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":79.6,"x":5143,"y":1099,"rotation":0,"scaleX":-1,"scaleY":1,"width":77.3},"className":"Dec23"}],[{"params":{"stones":false,"safeId":2,"physic":true,"impulse":3000,"rotation":0,"height":53.2,"x":9650,"id":17,"count":40,"radius":64,"y":30,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":2,"physic":true,"impulse":3000,"rotation":0,"height":53.2,"x":10610,"id":17,"count":40,"radius":64,"y":30,"width":53.2},"className":"Tnt1"}],null,[{"params":{"height":32,"x":750,"y":120,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1381,"x":1880,"y":-200,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":2205,"x":5110,"y":1010,"width":128,"id":2,"rotation":0},"className":"SafePointE"}],[{"params":{"safeId":1,"rotation":144,"rate":-65,"height":17,"x":4150,"id":1,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":-250,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":4008,"id":-1,"rotation":144,"safeId":1,"graphic":0,"y":-579,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3999,"id":-1,"rotation":144,"safeId":1,"graphic":0,"y":-598,"width":17},"className":"PivotJointE"},{"params":{"safeId":1,"rotation":-171,"rate":65,"height":17,"x":4168,"id":1,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":-247,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":4260,"id":-1,"rotation":-171,"safeId":1,"graphic":0,"y":-470,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4268,"id":-1,"rotation":-171,"safeId":1,"graphic":0,"y":-492,"width":17},"className":"PivotJointE"},{"params":{"height":1606,"hint":-1,"id":1,"rotation":0,"safeId":1,"x":3690,"off":false,"id_off":-1,"y":110,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":1173,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":-36,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1423,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":254,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1533,"id":7,"rotation":0,"safeId":-1,"graphic":0,"y":384,"width":17},"className":"PivotJointE"},{"params":{"height":64,"hint":-1,"id":7,"rotation":0,"safeId":-1,"x":720,"off":false,"id_off":-1,"y":210,"width":240,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":9104,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":354,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8856,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":602,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9054,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":403,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8808,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":651,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8560,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":897,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8511,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":948,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9006,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":453,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8610,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":849,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8708,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":749,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8956,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":502,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8906,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":552,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8659,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":798,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8757,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":701,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9450,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":9,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9401,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":58,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9303,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":157,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9202,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":256,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9351,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":107,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9500,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":-41,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9153,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":305,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9252,"id":-1,"rotation":-45,"safeId":2,"graphic":0,"y":205,"width":17},"className":"PivotJointE"},{"params":{"height":232,"hint":-1,"id":17,"rotation":0,"safeId":2,"x":10460,"off":false,"id_off":-1,"y":-130,"width":901,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":4097,"id":1,"rotation":0,"safeId":1,"graphic":0,"y":-643,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4165,"id":1,"rotation":0,"safeId":1,"graphic":0,"y":-533,"width":17},"className":"PivotJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map17.json b/assets/levels/map17.json new file mode 100644 index 0000000..ec7714d --- /dev/null +++ b/assets/levels/map17.json @@ -0,0 +1 @@ +{"layers":[[{"className":"frg.game.editor.objects::BonesPather","params":{"thickness":10,"x":2390,"snapToGrid":true,"vertices":[{"y":0,"x":0},{"y":-65,"x":45},{"y":-135,"x":95},{"y":-200,"x":140},{"y":-275,"x":190},{"y":-330,"x":230},{"y":-410,"x":285},{"y":-495,"x":345},{"y":-575,"x":400},{"y":-650,"x":450}],"y":-300,"isPillar":true,"ghostMode":true,"width":463,"rotation":0,"height":663,"color":{"alpha":1,"color":255},"direction":90,"thick":128,"directed":false}},{"className":"frg.game.editor.objects::BonesPather","params":{"thickness":10,"x":2370,"snapToGrid":true,"vertices":[{"y":10,"x":0},{"y":60,"x":35},{"y":105,"x":75},{"y":165,"x":120},{"y":220,"x":165},{"y":275,"x":205},{"y":330,"x":250},{"y":385,"x":290},{"y":440,"x":335},{"y":490,"x":375},{"y":550,"x":420},{"y":605,"x":460},{"y":660,"x":500}],"y":-960,"isPillar":true,"ghostMode":true,"width":513,"rotation":0,"height":663,"color":{"alpha":1,"color":255},"direction":90,"thick":128,"directed":false}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-160,"snapToGrid":true,"vertices":[{"y":0,"x":0},{"y":0,"x":7855}],"y":380,"ghostMode":true,"thick":128,"wireframe":false,"color":{"alpha":1,"color":7340056},"straightSides":true,"cameraOffsetY":50,"shape":true,"fillId":0,"textureOffset":0,"physic":true,"isRoad":true,"stretchTexture":false,"thickness":64,"lineId":0,"direction":90,"rotation":0,"height":64,"width":7868,"repeatTexture":true,"directed":true,"smoothing":true,"camera":false,"originOffsetRatio":0,"textureMode":true,"line":true}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":2310,"vertices":[{"y":0,"x":0},{"y":-10,"x":15},{"y":-12,"x":45},{"y":-17,"x":72},{"y":-26,"x":100},{"y":-39,"x":126},{"y":-52,"x":147},{"y":-70,"x":173},{"y":-94,"x":201},{"y":-119,"x":221},{"y":-139,"x":236},{"y":-166,"x":251},{"y":-194,"x":263},{"y":-232,"x":272},{"y":-275,"x":277},{"y":-285,"x":287},{"y":-286,"x":331},{"y":-276,"x":341},{"y":-242,"x":344},{"y":-212,"x":351},{"y":-180,"x":362},{"y":-155,"x":374},{"y":-131,"x":389},{"y":-102,"x":411},{"y":-79,"x":435},{"y":-56,"x":463},{"y":-38,"x":495},{"y":-23,"x":528},{"y":-14,"x":574},{"y":-10,"x":610},{"y":0,"x":620},{"y":45,"x":620},{"y":55,"x":610},{"y":57,"x":581},{"y":62,"x":554},{"y":73,"x":520},{"y":85,"x":492},{"y":101,"x":465},{"y":122,"x":437},{"y":144,"x":415},{"y":170,"x":394},{"y":199,"x":374},{"y":233,"x":358},{"y":264,"x":350},{"y":293,"x":345},{"y":321,"x":343},{"y":333,"x":330},{"y":333,"x":285},{"y":318,"x":276},{"y":292,"x":275},{"y":259,"x":267},{"y":225,"x":257},{"y":195,"x":241},{"y":172,"x":228},{"y":151,"x":210},{"y":127,"x":186},{"y":109,"x":166},{"y":89,"x":138},{"y":75,"x":107},{"y":66,"x":76},{"y":59,"x":44},{"y":55,"x":10},{"y":45,"x":0}],"y":-650,"isStatic":false,"rotation":0,"graphic":true,"density":1,"textureId":-1,"ignore":false,"id":-1,"physic":true,"line":true,"isWheel":false,"plr":false,"layer":3,"rem":true,"safeId":1}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-220,"snapToGrid":true,"vertices":[{"y":0,"x":0},{"y":5,"x":1455},{"y":-685,"x":2420},{"y":-695,"x":3340},{"y":-775,"x":3445},{"y":-905,"x":3500},{"y":-905,"x":3855},{"y":25,"x":4325},{"y":5,"x":5205},{"y":-90,"x":5310},{"y":-475,"x":5620},{"y":-80,"x":5990},{"y":-20,"x":6060},{"y":-5,"x":6535},{"y":-105,"x":6670},{"y":-1945,"x":8160}],"y":390,"ghostMode":true,"thick":128,"wireframe":false,"color":{"alpha":1,"color":7340056},"straightSides":true,"cameraOffsetY":70,"shape":false,"fillId":0,"textureOffset":0,"physic":false,"isRoad":false,"stretchTexture":false,"thickness":64,"lineId":-1,"direction":90,"rotation":0,"height":2022.6,"width":8191.35,"repeatTexture":true,"directed":false,"smoothing":true,"camera":true,"originOffsetRatio":0,"textureMode":true,"line":false}},{"className":"frg.game.editor.objects::BonesPather","params":{"thickness":10,"x":1230,"snapToGrid":true,"vertices":[{"y":0,"x":0},{"y":-75,"x":0},{"y":-155,"x":0},{"y":-220,"x":0},{"y":-295,"x":0},{"y":-360,"x":0},{"y":-430,"x":0},{"y":-490,"x":0},{"y":-490,"x":80},{"y":-490,"x":175},{"y":-490,"x":260},{"y":-490,"x":340},{"y":-490,"x":415},{"y":-490,"x":495},{"y":-490,"x":575},{"y":-490,"x":650},{"y":-497,"x":700},{"y":-511,"x":738},{"y":-537,"x":775},{"y":-568,"x":804},{"y":-604,"x":826},{"y":-643,"x":840},{"y":-689,"x":844},{"y":-690,"x":960},{"y":-690,"x":1070},{"y":-690,"x":1175},{"y":-690,"x":1285},{"y":-690,"x":1400},{"y":-690,"x":1520},{"y":-690,"x":1640},{"y":-690,"x":1740},{"y":-692,"x":1836},{"y":-696,"x":1877},{"y":-710,"x":1912},{"y":-728,"x":1944},{"y":-756,"x":1975},{"y":-790,"x":2000},{"y":-828,"x":2016},{"y":-867,"x":2026},{"y":-910,"x":2030},{"y":-910,"x":2120},{"y":-910,"x":2220},{"y":-910,"x":2320},{"y":-910,"x":2415},{"y":-910,"x":2520},{"y":-910,"x":2605},{"y":-910,"x":2675},{"y":-910,"x":2760},{"y":-825,"x":2760},{"y":-740,"x":2760},{"y":-650,"x":2760},{"y":-570,"x":2760},{"y":-480,"x":2760},{"y":-400,"x":2760},{"y":-330,"x":2760},{"y":-260,"x":2760},{"y":-196,"x":2761},{"y":-144,"x":2774},{"y":-98,"x":2798},{"y":-64,"x":2827},{"y":-37,"x":2861},{"y":-18,"x":2908},{"y":-10,"x":2950},{"y":-10,"x":3020},{"y":-10,"x":3095},{"y":-10,"x":3175},{"y":-10,"x":3275},{"y":-10,"x":3370},{"y":-10,"x":3460},{"y":-10,"x":3550},{"y":-10,"x":3630},{"y":-10,"x":3700},{"y":-15,"x":3745},{"y":-30,"x":3788},{"y":-62,"x":3831},{"y":-98,"x":3863},{"y":-143,"x":3884},{"y":-190,"x":3895},{"y":-239,"x":3892},{"y":-282,"x":3878},{"y":-324,"x":3853},{"y":-385,"x":3790},{"y":-435,"x":3735},{"y":-485,"x":3680},{"y":-535,"x":3630},{"y":-595,"x":3570},{"y":-685,"x":3570},{"y":-770,"x":3570},{"y":-860,"x":3570},{"y":-945,"x":3570},{"y":-1045,"x":3570},{"y":-1045,"x":3700},{"y":-1045,"x":3815},{"y":-1045,"x":3935},{"y":-1045,"x":4075},{"y":-1045,"x":4195},{"y":-1045,"x":4325},{"y":-1045,"x":4429},{"y":-1045,"x":4530},{"y":-1045,"x":4660},{"y":-1045,"x":4810},{"y":-1008,"x":4849},{"y":-955,"x":4849},{"y":-831,"x":4738},{"y":-790,"x":4698},{"y":-791,"x":4635},{"y":-829,"x":4589},{"y":-958,"x":4480},{"y":-1006,"x":4479}],"y":390,"isPillar":false,"ghostMode":true,"width":4862,"rotation":0,"height":1058,"color":{"alpha":1,"color":255},"direction":90,"thick":16,"directed":true}},{"className":"frg.game.editor.objects::BonesPather","params":{"thickness":10,"x":1800,"snapToGrid":true,"vertices":[{"y":100,"x":3020},{"y":100,"x":3110},{"y":100,"x":3210},{"y":100,"x":3305},{"y":100,"x":3395},{"y":100,"x":3520},{"y":100,"x":3635},{"y":100,"x":3745},{"y":101,"x":3861},{"y":109,"x":3906},{"y":125,"x":3941},{"y":151,"x":3972},{"y":182,"x":3990},{"y":224,"x":4000},{"y":262,"x":3998},{"y":298,"x":3986},{"y":376,"x":3963},{"y":466,"x":3930},{"y":504,"x":3926},{"y":548,"x":3928},{"y":586,"x":3941},{"y":620,"x":3962},{"y":650,"x":3990},{"y":675,"x":4028},{"y":692,"x":4080},{"y":695,"x":4200},{"y":695,"x":4285},{"y":695,"x":4375},{"y":695,"x":4495},{"y":675,"x":4554},{"y":645,"x":4597},{"y":610,"x":4631},{"y":570,"x":4661},{"y":516,"x":4682},{"y":467,"x":4691},{"y":421,"x":4693},{"y":371,"x":4681},{"y":327,"x":4663},{"y":286,"x":4632},{"y":240,"x":4590},{"y":191,"x":4542},{"y":160,"x":4531},{"y":126,"x":4546},{"y":83,"x":4575},{"y":15,"x":4625},{"y":-55,"x":4675},{"y":-125,"x":4725},{"y":-200,"x":4775},{"y":-260,"x":4815},{"y":-335,"x":4866},{"y":-328,"x":5052},{"y":-337,"x":5142},{"y":-368,"x":5206},{"y":-417,"x":5263},{"y":-478,"x":5314},{"y":-536,"x":5344},{"y":-598,"x":5362},{"y":-660,"x":5368},{"y":-726,"x":5361},{"y":-776,"x":5348},{"y":-832,"x":5322},{"y":-885,"x":5281},{"y":-931,"x":5234},{"y":-958,"x":5191},{"y":-978,"x":5150},{"y":-991,"x":5103},{"y":-997,"x":5048},{"y":-995,"x":4985},{"y":-985,"x":4930},{"y":-965,"x":4880},{"y":-935,"x":4830},{"y":-840,"x":4719},{"y":-840,"x":4625},{"y":-840,"x":4530},{"y":-840,"x":4420},{"y":-840,"x":4285},{"y":-840,"x":4170},{"y":-840,"x":4030},{"y":-840,"x":3905},{"y":-840,"x":3770},{"y":-840,"x":3650},{"y":-840,"x":3505},{"y":-840,"x":3375},{"y":-840,"x":3245},{"y":-840,"x":3115},{"y":-840,"x":3000},{"y":-840,"x":2865},{"y":-839,"x":2749},{"y":-835,"x":2707},{"y":-825,"x":2676},{"y":-805,"x":2642},{"y":-782,"x":2617},{"y":-749,"x":2589},{"y":-716,"x":2571},{"y":-680,"x":2565},{"y":-610,"x":2565},{"y":-530,"x":2565},{"y":-455,"x":2565},{"y":-370,"x":2565},{"y":-280,"x":2565},{"y":-190,"x":2565},{"y":-90,"x":2565},{"y":10,"x":2565},{"y":100,"x":2565},{"y":200,"x":2565},{"y":290,"x":2565},{"y":390,"x":2565},{"y":390,"x":2511},{"y":390,"x":2460},{"y":295,"x":2460},{"y":205,"x":2460},{"y":105,"x":2460},{"y":5,"x":2460},{"y":-95,"x":2460},{"y":-195,"x":2460},{"y":-295,"x":2460},{"y":-395,"x":2460},{"y":-490,"x":2460},{"y":-580,"x":2460},{"y":-652,"x":2461},{"y":-689,"x":2458},{"y":-726,"x":2448},{"y":-761,"x":2429},{"y":-790,"x":2399},{"y":-816,"x":2366},{"y":-835,"x":2323},{"y":-840,"x":2271},{"y":-840,"x":2195},{"y":-840,"x":2120},{"y":-840,"x":2040},{"y":-840,"x":1965},{"y":-840,"x":1880},{"y":-840,"x":1810},{"y":-840,"x":1750},{"y":-840,"x":1670},{"y":-840,"x":1590},{"y":-840,"x":1510},{"y":-840,"x":1435},{"y":-840,"x":1360},{"y":-840,"x":1290},{"y":-840,"x":1225},{"y":-833,"x":1181},{"y":-821,"x":1147},{"y":-801,"x":1120},{"y":-779,"x":1093},{"y":-750,"x":1071},{"y":-712,"x":1051},{"y":-677,"x":1044},{"y":-631,"x":1039},{"y":-630,"x":950},{"y":-630,"x":860},{"y":-630,"x":780},{"y":-630,"x":700},{"y":-630,"x":615},{"y":-630,"x":535},{"y":-630,"x":460},{"y":-630,"x":375},{"y":-630,"x":300},{"y":-630,"x":239},{"y":-621,"x":194},{"y":-608,"x":161},{"y":-585,"x":132},{"y":-567,"x":112},{"y":-536,"x":89},{"y":-508,"x":74},{"y":-467,"x":64},{"y":-420,"x":61},{"y":-345,"x":60},{"y":-270,"x":60},{"y":-200,"x":60},{"y":-130,"x":60},{"y":-65,"x":60},{"y":-1,"x":60},{"y":0,"x":-15},{"y":0,"x":-85},{"y":0,"x":-155},{"y":0,"x":-235},{"y":0,"x":-315},{"y":0,"x":-390},{"y":0,"x":-460},{"y":0,"x":-530},{"y":0,"x":-600},{"y":0,"x":-680},{"y":0,"x":-755},{"y":60,"x":-755},{"y":125,"x":-755},{"y":187,"x":-755},{"y":255,"x":-755},{"y":320,"x":-755},{"y":392,"x":-755},{"y":460,"x":-755},{"y":525,"x":-755},{"y":525,"x":-820},{"y":525,"x":-895},{"y":524,"x":-961},{"y":505,"x":-985},{"y":460,"x":-985},{"y":460,"x":-871},{"y":460,"x":-770}],"y":-320,"isPillar":false,"ghostMode":true,"width":6366,"rotation":0,"height":1705,"color":{"alpha":1,"color":255},"direction":90,"thick":16,"directed":false}},{"className":"frg.game.editor.objects::DynamicPather","params":{"x":4827,"snapToGrid":false,"vertices":[{"y":379,"x":98},{"y":379,"x":-93},{"y":375,"x":-133},{"y":359,"x":-177},{"y":335,"x":-213},{"y":307,"x":-241},{"y":278,"x":-263},{"y":242,"x":-277},{"y":205,"x":-284},{"y":169,"x":-284},{"y":135,"x":-280},{"y":101,"x":-267},{"y":71,"x":-247},{"y":44,"x":-224},{"y":19,"x":-194},{"y":1,"x":-157},{"y":-7,"x":-120},{"y":-10,"x":-85},{"y":-10,"x":100}],"y":-240,"ghostMode":true,"wireframe":false,"action":0,"color":{"alpha":1,"color":7340056},"straightSides":true,"id":-1,"textureOffset":0,"physic":true,"stretchTexture":false,"thickness":20,"isStatic":false,"rotation":0,"graphic":true,"height":409,"shapeH":20,"width":400.5,"repeatTexture":true,"type":2,"textureMode":true,"density":"1","originOffsetRatio":0,"smoothing":true,"safeId":2}},{"className":"FinishZone","params":{"rotation":0,"x":5303,"height":402,"y":-430,"width":968}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":5949,"vertices":[{"y":0,"x":0},{"y":-11,"x":15},{"y":-18,"x":35},{"y":-20,"x":58},{"y":-14,"x":81},{"y":0,"x":100},{"y":13,"x":110},{"y":33,"x":119},{"y":55,"x":122},{"y":78,"x":116},{"y":100,"x":100},{"y":112,"x":84},{"y":121,"x":63},{"y":120,"x":36},{"y":114,"x":16},{"y":100,"x":0},{"y":86,"x":-12},{"y":66,"x":-19},{"y":42,"x":-21},{"y":18,"x":-15}],"y":103,"isStatic":false,"rotation":0,"graphic":true,"density":1,"textureId":-1,"ignore":false,"id":-1,"physic":true,"line":true,"isWheel":false,"plr":false,"layer":3,"rem":true,"safeId":3}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":6119,"vertices":[{"y":0,"x":5},{"y":-20,"x":21},{"y":-33,"x":41},{"y":-40,"x":68},{"y":-41,"x":93},{"y":-33,"x":119},{"y":-19,"x":140},{"y":1,"x":156},{"y":22,"x":166},{"y":48,"x":170},{"y":72,"x":167},{"y":96,"x":159},{"y":116,"x":140},{"y":132,"x":121},{"y":142,"x":96},{"y":142,"x":69},{"y":133,"x":42},{"y":119,"x":20},{"y":100,"x":0},{"y":74,"x":-8},{"y":48,"x":-11},{"y":21,"x":-7}],"y":84,"isStatic":false,"rotation":0,"graphic":true,"density":1,"textureId":-1,"ignore":false,"id":-1,"physic":true,"line":true,"isWheel":false,"plr":false,"layer":3,"rem":true,"safeId":3}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":-210,"vertices":[{"y":-620,"x":-5},{"y":-620,"x":150},{"y":170,"x":155},{"y":170,"x":0}],"y":220,"isStatic":true,"rotation":0,"graphic":true,"density":1,"textureId":-1,"ignore":false,"id":-1,"physic":true,"line":false,"isWheel":false,"plr":false,"layer":0,"rem":true,"safeId":-1}}],[{"className":"SignPillar","params":{"x":1570,"y":-152,"scaleX":1,"width":9.3,"rotation":0,"scaleY":0.774055317491235,"height":99.35}},{"className":"SignPillar","params":{"x":3408,"y":-588,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"SignPillar","params":{"x":5130,"y":-724,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"Dec14","params":{"x":640,"y":270,"scaleX":1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec15","params":{"x":1580,"y":270,"scaleX":1,"width":87.85,"rotation":0,"scaleY":1,"height":132.25}},{"className":"Dec16","params":{"x":1670,"y":260,"scaleX":1,"width":118.55,"rotation":0,"scaleY":1,"height":238.5}},{"className":"Dec14","params":{"x":3960,"y":270,"scaleX":1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec15","params":{"x":5320,"y":270,"scaleX":1,"width":87.85,"rotation":0,"scaleY":1,"height":132.25}},{"className":"Dec14","params":{"x":5367,"y":270,"scaleX":-1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec14","params":{"x":6710,"y":270,"scaleX":1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec16","params":{"x":6730,"y":260,"scaleX":1,"width":118.55,"rotation":0,"scaleY":1,"height":238.5}}],[{"className":"GlassCrashed0","params":{"x":6090,"height":18,"y":-647,"width":132,"rotation":0,"ttl":0.3,"safeId":3}},{"className":"GlassCrashed0","params":{"x":6220,"height":18,"y":-647,"width":132,"rotation":0,"ttl":0.3,"safeId":3}},{"className":"GlassCrashed0","params":{"x":6350,"height":18,"y":-647,"width":132,"rotation":0,"ttl":0.3,"safeId":3}},{"className":"GlassCrashed0","params":{"x":6480,"height":18,"y":-647,"width":132,"rotation":0,"ttl":0.3,"safeId":3}},{"className":"GlassCrashed0","params":{"x":6610,"height":18,"y":-647,"width":132,"rotation":0,"ttl":0.3,"safeId":3}},{"className":"PlankBone","params":{"x":5959,"id":-1,"y":210,"width":86,"rotation":37.00000000000001,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":5926,"id":-1,"y":148,"width":86,"rotation":90.00000000000006,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":5958,"id":-1,"y":90,"width":86,"rotation":147.0000000000001,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6026,"id":-1,"y":60,"width":86,"rotation":168.0000000000001,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6099,"id":-1,"y":46,"width":86,"rotation":171.0000000000001,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6173,"id":-1,"y":36,"width":86,"rotation":174.0000000000001,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6242,"id":-1,"y":46,"width":86,"rotation":-155.9999999999999,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6290,"id":-1,"y":96,"width":86,"rotation":-107.99999999999989,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6026,"id":-1,"y":234,"width":86,"rotation":0,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6099,"id":-1,"y":234,"width":86,"rotation":0,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6169,"id":-1,"y":234,"width":86,"rotation":0,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6237,"id":-1,"y":219,"width":86,"rotation":-24,"active":true,"height":17.05,"safeId":3}},{"className":"PlankBone","params":{"x":6287,"id":-1,"y":169,"width":86,"rotation":-66,"active":true,"height":17.05,"safeId":3}},{"className":"GeyserE","params":{"rotation":-90,"x":1143,"id":-1,"y":200,"width":375,"speed":900,"height":128,"rate":1,"safeId":-1}},{"className":"GeyserE","params":{"rotation":0,"x":1140,"id":-1,"y":-208,"width":173,"speed":1000,"height":128,"rate":1,"safeId":-1}}],null,[{"className":"PlayerWP","params":{"rotation":0,"x":240,"height":32,"y":290,"width":64}},{"className":"SafePointE","params":{"x":1570,"id":1,"y":-210,"width":128,"rotation":0,"height":294}},{"className":"SafePointE","params":{"x":3410,"id":2,"y":-660,"width":128,"rotation":0,"height":1192}},{"className":"SafePointE","params":{"x":5127,"id":3,"y":-800,"width":128,"rotation":0,"height":817}}],[{"className":"MotorJointE","params":{"x":2620,"y":-627,"snd":false,"swoosh":false,"width":17,"rotation":0,"graphic":2,"height":17,"time":0,"id":1,"rate":-85,"safeId":1}},{"className":"ToggleE","params":{"x":1843,"id":1,"id_off":-1,"y":-330,"sndId":-1,"width":694,"rotation":90,"off":false,"hint":-1,"height":64,"safeId":1}},{"className":"frg.game.editor.objects::MoverPather","params":{"thickness":10,"x":4544,"snapToGrid":true,"vertices":[{"y":0,"x":0},{"y":-896,"x":0}],"y":-52,"ghostMode":true,"width":13,"rotation":0,"position":450,"height":909,"color":{"alpha":1,"color":7340056},"sideAngle":0,"stopOnPoint":false,"cycle":0,"accelDist":0,"body":false,"stopOnEnd":false,"startTime":"0","active":0,"id":3,"sideWait":0,"speed":250,"safeId":2}},{"className":"ToggleE","params":{"x":3630,"id":3,"id_off":-1,"y":-710,"sndId":-1,"width":155,"rotation":0,"off":false,"hint":-1,"height":1743,"safeId":2}},{"className":"PivotJointE","params":{"x":5999,"id":-1,"y":154,"width":17,"rotation":0,"graphic":1,"height":17,"safeId":3}},{"className":"MotorJointE","params":{"x":6199,"y":134,"snd":false,"swoosh":false,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":8,"rate":-50,"safeId":3}},{"className":"PivotJointE","params":{"x":5927,"id":-1,"y":108,"width":17,"rotation":-18,"graphic":1,"height":17,"safeId":3}},{"className":"ToggleE","params":{"x":5380,"id":8,"id_off":-1,"y":-910,"sndId":-1,"width":144,"rotation":0,"off":false,"hint":-1,"height":1381,"safeId":3}},{"className":"PivotJointE","params":{"x":5991,"id":-1,"y":69,"width":17,"rotation":0,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6064,"id":-1,"y":54,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6136,"id":-1,"y":41,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6208,"id":-1,"y":32,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6278,"id":-1,"y":62,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6302,"id":-1,"y":134,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6272,"id":-1,"y":203,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6206,"id":-1,"y":234,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6134,"id":-1,"y":234,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":6064,"id":-1,"y":235,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":5990,"id":-1,"y":234,"width":17,"rotation":9,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":5928,"id":-1,"y":185,"width":17,"rotation":-18,"graphic":1,"height":17,"safeId":3}},{"className":"PivotJointE","params":{"x":2620,"id":1,"y":-360,"width":17,"rotation":0,"graphic":0,"height":17,"safeId":1}}]],"settings":{"countdown":0,"prizes":"30,34,42","gravityY":500,"theme":6}} \ No newline at end of file diff --git a/assets/levels/map18.json b/assets/levels/map18.json new file mode 100644 index 0000000..ce8c24f --- /dev/null +++ b/assets/levels/map18.json @@ -0,0 +1 @@ +{"layers":[[{"className":"FinishZone","params":{"rotation":0,"x":8930,"height":500,"y":2380,"width":2168}},{"className":"frg.game.editor.objects::WaterShaper","params":{"x":7850,"id":-1,"vertices":[{"y":0,"x":0},{"y":0,"x":2005},{"y":520,"x":2010},{"y":520,"x":5}],"y":1956,"sf":true,"rotation":0,"bg":true,"density":1.5,"viscosity":1.5}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":1200,"vertices":[{"y":14,"x":-11},{"y":-31,"x":47},{"y":-65,"x":115},{"y":-83,"x":188},{"y":-82,"x":271},{"y":-68,"x":350},{"y":-41,"x":411},{"y":0,"x":471},{"y":65,"x":535},{"y":140,"x":578},{"y":211,"x":594},{"y":285,"x":602},{"y":357,"x":593},{"y":433,"x":566},{"y":497,"x":527},{"y":549,"x":480},{"y":592,"x":420},{"y":624,"x":351},{"y":641,"x":272},{"y":638,"x":187},{"y":622,"x":108},{"y":585,"x":42},{"y":533,"x":-17},{"y":474,"x":-68},{"y":395,"x":-105},{"y":303,"x":-125},{"y":220,"x":-120},{"y":138,"x":-97},{"y":67,"x":-61}],"y":13,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":true,"layer":3,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":0.7,"safeId":2}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-5230,"physic":false,"y":530,"vertices":[{"y":-5,"x":5170},{"y":15,"x":5895},{"y":-215,"x":6265},{"y":-210,"x":7145},{"y":510,"x":8155},{"y":625,"x":8360},{"y":1230,"x":9075},{"y":1320,"x":9370},{"y":1215,"x":9670},{"y":340,"x":10365},{"y":230,"x":11410},{"y":1550,"x":12455},{"y":1590,"x":12690},{"y":1570,"x":17305}],"snapToGrid":true,"shape":false,"cameraOffsetY":120,"lineId":-1,"textureMode":true,"straightSides":true,"direction":90,"originOffsetRatio":0,"stretchTexture":false,"directed":false,"repeatTexture":true,"width":12148,"rotation":0,"thick":128,"height":1818,"textureOffset":0,"camera":true,"wireframe":false,"smoothing":true,"isRoad":false,"line":false}},{"className":"OvalTemplate","params":{"rotation":0,"x":6000,"height":64.1,"y":790,"width":64.1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":4610,"vertices":[{"y":22,"x":-25},{"y":-40,"x":-48},{"y":-83,"x":-65},{"y":-146,"x":-86},{"y":-185,"x":-70},{"y":-250,"x":-8},{"y":-332,"x":76},{"y":-399,"x":175},{"y":-454,"x":276},{"y":-495,"x":410},{"y":-495,"x":930},{"y":-495,"x":1670},{"y":675,"x":2518},{"y":712,"x":2548},{"y":752,"x":2586},{"y":789,"x":2634},{"y":819,"x":2684},{"y":842,"x":2740},{"y":856,"x":2803},{"y":861,"x":2873},{"y":858,"x":2941},{"y":841,"x":3006},{"y":818,"x":3064},{"y":788,"x":3116},{"y":747,"x":3167},{"y":704,"x":3208},{"y":703,"x":3276},{"y":897,"x":3276},{"y":951,"x":3357},{"y":1005,"x":3452},{"y":1050,"x":3546},{"y":1096,"x":3672},{"y":1133,"x":3795},{"y":1161,"x":3943},{"y":1180,"x":4089},{"y":1188,"x":4374},{"y":1182,"x":4542},{"y":1176,"x":4635},{"y":1154,"x":4783},{"y":1118,"x":4902},{"y":1080,"x":5008},{"y":1003,"x":5188},{"y":669,"x":5185},{"y":665,"x":5231},{"y":707,"x":5304},{"y":736,"x":5371},{"y":751,"x":5442},{"y":747,"x":5505},{"y":731,"x":5567},{"y":710,"x":5611},{"y":674,"x":5655},{"y":630,"x":5694},{"y":572,"x":5728},{"y":504,"x":5747},{"y":432,"x":5747},{"y":374,"x":5737},{"y":251,"x":5686},{"y":184,"x":5647},{"y":138,"x":5607},{"y":81,"x":5548},{"y":33,"x":5493},{"y":-25,"x":5400},{"y":-67,"x":5326},{"y":-102,"x":5256},{"y":-149,"x":5142},{"y":-172,"x":5047},{"y":-173,"x":4988},{"y":-163,"x":4933},{"y":-148,"x":4883},{"y":-130,"x":4847},{"y":-105,"x":4811},{"y":-72,"x":4779},{"y":-36,"x":4752},{"y":-20,"x":4710},{"y":-25,"x":4640},{"y":-25,"x":4540},{"y":-40,"x":4490},{"y":-66,"x":4449},{"y":-141,"x":4429},{"y":-201,"x":4381},{"y":-236,"x":4310},{"y":-252,"x":4230},{"y":-234,"x":4072},{"y":-212,"x":3906},{"y":-174,"x":3742},{"y":-138,"x":3622},{"y":-74,"x":3478},{"y":-6,"x":3344},{"y":88,"x":3226},{"y":212,"x":3106},{"y":351,"x":3048},{"y":401,"x":3026},{"y":450,"x":2993},{"y":468,"x":2933},{"y":425,"x":2821},{"y":343,"x":2691},{"y":278,"x":2578},{"y":201,"x":2486},{"y":115,"x":2423},{"y":-16,"x":2358},{"y":-148,"x":2318},{"y":-256,"x":2253},{"y":-330,"x":2168},{"y":-361,"x":2086},{"y":-401,"x":2010},{"y":-460,"x":1991},{"y":-503,"x":2093},{"y":-560,"x":2162},{"y":-632,"x":2212},{"y":-730,"x":2240},{"y":-872,"x":2222},{"y":-1088,"x":2172},{"y":-1210,"x":2214},{"y":-2003,"x":2621},{"y":-2193,"x":3851},{"y":-1876,"x":7052},{"y":-1132,"x":8376},{"y":-196,"x":9348},{"y":2548,"x":10512},{"y":2785,"x":-1305},{"y":-395,"x":-4916},{"y":-830,"x":-4834},{"y":-725,"x":-4504},{"y":-710,"x":-4425},{"y":-701,"x":-4330},{"y":-697,"x":-4215},{"y":-703,"x":-4146},{"y":-727,"x":-4034},{"y":-760,"x":-3954},{"y":-798,"x":-3882},{"y":-848,"x":-3804},{"y":-898,"x":-3743},{"y":-965,"x":-3675},{"y":-1045,"x":-3615},{"y":-1045,"x":-2710},{"y":-270,"x":-1725},{"y":-220,"x":-1652},{"y":-200,"x":-1552},{"y":-198,"x":-1438},{"y":-205,"x":-1083},{"y":-219,"x":-1018},{"y":-242,"x":-949},{"y":-287,"x":-883},{"y":-332,"x":-842},{"y":-371,"x":-813},{"y":-379,"x":-781},{"y":-375,"x":-740},{"y":-364,"x":-702},{"y":-339,"x":-660},{"y":-312,"x":-636},{"y":-257,"x":-620},{"y":-207,"x":-629},{"y":-159,"x":-660},{"y":-113,"x":-718},{"y":-59,"x":-771},{"y":10,"x":-826},{"y":82,"x":-837},{"y":137,"x":-827},{"y":262,"x":-967},{"y":437,"x":-805},{"y":497,"x":-737},{"y":547,"x":-661},{"y":572,"x":-569},{"y":585,"x":-480},{"y":580,"x":-385},{"y":547,"x":-294},{"y":512,"x":-223},{"y":456,"x":-156},{"y":393,"x":-100},{"y":341,"x":-66},{"y":268,"x":-35},{"y":190,"x":-19},{"y":100,"x":-14}],"y":1230,"isStatic":true,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":2,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":-5080,"vertices":[{"y":500,"x":11915},{"y":465,"x":11825},{"y":420,"x":11740},{"y":405,"x":11630},{"y":420,"x":11535},{"y":470,"x":11465},{"y":525,"x":11410},{"y":600,"x":11340},{"y":644,"x":11220},{"y":664,"x":11056},{"y":684,"x":10900},{"y":632,"x":10748},{"y":456,"x":10444},{"y":388,"x":10268},{"y":344,"x":10092},{"y":353,"x":9988},{"y":404,"x":9880},{"y":473,"x":9791},{"y":542,"x":9733},{"y":637,"x":9657},{"y":706,"x":9588},{"y":757,"x":9522},{"y":797,"x":9462},{"y":822,"x":9411},{"y":830,"x":9352},{"y":800,"x":9300},{"y":770,"x":9265},{"y":702,"x":9270},{"y":646,"x":9293},{"y":587,"x":9315},{"y":541,"x":9328},{"y":488,"x":9335},{"y":441,"x":9337},{"y":393,"x":9335},{"y":348,"x":9324},{"y":304,"x":9310},{"y":256,"x":9286},{"y":193,"x":9245},{"y":154,"x":9200},{"y":113,"x":9138},{"y":79,"x":9064},{"y":65,"x":8989},{"y":67,"x":8898},{"y":83,"x":8821},{"y":115,"x":8748},{"y":156,"x":8691},{"y":204,"x":8646},{"y":261,"x":8605},{"y":319,"x":8578},{"y":375,"x":8564},{"y":431,"x":8555},{"y":494,"x":8555},{"y":552,"x":8565},{"y":617,"x":8587},{"y":673,"x":8620},{"y":716,"x":8657},{"y":755,"x":8715},{"y":800,"x":8720},{"y":840,"x":8691},{"y":874,"x":8665},{"y":890,"x":8620},{"y":930,"x":8555},{"y":985,"x":8440},{"y":975,"x":8340},{"y":950,"x":8260},{"y":915,"x":8165},{"y":880,"x":8085},{"y":805,"x":8040},{"y":700,"x":8020},{"y":620,"x":8045},{"y":550,"x":8040},{"y":500,"x":7985},{"y":463,"x":7907},{"y":473,"x":7820},{"y":464,"x":7765},{"y":450,"x":7711},{"y":415,"x":7652},{"y":345,"x":7601},{"y":277,"x":7537},{"y":250,"x":7494},{"y":227,"x":7444},{"y":207,"x":7374},{"y":192,"x":7308},{"y":181,"x":7222},{"y":142,"x":7097},{"y":97,"x":7011},{"y":50,"x":6955},{"y":-38,"x":6867},{"y":-97,"x":6782},{"y":-135,"x":6691},{"y":-154,"x":6604},{"y":-161,"x":6520},{"y":-152,"x":6435},{"y":-136,"x":6357},{"y":-113,"x":6289},{"y":-82,"x":6233},{"y":-42,"x":6173},{"y":1,"x":6126},{"y":42,"x":6080},{"y":95,"x":6040},{"y":149,"x":5989},{"y":178,"x":5934},{"y":220,"x":5832},{"y":232,"x":5748},{"y":266,"x":5686},{"y":316,"x":5636},{"y":365,"x":5575},{"y":395,"x":5495},{"y":415,"x":5430},{"y":420,"x":5375},{"y":440,"x":5325},{"y":470,"x":5275},{"y":510,"x":5225},{"y":560,"x":5195},{"y":610,"x":5175},{"y":685,"x":5170},{"y":580,"x":4835},{"y":-620,"x":5240},{"y":-1065,"x":11510},{"y":-525,"x":12520},{"y":25,"x":12160},{"y":170,"x":12100},{"y":260,"x":12075},{"y":330,"x":12105},{"y":405,"x":12080},{"y":460,"x":12030},{"y":490,"x":11980}],"y":-190,"isStatic":true,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":2,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":-1}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":9310,"vertices":[{"y":-91,"x":-31},{"y":-87,"x":-125},{"y":-93,"x":-171},{"y":-114,"x":-221},{"y":-136,"x":-255},{"y":-205,"x":-275},{"y":-264,"x":-323},{"y":-301,"x":-391},{"y":-315,"x":-468},{"y":-279,"x":-791},{"y":-252,"x":-901},{"y":-208,"x":-1064},{"y":-152,"x":-1195},{"y":-76,"x":-1354},{"y":19,"x":-1471},{"y":141,"x":-1588},{"y":332,"x":-1671},{"y":379,"x":-1697},{"y":395,"x":-1729},{"y":403,"x":-1764},{"y":394,"x":-1796},{"y":363,"x":-1880},{"y":314,"x":-1959},{"y":273,"x":-2019},{"y":239,"x":-2084},{"y":214,"x":-2125},{"y":141,"x":-2212},{"y":109,"x":-2236},{"y":62,"x":-2273},{"y":14,"x":-2302},{"y":-37,"x":-2323},{"y":-80,"x":-2347},{"y":-146,"x":-2370},{"y":-210,"x":-2388},{"y":-264,"x":-2417},{"y":-319,"x":-2451},{"y":-348,"x":-2481},{"y":-378,"x":-2517},{"y":-398,"x":-2539},{"y":-411,"x":-2583},{"y":-423,"x":-2618},{"y":-451,"x":-2663},{"y":-470,"x":-2693},{"y":-491,"x":-2707},{"y":-519,"x":-2709},{"y":-539,"x":-2698},{"y":-549,"x":-2668},{"y":-570,"x":-2621},{"y":-594,"x":-2586},{"y":-619,"x":-2556},{"y":-643,"x":-2533},{"y":-673,"x":-2510},{"y":-706,"x":-2489},{"y":-755,"x":-2475},{"y":-803,"x":-2464},{"y":-866,"x":-2471},{"y":-918,"x":-2476},{"y":-973,"x":-2484},{"y":-991,"x":-2498},{"y":-1010,"x":-2538},{"y":-1024,"x":-2565},{"y":-1046,"x":-2607},{"y":-1069,"x":-2651},{"y":-1076,"x":-2691},{"y":-1084,"x":-2736},{"y":-1082,"x":-2777},{"y":-1077,"x":-2813},{"y":-1069,"x":-2848},{"y":-1046,"x":-2891},{"y":-1009,"x":-2943},{"y":-964,"x":-2980},{"y":-892,"x":-3054},{"y":-866,"x":-3104},{"y":-845,"x":-3171},{"y":-825,"x":-3267},{"y":-811,"x":-3391},{"y":-805,"x":-3473},{"y":-816,"x":-3533},{"y":-836,"x":-3608},{"y":-862,"x":-3658},{"y":-895,"x":-3720},{"y":-931,"x":-3776},{"y":-972,"x":-3851},{"y":-1005,"x":-3903},{"y":-1037,"x":-3961},{"y":-1071,"x":-4045},{"y":-1099,"x":-4123},{"y":-1125,"x":-4213},{"y":-1144,"x":-4303},{"y":-1136,"x":-4404}],"y":1300,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":1612.25,"physic":true,"textureOffset":0,"shapeH":64,"width":4386,"snapToGrid":false,"action":0,"wireframe":false,"type":5,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}}],[{"className":"SignPillar","params":{"x":3090,"y":970,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"SignPillar","params":{"x":5270,"y":673,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"SignPillar","params":{"x":4452,"y":1596,"scaleX":1,"width":9.3,"rotation":-33,"scaleY":1,"height":128.35}},{"className":"Dec15","params":{"x":250,"y":410,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2}},{"className":"Dec16","params":{"x":620,"y":360,"scaleX":1,"width":176.2,"rotation":-18,"scaleY":1,"height":242.2}},{"className":"Dec13","params":{"x":2270,"y":330,"scaleX":1,"width":171.75,"rotation":48,"scaleY":1,"height":213.45}},{"className":"Dec16","params":{"x":2640,"y":620,"scaleX":1,"width":176.2,"rotation":42,"scaleY":1,"height":242.2}},{"className":"Dec29","params":{"rotation":0,"x":3060,"height":82.25,"y":1010,"width":63.15}},{"className":"Dec13","params":{"x":3780,"y":750,"scaleX":1,"width":171.75,"rotation":3,"scaleY":1,"height":213.45}},{"className":"Dec29","params":{"rotation":0,"x":5240,"height":82.25,"y":715,"width":63.15}},{"className":"Dec15","params":{"x":5880,"y":620,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2}},{"className":"Dec16","params":{"x":7630,"y":1940,"scaleX":1,"width":176.2,"rotation":-18,"scaleY":1,"height":242.2}},{"className":"Dec15","params":{"x":7510,"y":1970,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2}},{"className":"Dec14","params":{"x":7380,"y":1970,"scaleX":1,"width":165.85,"rotation":27,"scaleY":1,"height":244.8}},{"className":"Dec15","params":{"x":10200,"y":1810,"scaleX":1,"width":197,"rotation":-36,"scaleY":1,"height":234.2}},{"className":"Dec29","params":{"rotation":-42,"x":4456,"height":82.25,"y":1657,"width":63.15}},{"className":"Sign1","params":{"rotation":-30,"x":4410,"height":69.8,"y":1530,"width":68.8}}],[{"className":"GlassCrashed1","params":{"x":6307,"ttl":0.3,"y":453,"safeId":2,"width":66,"rotation":90.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":6566,"ttl":0.3,"y":740,"safeId":2,"width":66,"rotation":-7,"height":18}},{"className":"GlassCrashed1","params":{"x":6625,"ttl":0.3,"y":728,"safeId":2,"width":66,"rotation":-16,"height":18}},{"className":"GlassCrashed1","params":{"x":6682,"ttl":0.3,"y":703,"safeId":2,"width":66,"rotation":-31,"height":18}},{"className":"GlassCrashed1","params":{"x":6729,"ttl":0.3,"y":667,"safeId":2,"width":66,"rotation":-44,"height":18}},{"className":"GlassCrashed1","params":{"x":6768,"ttl":0.3,"y":620,"safeId":2,"width":66,"rotation":-56.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":6796,"ttl":0.3,"y":564,"safeId":2,"width":66,"rotation":-71.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":6808,"ttl":0.3,"y":504,"safeId":2,"width":66,"rotation":-86.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":6804,"ttl":0.3,"y":443,"safeId":2,"width":66,"rotation":-100.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":6786,"ttl":0.3,"y":384,"safeId":2,"width":66,"rotation":-113.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":6714,"ttl":0.3,"y":287,"safeId":2,"width":66,"rotation":-140,"height":18}},{"className":"GlassCrashed1","params":{"x":6755,"ttl":0.3,"y":331,"safeId":2,"width":66,"rotation":-126.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":6669,"ttl":0.3,"y":256,"safeId":2,"width":66,"rotation":-153,"height":18}},{"className":"GlassCrashed1","params":{"x":6552,"ttl":0.3,"y":228,"safeId":2,"width":66,"rotation":179,"height":18}},{"className":"GlassCrashed1","params":{"x":6492,"ttl":0.3,"y":237,"safeId":2,"width":66,"rotation":166,"height":18}},{"className":"GlassCrashed1","params":{"x":6435,"ttl":0.3,"y":259,"safeId":2,"width":66,"rotation":151.00000000000009,"height":18}},{"className":"GlassCrashed1","params":{"x":6613,"ttl":0.3,"y":235,"safeId":2,"width":66,"rotation":-166,"height":18}},{"className":"GlassCrashed1","params":{"x":6383,"ttl":0.3,"y":295,"safeId":2,"width":66,"rotation":138.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":6343,"ttl":0.3,"y":341,"safeId":2,"width":66,"rotation":123.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":6316,"ttl":0.3,"y":395,"safeId":2,"width":66,"rotation":109.00000000000006,"height":18}},{"className":"GlassCrashed0","params":{"x":6341,"ttl":0.3,"y":744,"safeId":2,"width":132,"rotation":0,"height":18}},{"className":"GlassCrashed0","params":{"x":6471,"ttl":0.3,"y":744,"safeId":2,"width":132,"rotation":0,"height":18}},{"className":"GeyserE","params":{"speed":1500,"x":3983,"id":-1,"y":1444,"safeId":1,"width":565,"rotation":-45,"height":128,"rate":1}},{"className":"GeyserE","params":{"speed":1500,"x":3888,"id":-1,"y":1352,"safeId":1,"width":565,"rotation":-45,"height":128,"rate":1}},{"className":"BoostE","params":{"x":10070,"y":1930,"force":6000,"safeId":-1,"width":100,"rotation":0,"height":99,"time":2}}],null,[{"className":"PlayerWP","params":{"rotation":0,"x":350,"height":32,"y":460,"width":64}},{"className":"SafePointE","params":{"x":3090,"id":1,"y":900,"width":128,"rotation":0,"height":624}},{"className":"SafePointE","params":{"x":5270,"id":2,"y":600,"width":128,"rotation":0,"height":1123}}],[{"className":"MotorJointE","params":{"x":1438,"useWeld":false,"y":290,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":12,"safeId":1,"snd":false,"rate":80}},{"className":"PivotJointE","params":{"x":1380,"id":12,"y":-50,"safeId":1,"width":17,"rotation":0,"graphic":0,"height":17}},{"className":"ToggleE","params":{"x":3860,"sndId":0,"y":-830,"safeId":1,"width":64,"rotation":0,"off":false,"id":0,"height":2108,"hint":-1,"id_off":-1}},{"className":"ToggleE","params":{"x":640,"sndId":-1,"y":280,"safeId":-1,"width":64,"rotation":0,"off":false,"id":12,"height":563,"hint":-1,"id_off":-1}}]],"settings":{"theme":3,"countdown":0,"gravityY":500,"prizes":"26,33,41"}} \ No newline at end of file diff --git a/assets/levels/map19.json b/assets/levels/map19.json new file mode 100644 index 0000000..e103512 --- /dev/null +++ b/assets/levels/map19.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"32,39,44","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":1,"vertices":[{"x":485,"y":-10,"length":485.1030818290067},{"x":980,"y":-5,"length":980.0127550190355},{"x":965,"y":95,"length":969.6648905678703},{"x":960,"y":135,"length":969.4457179233915},{"x":950,"y":165,"length":964.2224846994598},{"x":940,"y":210,"length":963.1718434422801},{"x":935,"y":240,"length":965.3108307690327},{"x":935,"y":270,"length":973.2034730723067},{"x":950,"y":305,"length":997.7599911802437},{"x":960,"y":335,"length":1016.7718524821584},{"x":975,"y":360,"length":1039.3387320792006},{"x":985,"y":395,"length":1061.2492638395563},{"x":990,"y":420,"length":1075.4068997360953},{"x":980,"y":450,"length":1078.3784122468328},{"x":980,"y":485,"length":1093.4463864314519},{"x":990,"y":535,"length":1125.3110681051705},{"x":994,"y":563,"length":1142.3681543180378},{"x":995,"y":600,"length":1161.9057620994915},{"x":980,"y":650,"length":1175.9676866308869},{"x":955,"y":700,"length":1184.0713660924328},{"x":925,"y":725,"length":1175.2659273543159},{"x":915,"y":760,"length":1189.4641650760227},{"x":900,"y":800,"length":1204.1594578792296},{"x":870,"y":845,"length":1212.8169688786516},{"x":870,"y":880,"length":1237.457069962429},{"x":890,"y":905,"length":1269.3009887335627},{"x":895,"y":940,"length":1297.9310459342591},{"x":880,"y":985,"length":1320.842534142507},{"x":875,"y":1015,"length":1340.0932803353653},{"x":880,"y":1045,"length":1366.1716583211642},{"x":880,"y":1080,"length":1393.12598138144},{"x":845,"y":1175,"length":1447.2905720690644},{"x":365,"y":945,"length":1013.0399794677404},{"x":460,"y":800,"length":922.8217596047463},{"x":475,"y":720,"length":862.5688378326682},{"x":475,"y":635,"length":793.0006305167733},{"x":475,"y":580,"length":749.6832664532402},{"x":460,"y":515,"length":690.5251624669444},{"x":460,"y":490,"length":672.0863039818621},{"x":470,"y":460,"length":657.6473218982952},{"x":490,"y":430,"length":651.9202405202649},{"x":500,"y":380,"length":628.0127387243033},{"x":520,"y":350,"length":626.8173577685927},{"x":530,"y":315,"length":616.5427803486145},{"x":530,"y":280,"length":599.4163828258284},{"x":525,"y":255,"length":583.6522937503116},{"x":515,"y":240,"length":568.1769090697017},{"x":500,"y":175,"length":529.7405025104273}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":-39,"plr":false,"line":true,"x":4380,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-260},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":1,"vertices":[{"x":485,"y":-10,"length":485.1030818290067},{"x":980,"y":-5,"length":980.0127550190355},{"x":965,"y":95,"length":969.6648905678703},{"x":960,"y":135,"length":969.4457179233915},{"x":950,"y":165,"length":964.2224846994598},{"x":940,"y":210,"length":963.1718434422801},{"x":935,"y":240,"length":965.3108307690327},{"x":935,"y":270,"length":973.2034730723067},{"x":950,"y":305,"length":997.7599911802437},{"x":960,"y":335,"length":1016.7718524821584},{"x":975,"y":360,"length":1039.3387320792006},{"x":985,"y":395,"length":1061.2492638395563},{"x":990,"y":420,"length":1075.4068997360953},{"x":980,"y":450,"length":1078.3784122468328},{"x":980,"y":485,"length":1093.4463864314519},{"x":985,"y":515,"length":1111.5079846766735},{"x":1005,"y":540,"length":1140.8878121883852},{"x":1020,"y":570,"length":1168.4605256490267},{"x":980,"y":630,"length":1165.0321883965266},{"x":485,"y":625,"length":791.1068195888594},{"x":460,"y":515,"length":690.5251624669444},{"x":460,"y":490,"length":672.0863039818621},{"x":470,"y":460,"length":657.6473218982952},{"x":490,"y":430,"length":651.9202405202649},{"x":500,"y":380,"length":628.0127387243033},{"x":520,"y":350,"length":626.8173577685927},{"x":530,"y":315,"length":616.5427803486145},{"x":530,"y":280,"length":599.4163828258284},{"x":525,"y":255,"length":583.6522937503116},{"x":515,"y":240,"length":568.1769090697017},{"x":500,"y":175,"length":529.7405025104273}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":1810,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-120},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":1,"vertices":[{"x":0,"y":0,"length":0},{"x":980,"y":-5,"length":980.0127550190355},{"x":965,"y":95,"length":969.6648905678703},{"x":960,"y":135,"length":969.4457179233915},{"x":950,"y":165,"length":964.2224846994598},{"x":940,"y":210,"length":963.1718434422801},{"x":935,"y":240,"length":965.3108307690327},{"x":935,"y":270,"length":973.2034730723067},{"x":950,"y":305,"length":997.7599911802437},{"x":960,"y":335,"length":1016.7718524821584},{"x":975,"y":360,"length":1039.3387320792006},{"x":985,"y":395,"length":1061.2492638395563},{"x":990,"y":420,"length":1075.4068997360953},{"x":980,"y":450,"length":1078.3784122468328},{"x":980,"y":485,"length":1093.4463864314519},{"x":985,"y":515,"length":1111.5079846766735},{"x":1005,"y":540,"length":1140.8878121883852},{"x":1020,"y":570,"length":1168.4605256490267},{"x":980,"y":630,"length":1165.0321883965266},{"x":0,"y":635,"length":635}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":20,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-160},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":202,"y":-48,"length":207.62466134830902},{"x":250,"y":-77,"length":261.5893728728291},{"x":289,"y":-106,"length":307.82624969290714},{"x":336,"y":-150,"length":367.9619545550871},{"x":377,"y":-197,"length":425.36807590603223},{"x":404,"y":-236,"length":467.8803265793508},{"x":428,"y":-280,"length":511.4528326248668},{"x":447,"y":-329,"length":555.0225220655465},{"x":460,"y":-377,"length":594.7512084897348},{"x":468,"y":-434,"length":638.2632685655661},{"x":469,"y":-485,"length":674.6747364471267},{"x":466,"y":-541,"length":714.0287109073416},{"x":455,"y":-600,"length":753.0106240950389},{"x":429,"y":-680,"length":804.0155471133627},{"x":393,"y":-745,"length":842.3027959113041},{"x":336,"y":-818,"length":884.3189469868889},{"x":215,"y":-900,"length":925.3242674868092},{"x":215,"y":-970,"length":993.5416448242116},{"x":377,"y":-945,"length":1017.4251815244205},{"x":472,"y":-888,"length":1005.6480497669153},{"x":642,"y":-714,"length":960.1874816930285},{"x":627,"y":-175,"length":650.963900688817},{"x":412,"y":-10,"length":412.1213413547034},{"x":297,"y":8,"length":297.1077245714086},{"x":202,"y":14,"length":202.48456731316588}],"density":0.4,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3419,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":410},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"sf":true,"bg":true,"x":330,"vertices":[{"x":0,"y":0,"length":0},{"x":5225,"y":-15,"length":5225.021531056116},{"x":5225,"y":360,"length":5237.387230289546},{"x":0,"y":375,"length":375}],"id":-1,"density":1.5,"viscosity":1.5,"y":460,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":6,"vertices":[{"x":139,"y":95,"length":168.36270370839262},{"x":168,"y":92,"length":191.54111830100607},{"x":194,"y":84,"length":211.40482492128697},{"x":218,"y":73,"length":229.8978033822855},{"x":240,"y":56,"length":246.4467488119898},{"x":261,"y":30,"length":262.7184805071771},{"x":278,"y":-1,"length":278.0017985553331},{"x":301,"y":-36,"length":303.14517974066484},{"x":331,"y":-42,"length":333.65401241405743},{"x":360,"y":-43,"length":362.5589607222527},{"x":564,"y":2,"length":564.0035460881429},{"x":407,"y":247,"length":476.0861266619728},{"x":374,"y":226,"length":436.9805487661894},{"x":343,"y":203,"length":398.56994367362927},{"x":319,"y":174,"length":363.3689584981084},{"x":301,"y":146,"length":334.53998266276034},{"x":289,"y":121,"length":313.3081550167502},{"x":279,"y":86,"length":291.95376346264146},{"x":175,"y":173,"length":246.07722365143832},{"x":75,"y":173,"length":188.55768348173987},{"x":-30,"y":130,"length":133.41664064126334},{"x":-35,"y":100,"length":105.94810050208545}],"density":1,"safeId":3,"physic":true,"rem":true,"rotation":-78,"plr":true,"line":true,"x":7601,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1123},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":2145,"y":50,"length":2145.5826714438203},{"x":5385,"y":-25,"length":5385.058031256488},{"x":6560,"y":-415,"length":6573.113797889095},{"x":7125,"y":-1070,"length":7204.895904869133},{"x":7680,"y":-1270,"length":7784.298298498074},{"x":8030,"y":-2185,"length":8321.966414255709},{"x":8855,"y":-2540,"length":9212.09123923553},{"x":9180,"y":-1460,"length":9295.37519414897},{"x":10228,"y":-1237,"length":10302.531387964804},{"x":13360,"y":-2175,"length":13535.886561285892}],"lineId":-1,"physic":false,"directed":false,"width":13375.7,"shape":false,"height":2665.55,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-250,"smoothing":true,"y":450,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"height":410.1,"x":9350,"y":-1280,"rotation":0,"width":410.1},"className":"OvalTemplate"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-20,"length":32.01562118716424},{"x":50,"y":-35,"length":61.032778078668514},{"x":80,"y":-45,"length":91.7877987534291},{"x":114,"y":-51,"length":124.88794977899188},{"x":157,"y":-53,"length":165.7045563646335},{"x":196,"y":-48,"length":201.79197209007103},{"x":232,"y":-32,"length":234.19649869287116},{"x":259,"y":-16,"length":259.4937378820537},{"x":286,"y":6,"length":286.0629301395062},{"x":310,"y":35,"length":311.96954979612997},{"x":330,"y":70,"length":337.34255586866},{"x":338,"y":95,"length":351.0968527343986},{"x":342,"y":130,"length":365.8742953529258},{"x":345,"y":160,"length":380.2959373961284},{"x":340,"y":198,"length":393.45139471096047},{"x":329,"y":229,"length":400.85159348566896},{"x":312,"y":264,"length":408.70527278223364},{"x":291,"y":290,"length":410.8296483945627},{"x":261,"y":314,"length":408.3099313021911},{"x":232,"y":335,"length":407.49110419737997},{"x":199,"y":349,"length":401.7486776580603},{"x":161,"y":356,"length":390.713449986048},{"x":123,"y":356,"length":376.64970463283254},{"x":86,"y":348,"length":358.4689665786984},{"x":57,"y":340,"length":344.7448331737548},{"x":27,"y":324,"length":325.123053627392},{"x":0,"y":302,"length":302},{"x":-23,"y":275,"length":275.9601420495358},{"x":-44,"y":242,"length":245.96747752497686},{"x":-53,"y":217,"length":223.37860237721964},{"x":-61,"y":189,"length":198.600100704909},{"x":-65,"y":155,"length":168.0773631397161},{"x":-63,"y":123,"length":138.19551367537227},{"x":-56,"y":89,"length":105.152270541344},{"x":-42,"y":59,"length":72.42237223399962},{"x":-22,"y":25,"length":33.301651610693426}],"density":1,"safeId":4,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":9210,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1432},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":243,"x":10150,"y":-1540,"rotation":0,"width":482},"className":"FinishZone"},{"params":{"height":356,"x":9740,"directed":false,"isPillar":false,"y":-1320,"thick":8,"direction":90,"snapToGrid":true,"vertices":[{"x":-175,"y":-10,"length":175.28548142958104},{"x":-90,"y":-10,"length":90.55385138137417},{"x":-3,"y":-7,"length":7.615773105863909},{"x":30,"y":-65,"length":71.58910531638176},{"x":60,"y":-125,"length":138.6542462386205},{"x":90,"y":-190,"length":210.23796041628637},{"x":125,"y":-255,"length":283.98943642325855},{"x":165,"y":-350,"length":386.9431482789171},{"x":250,"y":-345,"length":426.0575078554537},{"x":345,"y":-345,"length":487.9036790187178},{"x":435,"y":-345,"length":555.2026656996525},{"x":525,"y":-345,"length":628.2117477411578},{"x":590,"y":-345,"length":683.4654343856754},{"x":650,"y":-345,"length":735.8838223524145}],"rotation":0,"width":838},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":2,"vertices":[{"x":-140,"y":-1035,"length":1044.4256795004612},{"x":1070,"y":-2290,"length":2527.647127270735},{"x":6039,"y":-3144,"length":6808.396066622447},{"x":5620,"y":-2280,"length":6064.88252153329},{"x":5407,"y":-2249,"length":5856.078039097498},{"x":5288,"y":-2231,"length":5739.364511860176},{"x":5207,"y":-2209,"length":5656.193949998532},{"x":5132,"y":-2175,"length":5573.8719935068475},{"x":5091,"y":-2148,"length":5525.593633266927},{"x":5059,"y":-2117,"length":5484.083332700188},{"x":5028,"y":-2078,"length":5440.484169630494},{"x":5006,"y":-2043,"length":5406.836875660297},{"x":4988,"y":-2003,"length":5375.1421376555245},{"x":4978,"y":-1967,"length":5352.529588895329},{"x":4971,"y":-1926,"length":5331.070905549841},{"x":4968,"y":-1887,"length":5314.30080066983},{"x":4970,"y":-1849,"length":5302.801240853743},{"x":4976,"y":-1813,"length":5295.993296823553},{"x":4987,"y":-1772,"length":5292.46190350011},{"x":5002,"y":-1738,"length":5295.342104151535},{"x":5021,"y":-1704,"length":5302.26904258922},{"x":5044,"y":-1672,"length":5313.898757033296},{"x":5077,"y":-1638,"length":5334.695211537394},{"x":5124,"y":-1599,"length":5367.697551092088},{"x":5165,"y":-1576,"length":5400.092684389778},{"x":5217,"y":-1558,"length":5444.671982773618},{"x":5265,"y":-1549,"length":5488.135020204952},{"x":5321,"y":-1551,"length":5542.440076356262},{"x":5362,"y":-1564,"length":5585.4400005729185},{"x":5405,"y":-1576,"length":5630.0800171933615},{"x":5422,"y":-1557,"length":5641.128699116871},{"x":5431,"y":-1530,"length":5642.398514816195},{"x":5420,"y":-1494,"length":5622.138027476735},{"x":5394,"y":-1441,"length":5583.163708866148},{"x":5341,"y":-1390,"length":5518.911215085816},{"x":5315,"y":-1334,"length":5479.852279030886},{"x":5311,"y":-1254,"length":5457.035550553066},{"x":5328,"y":-1187,"length":5458.621895680264},{"x":5340,"y":-1117,"length":5455.574121941704},{"x":5340,"y":-1037,"length":5439.758174772111},{"x":5314,"y":-968,"length":5401.446102665471},{"x":5270,"y":-917,"length":5349.185825899115},{"x":5210,"y":-885,"length":5284.63101833988},{"x":5130,"y":-877,"length":5204.423983497117},{"x":5057,"y":-885,"length":5133.855666066197},{"x":4971,"y":-917,"length":5054.871907378069},{"x":4631,"y":-1070,"length":4753.005470226181},{"x":4520,"y":-1110,"length":4654.299087940095},{"x":4400,"y":-1142,"length":4545.785300693379},{"x":4320,"y":-1171,"length":4475.895552847497},{"x":4292,"y":-1034,"length":4414.795578506439},{"x":4344,"y":-1054,"length":4470.039373428382},{"x":4274,"y":-960,"length":4380.488100657277},{"x":4215,"y":-1054,"length":4344.783193670312},{"x":4262,"y":-1038,"length":4386.580444947978},{"x":4268,"y":-1178,"length":4427.58489472534},{"x":4180,"y":-1182,"length":4343.90653674777},{"x":4088,"y":-1175,"length":4253.51254847097},{"x":3980,"y":-1118,"length":4134.044508710568},{"x":3884,"y":-1047,"length":4022.6440309826075},{"x":3838,"y":-1058,"length":3981.1566158592655},{"x":3798,"y":-1054,"length":3941.5377709721365},{"x":3771,"y":-1018,"length":3905.990911407757},{"x":3771,"y":-947,"length":3888.0907911210097},{"x":3774,"y":-885,"length":3876.3773036173866},{"x":3718,"y":-882,"length":3821.1841096707185},{"x":3674,"y":-863,"length":3773.9958929495406},{"x":3640,"y":-840,"length":3735.6659379553735},{"x":3598,"y":-836,"length":3693.8462339409853},{"x":3538,"y":-826,"length":3633.141890980863},{"x":3489,"y":-813,"length":3582.4698184353206},{"x":3440,"y":-809,"length":3533.8479027824615},{"x":3393,"y":-796,"length":3485.1205144155347},{"x":3342,"y":-760,"length":3427.326071444035},{"x":3302,"y":-701,"length":3375.5895781329814},{"x":3281,"y":-609,"length":3337.040904753791},{"x":3262,"y":-545,"length":3307.214689130417},{"x":3230,"y":-478,"length":3265.177483690588},{"x":3170,"y":-424,"length":3198.2301355593536},{"x":3088,"y":-374,"length":3110.5658649191146},{"x":3020,"y":-345,"length":3039.6422486865126},{"x":2969,"y":-332,"length":2987.504811711606},{"x":2908,"y":-317,"length":2925.226999738653},{"x":2848,"y":-281,"length":2861.828960647369},{"x":2793,"y":-231,"length":2802.536351236144},{"x":2747,"y":-177,"length":2752.6964961651693},{"x":2692,"y":-162,"length":2696.8700376547627},{"x":2633,"y":-166,"length":2638.227624751132},{"x":2580,"y":-201,"length":2587.817806569852},{"x":2535,"y":-233,"length":2545.6853694044753},{"x":2510,"y":-254,"length":2522.8190581173276},{"x":2480,"y":-280,"length":2495.7563983690397},{"x":2460,"y":-301,"length":2478.346424533907},{"x":2446,"y":-330,"length":2468.1604485932435},{"x":2440,"y":-368,"length":2467.5947803478593},{"x":2438,"y":-436,"length":2476.6792283216655},{"x":2428,"y":-480,"length":2474.9917171578577},{"x":2414,"y":-527,"length":2470.8551151372676},{"x":2387,"y":-568,"length":2453.648915391116},{"x":2345,"y":-600,"length":2420.5422946108583},{"x":2272,"y":-682,"length":2372.152608918743},{"x":2210,"y":-752,"length":2334.4386905635365},{"x":2125,"y":-812,"length":2274.855819607036},{"x":2058,"y":-825,"length":2217.202967705032},{"x":1930,"y":-842,"length":2105.6742388128323},{"x":1848,"y":-834,"length":2027.476263732821},{"x":1801,"y":-808,"length":1973.9465544943207},{"x":1745,"y":-767,"length":1906.1253893697549},{"x":1624,"y":-687,"length":1763.3334908632569},{"x":1478,"y":-622,"length":1603.5485649022296},{"x":1376,"y":-590,"length":1497.155970498732},{"x":1258,"y":-544,"length":1370.5838172107535},{"x":1158,"y":-488,"length":1256.6256403559494},{"x":1006,"y":-396,"length":1081.1345892163472},{"x":882,"y":-346,"length":947.4386523675292},{"x":778,"y":-308,"length":836.7484687766091},{"x":668,"y":-292,"length":729.0322352269479},{"x":566,"y":-278,"length":630.5870280936645},{"x":457,"y":-258,"length":524.79805639884},{"x":350,"y":-217,"length":411.8118502423164},{"x":292,"y":-160,"length":332.9624603465081},{"x":261,"y":-77,"length":272.12129648375554},{"x":252,"y":2,"length":252.00793638296395},{"x":1760,"y":0,"length":1760},{"x":1776,"y":24,"length":1776.1621547595253},{"x":1760,"y":65,"length":1761.1998750851649},{"x":1728,"y":85,"length":1730.0893040534063},{"x":1692,"y":110,"length":1695.5718799272415},{"x":1656,"y":132,"length":1661.252539501445},{"x":1582,"y":167,"length":1590.7900552869949},{"x":1480,"y":180,"length":1490.9057649630308},{"x":1396,"y":187,"length":1408.469026993494},{"x":1315,"y":183,"length":1327.672399351587},{"x":1232,"y":174,"length":1244.2266674525185},{"x":1168,"y":148,"length":1177.33937333294},{"x":1089,"y":105,"length":1094.0502730679245},{"x":1041,"y":93,"length":1045.1459228260903},{"x":1001,"y":94,"length":1005.4038989381332},{"x":951,"y":113,"length":957.6899289436012},{"x":892,"y":123,"length":900.4404477809735},{"x":817,"y":107,"length":823.9769414249406},{"x":755,"y":101,"length":761.7256724044424},{"x":695,"y":95,"length":701.4627573863063},{"x":645,"y":100,"length":652.7059062089143},{"x":595,"y":120,"length":606.9802303205599},{"x":565,"y":145,"length":583.3095233235953},{"x":540,"y":180,"length":569.2099788303083},{"x":540,"y":235,"length":588.9185003037347},{"x":570,"y":275,"length":632.8704448779387},{"x":600,"y":295,"length":668.5992820815769},{"x":640,"y":310,"length":711.125867902441},{"x":725,"y":300,"length":784.6177413237608},{"x":785,"y":285,"length":835.1347196710241},{"x":865,"y":280,"length":909.1891992319311},{"x":945,"y":290,"length":988.4963328207141},{"x":1020,"y":293,"length":1061.2487926966041},{"x":1082,"y":304,"length":1123.895012890439},{"x":1125,"y":330,"length":1172.4013817801479},{"x":1175,"y":371,"length":1232.1793700594083},{"x":1227,"y":406,"length":1292.4260133562773},{"x":1301,"y":425,"length":1368.6584672590895},{"x":1427,"y":438,"length":1492.7066021157675},{"x":1543,"y":430,"length":1601.7955549944568},{"x":1733,"y":398,"length":1778.1150131529737},{"x":1833,"y":370,"length":1869.9703206200895},{"x":1940,"y":358,"length":1972.7554333976627},{"x":2044,"y":356,"length":2074.770348737421},{"x":2143,"y":338,"length":2169.4914150556115},{"x":2238,"y":293,"length":2257.0983585125396},{"x":2298,"y":230,"length":2309.4813270515956},{"x":2313,"y":186,"length":2320.4665479166038},{"x":2328,"y":139,"length":2332.14600743607},{"x":2321,"y":85,"length":2322.5559196712575},{"x":2329,"y":59,"length":2329.74719658593},{"x":2373,"y":29,"length":2373.1771952384847},{"x":2512,"y":20,"length":2512.0796165726915},{"x":2722,"y":-6,"length":2722.0066127766845},{"x":2866,"y":-2,"length":2866.0006978366214},{"x":3015,"y":33,"length":3015.180591606413},{"x":3175,"y":55,"length":3175.4763422201713},{"x":3321,"y":48,"length":3321.3468653544755},{"x":3463,"y":17,"length":3463.041726575064},{"x":3565,"y":-1,"length":3565.0001402524517},{"x":3648,"y":-5,"length":3648.0034265334784},{"x":3697,"y":-6,"length":3697.0048688093448},{"x":3738,"y":-24,"length":3738.077045754943},{"x":3740,"y":14,"length":3740.0262031167645},{"x":3763,"y":32,"length":3763.136059193183},{"x":3823,"y":40,"length":3823.2092540168396},{"x":3985,"y":12,"length":3985.018067713119},{"x":3998,"y":43,"length":3998.2312339333253},{"x":3988,"y":78,"length":3988.762715429435},{"x":3955,"y":118,"length":3956.7599118470657},{"x":3891,"y":141,"length":3893.553903569334},{"x":3837,"y":154,"length":3840.089191672506},{"x":3778,"y":150,"length":3780.9765934213347},{"x":3720,"y":131,"length":3722.3058713652213},{"x":3641,"y":123,"length":3643.0769961668393},{"x":3589,"y":118,"length":3590.939292162985},{"x":3529,"y":120,"length":3531.039648602094},{"x":3431,"y":136,"length":3433.6943661310333},{"x":3340,"y":158,"length":3343.7350373497},{"x":3274,"y":182,"length":3279.054741842533},{"x":3190,"y":184,"length":3195.3021766336906},{"x":3096,"y":168,"length":3100.5547890659827},{"x":3003,"y":138,"length":3006.1691569171553},{"x":2941,"y":129,"length":2943.827780288786},{"x":2901,"y":136,"length":2904.186116625448},{"x":2881,"y":165,"length":2885.7210537402952},{"x":2854,"y":212,"length":2861.8630295665794},{"x":2843,"y":289,"length":2857.651133361104},{"x":2865,"y":360,"length":2887.529220631369},{"x":2901,"y":387,"length":2926.699506269819},{"x":2952,"y":400,"length":2978.977005617868},{"x":3020,"y":400,"length":3046.3748948545385},{"x":3140,"y":375,"length":3162.3132355919456},{"x":3245,"y":345,"length":3263.2882189595207},{"x":3340,"y":330,"length":3356.2628025826584},{"x":3470,"y":335,"length":3486.1332447283194},{"x":3565,"y":355,"length":3582.631714256993},{"x":3645,"y":375,"length":3664.239348077579},{"x":3750,"y":390,"length":3770.2254574494614},{"x":3855,"y":400,"length":3875.6967115603875},{"x":4020,"y":400,"length":4039.8514824186295},{"x":4175,"y":390,"length":4193.176003937827},{"x":4340,"y":365,"length":4355.321457711245},{"x":4615,"y":315,"length":4625.737778992666},{"x":4835,"y":265,"length":4842.256705297645},{"x":4960,"y":214,"length":4964.614385830988},{"x":5074,"y":154,"length":5076.3364742696085},{"x":5178,"y":76,"length":5178.557714267555},{"x":5268,"y":-16,"length":5268.024297590132},{"x":5332,"y":-128,"length":5333.536162809811},{"x":5378,"y":-254,"length":5383.9947994031345},{"x":5425,"y":-323,"length":5434.607069512937},{"x":5512,"y":-378,"length":5524.945972586519},{"x":5587,"y":-396,"length":5601.016425614193},{"x":5696,"y":-400,"length":5710.027670686019},{"x":5828,"y":-364,"length":5839.356128889554},{"x":5957,"y":-311,"length":5965.1127399236975},{"x":6033,"y":-290,"length":6039.965976725365},{"x":6109,"y":-285,"length":6115.644365068983},{"x":6185,"y":-288,"length":6191.701623947975},{"x":6253,"y":-296,"length":6260.001996804794},{"x":6326,"y":-317,"length":6333.9375588965195},{"x":6392,"y":-350,"length":6401.575118671966},{"x":6461,"y":-394,"length":6473.002162829856},{"x":6526,"y":-445,"length":6541.154408818064},{"x":6572,"y":-496,"length":6590.690403895483},{"x":6621,"y":-565,"length":6645.063280360842},{"x":6667,"y":-656,"length":6699.195847264058},{"x":6692,"y":-737,"length":6732.461139880423},{"x":6700,"y":-798,"length":6747.355333758554},{"x":6702,"y":-872,"length":6758.490068055142},{"x":6697,"y":-956,"length":6764.890612567213},{"x":6682,"y":-1020,"length":6759.402636328154},{"x":6660,"y":-1088,"length":6748.284522750949},{"x":6637,"y":-1132,"length":6732.844346930946},{"x":6635,"y":-1154,"length":6734.607709436385},{"x":6650,"y":-1181,"length":6754.055152277037},{"x":6681,"y":-1199,"length":6787.736146904946},{"x":6727,"y":-1200,"length":6833.193177424446},{"x":6800,"y":-1183,"length":6902.136553271023},{"x":6858,"y":-1170,"length":6957.087321573591},{"x":6942,"y":-1156,"length":7037.5919176945745},{"x":7048,"y":-1152,"length":7141.527007580382},{"x":7173,"y":-1150,"length":7264.601090218237},{"x":7287,"y":-1156,"length":7378.1234063954225},{"x":7347,"y":-1165,"length":7438.792509540779},{"x":7400,"y":-1181,"length":7493.6480435099165},{"x":7455,"y":-1205,"length":7551.758073455479},{"x":7503,"y":-1237,"length":7604.286817315612},{"x":7544,"y":-1274,"length":7650.817734072613},{"x":7576,"y":-1305,"length":7687.574454923998},{"x":7607,"y":-1344,"length":7724.816179042709},{"x":7631,"y":-1383,"length":7755.311083380215},{"x":7650,"y":-1416,"length":7779.94575816567},{"x":7664,"y":-1456,"length":7801.0788997420095},{"x":7677,"y":-1506,"length":7823.3218647835265},{"x":7682,"y":-1584,"length":7843.607588348616},{"x":7674,"y":-1670,"length":7853.609106646447},{"x":7628,"y":-1977,"length":7880.032550694191},{"x":7623,"y":-2020,"length":7886.097196966317},{"x":7625,"y":-2060,"length":7898.368502418712},{"x":7635,"y":-2095,"length":7917.212261901281},{"x":7648,"y":-2127,"length":7938.263853009675},{"x":7667,"y":-2155,"length":7964.1015814716975},{"x":7695,"y":-2188,"length":8000.023062466757},{"x":7726,"y":-2214,"length":8036.969080443199},{"x":7763,"y":-2236,"length":8078.605387070222},{"x":7799,"y":-2248,"length":8116.520498341639},{"x":7863,"y":-2264,"length":8182.44859440009},{"x":7955,"y":-2282,"length":8275.841286539997},{"x":8057,"y":-2297,"length":8378.034256315737},{"x":8162,"y":-2315,"length":8483.95361844936},{"x":8262,"y":-2342,"length":8587.526302725366},{"x":8333,"y":-2364,"length":8661.834967257226},{"x":8404,"y":-2393,"length":8738.058422784778},{"x":8446,"y":-2428,"length":8788.065771260477},{"x":8475,"y":-2476,"length":8829.280888045187},{"x":8495,"y":-2526,"length":8862.601254710718},{"x":8514,"y":-2592,"length":8899.81235757249},{"x":8527,"y":-2638,"length":8925.736552240382},{"x":8547,"y":-2674,"length":8955.528180961746},{"x":8590,"y":-2712,"length":9007.943383481048},{"x":8643,"y":-2729,"length":9063.60248466359},{"x":8688,"y":-2721,"length":9104.130106715304},{"x":8744,"y":-2686,"length":9147.247236190788},{"x":9057,"y":-2317,"length":9348.675735097459},{"x":9113,"y":-2293,"length":9397.053687193662},{"x":9200,"y":-2271,"length":9476.151170174524},{"x":9295,"y":-2262,"length":9566.277698248154},{"x":9360,"y":-2248,"length":9626.16766943107},{"x":9411,"y":-2211,"length":9667.235489011324},{"x":9420,"y":-2164,"length":9665.365797526754},{"x":9397,"y":-2115,"length":9632.073193243497},{"x":9304,"y":-2062,"length":9529.756555127733},{"x":9226,"y":-2015,"length":9443.479284670455},{"x":9151,"y":-1948,"length":9356.04109653223},{"x":9088,"y":-1888,"length":9282.041154832272},{"x":9042,"y":-1833,"length":9225.922880666194},{"x":9013,"y":-1760,"length":9183.233036354897},{"x":9004,"y":-1682,"length":9159.756546983113},{"x":9036,"y":-1544,"length":9166.964164869414},{"x":9087,"y":-1472,"length":9205.452351731554},{"x":9185,"y":-1397,"length":9290.631517824824},{"x":9731,"y":-1291,"length":9816.26415699985},{"x":9719,"y":-1238,"length":9797.530556216705},{"x":10127,"y":-1155,"length":10192.651961094325},{"x":10137,"y":-1206,"length":10208.486910409398},{"x":10808,"y":-1064,"length":10860.246774360148},{"x":12605,"y":-1740,"length":12724.52847849381},{"x":12605,"y":205,"length":12606.666887008636},{"x":8457,"y":180,"length":8458.915356001618},{"x":5490,"y":875,"length":5559.2917714399555},{"x":-250,"y":900,"length":934.0770846134702},{"x":-158,"y":132,"length":205.8834621818858}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-150,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":390},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":63,"x":9350,"directed":true,"isPillar":true,"y":-1280,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-50,"length":50},{"x":75,"y":-50,"length":90.13878188659973},{"x":150,"y":-50,"length":158.11388300841898},{"x":220,"y":-50,"length":225.61028345356956}],"rotation":0,"width":233},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-20,"length":32.01562118716424},{"x":50,"y":-35,"length":61.032778078668514},{"x":80,"y":-45,"length":91.7877987534291},{"x":114,"y":-51,"length":124.88794977899188},{"x":157,"y":-53,"length":165.7045563646335},{"x":196,"y":-48,"length":201.79197209007103},{"x":232,"y":-32,"length":234.19649869287116},{"x":259,"y":-16,"length":259.4937378820537},{"x":286,"y":6,"length":286.0629301395062},{"x":310,"y":35,"length":311.96954979612997},{"x":330,"y":70,"length":337.34255586866},{"x":338,"y":95,"length":351.0968527343986},{"x":342,"y":130,"length":365.8742953529258},{"x":345,"y":160,"length":380.2959373961284},{"x":340,"y":198,"length":393.45139471096047},{"x":329,"y":229,"length":400.85159348566896},{"x":312,"y":264,"length":408.70527278223364},{"x":291,"y":290,"length":410.8296483945627},{"x":261,"y":314,"length":408.3099313021911},{"x":232,"y":335,"length":407.49110419737997},{"x":199,"y":349,"length":401.7486776580603},{"x":161,"y":356,"length":390.713449986048},{"x":123,"y":356,"length":376.64970463283254},{"x":86,"y":348,"length":358.4689665786984},{"x":57,"y":340,"length":344.7448331737548},{"x":27,"y":324,"length":325.123053627392},{"x":0,"y":302,"length":302},{"x":-23,"y":275,"length":275.9601420495358},{"x":-44,"y":242,"length":245.96747752497686},{"x":-53,"y":217,"length":223.37860237721964},{"x":-61,"y":189,"length":198.600100704909},{"x":-65,"y":155,"length":168.0773631397161},{"x":-63,"y":123,"length":138.19551367537227},{"x":-56,"y":89,"length":105.152270541344},{"x":-42,"y":59,"length":72.42237223399962},{"x":-22,"y":25,"length":33.301651610693426}],"density":1,"safeId":4,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":10000,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2032},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-20,"length":32.01562118716424},{"x":50,"y":-35,"length":61.032778078668514},{"x":80,"y":-45,"length":91.7877987534291},{"x":114,"y":-51,"length":124.88794977899188},{"x":157,"y":-53,"length":165.7045563646335},{"x":196,"y":-48,"length":201.79197209007103},{"x":232,"y":-32,"length":234.19649869287116},{"x":259,"y":-16,"length":259.4937378820537},{"x":286,"y":6,"length":286.0629301395062},{"x":310,"y":35,"length":311.96954979612997},{"x":330,"y":70,"length":337.34255586866},{"x":338,"y":95,"length":351.0968527343986},{"x":342,"y":130,"length":365.8742953529258},{"x":345,"y":160,"length":380.2959373961284},{"x":340,"y":198,"length":393.45139471096047},{"x":329,"y":229,"length":400.85159348566896},{"x":312,"y":264,"length":408.70527278223364},{"x":291,"y":290,"length":410.8296483945627},{"x":261,"y":314,"length":408.3099313021911},{"x":232,"y":335,"length":407.49110419737997},{"x":199,"y":349,"length":401.7486776580603},{"x":161,"y":356,"length":390.713449986048},{"x":123,"y":356,"length":376.64970463283254},{"x":86,"y":348,"length":358.4689665786984},{"x":57,"y":340,"length":344.7448331737548},{"x":27,"y":324,"length":325.123053627392},{"x":0,"y":302,"length":302},{"x":-23,"y":275,"length":275.9601420495358},{"x":-44,"y":242,"length":245.96747752497686},{"x":-53,"y":217,"length":223.37860237721964},{"x":-61,"y":189,"length":198.600100704909},{"x":-65,"y":155,"length":168.0773631397161},{"x":-63,"y":123,"length":138.19551367537227},{"x":-56,"y":89,"length":105.152270541344},{"x":-42,"y":59,"length":72.42237223399962},{"x":-22,"y":25,"length":33.301651610693426}],"density":1,"safeId":4,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":9990,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2450},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":868,"x":9740,"directed":false,"isPillar":false,"y":-1320,"thick":8,"direction":90,"snapToGrid":true,"vertices":[{"x":650,"y":-345,"length":735.8838223524145},{"x":650,"y":-290,"length":711.7583859709698},{"x":650,"y":-205,"length":681.5607089614248},{"x":650,"y":-100,"length":657.6473218982952},{"x":600,"y":-100,"length":608.276253029822},{"x":505,"y":-100,"length":514.8057886232439},{"x":475,"y":-30,"length":475.94642555649057},{"x":450,"y":25,"length":450.6939094329987},{"x":425,"y":85,"length":433.4166586553867},{"x":395,"y":155,"length":424.3229901855425},{"x":360,"y":240,"length":432.6661530556787},{"x":330,"y":315,"length":456.20718977236646},{"x":300,"y":390,"length":492.03658400570174},{"x":275,"y":450,"length":527.3755777432247},{"x":250,"y":510,"length":567.9788728465171}],"rotation":0,"width":413},"className":"frg.game.editor.objects::BonesPather"}],[{"params":{"height":128.35,"x":7534,"y":-1862,"rotation":-24,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":6490,"y":-860,"rotation":-36,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":6444,"y":-912,"rotation":42,"width":68.8},"className":"Sign1"},{"params":{"height":69.8,"x":7500,"y":-1930,"rotation":156,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":3040,"y":380,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":6000,"y":39,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":6960,"y":-828,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":8034,"y":-1993,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":3000,"y":394,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":79.6,"x":6480,"y":-820,"rotation":-42,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":7510,"y":-1830,"rotation":-39,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":79.6,"x":8070,"y":-1974,"rotation":0,"scaleX":-1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":6040,"y":50,"rotation":0,"scaleX":-1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":95.5,"x":7000,"y":-811,"rotation":0,"scaleX":-1,"scaleY":1,"width":80.2},"className":"Dec24"}],[{"params":{"rate":1,"height":128,"x":1531,"id":-1,"rotation":-90,"safeId":-1,"speed":1300,"y":327,"width":128},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":3840,"id":-1,"rotation":54,"safeId":1,"speed":1000,"y":-610,"width":206},"className":"GeyserE"},{"params":{"height":99,"force":6000,"y":-590,"rotation":0,"safeId":2,"x":6490,"time":2,"width":100},"className":"BoostE"},{"params":{"rate":1,"height":128,"x":9709,"id":-1,"rotation":-158,"safeId":4,"speed":1000,"y":-1696,"width":381},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":9650,"id":-1,"rotation":-158,"safeId":4,"speed":1000,"y":-1580,"width":381},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":9591,"id":-1,"rotation":-158,"safeId":4,"speed":1000,"y":-1464,"width":381},"className":"GeyserE"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9601,"id":4,"count":12,"radius":64,"y":-871,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9651,"id":4,"count":12,"radius":64,"y":-860,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9753,"id":4,"count":12,"radius":64,"y":-839,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9702,"id":4,"count":12,"radius":64,"y":-849,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9854,"id":4,"count":12,"radius":64,"y":-819,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9803,"id":4,"count":12,"radius":64,"y":-829,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9906,"id":4,"count":12,"radius":64,"y":-809,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":4,"physic":true,"impulse":10000,"rotation":12,"height":53.2,"x":9956,"id":4,"count":12,"radius":64,"y":-798,"width":53.2},"className":"Tnt1"}],null,[{"params":{"height":32,"x":340,"y":320,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1022,"x":3040,"y":310,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":1509,"x":6000,"y":-30,"width":128,"id":2,"rotation":0},"className":"SafePointE"},{"params":{"height":4635,"x":6960,"y":-910,"width":128,"id":3,"rotation":0},"className":"SafePointE"},{"params":{"height":1294,"x":8030,"y":-2060,"width":128,"id":4,"rotation":0},"className":"SafePointE"}],[{"params":{"safeId":3,"rotation":0,"rate":60,"height":17,"x":7730,"id":2,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":-1630,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":3640,"id":1,"rotation":0,"safeId":1,"graphic":0,"y":370,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3740,"id":1,"rotation":0,"safeId":1,"graphic":0,"y":-460,"width":17},"className":"PivotJointE"},{"params":{"height":788,"hint":-1,"id":1,"rotation":0,"safeId":1,"x":3670,"off":false,"id_off":-1,"y":0,"width":134,"sndId":-1},"className":"ToggleE"},{"params":{"height":123,"hint":-1,"id":2,"rotation":0,"safeId":3,"x":7520,"off":false,"id_off":-1,"y":-1250,"width":889,"sndId":-1},"className":"ToggleE"},{"params":{"height":456,"hint":-1,"id":4,"rotation":15,"safeId":4,"x":9790,"off":false,"id_off":-1,"y":-1010,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":7720,"id":2,"rotation":0,"safeId":3,"graphic":0,"y":-1110,"width":17},"className":"PivotJointE"},{"params":{"safeId":4,"rotation":0,"rate":180,"height":17,"x":9350,"id":51,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":-1280,"width":17},"className":"MotorJointE"},{"params":{"height":2039,"hint":-1,"id":51,"rotation":0,"safeId":4,"x":8140,"off":false,"id_off":-1,"y":-2280,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":4,"rotation":0,"rate":180,"height":17,"x":10140,"id":51,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":-1880,"width":17},"className":"MotorJointE"},{"params":{"safeId":4,"rotation":0,"rate":180,"height":17,"x":10130,"id":51,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":-2298,"width":17},"className":"MotorJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map2.json b/assets/levels/map2.json new file mode 100644 index 0000000..72a2b59 --- /dev/null +++ b/assets/levels/map2.json @@ -0,0 +1 @@ +{"settings":{"countdown":0,"gravityY":500,"theme":3,"prizes":"26,35,44"},"layers":[[{"params":{"shapeH":19,"type":1,"textureOffset":0,"vertices":[{"x":-5,"y":-1,"length":5.0990195135927845},{"x":179,"y":-21,"length":180.22763384120648},{"x":261,"y":-34,"length":263.20524310887123},{"x":339,"y":-50,"length":342.6674773012461},{"x":419,"y":-75,"length":425.6594883237069},{"x":499,"y":-108,"length":510.5536210820564},{"x":559,"y":-138,"length":575.7820768311567},{"x":614,"y":-168,"length":636.5689279253269},{"x":663,"y":-200,"length":692.5092057149855},{"x":721,"y":-167,"length":740.0878326252905},{"x":792,"y":-127,"length":802.1178217693458},{"x":871,"y":-92,"length":875.8453059758898},{"x":937,"y":-67,"length":939.3923567924107},{"x":997,"y":-50,"length":998.2529739499903},{"x":1060,"y":-34,"length":1060.5451428392853},{"x":1130,"y":-22,"length":1130.2141390019858},{"x":1210,"y":-16,"length":1210.1057805002008},{"x":1323,"y":-8,"length":1323.0241872316622}],"density":"1","textureMode":true,"straightSides":true,"snapToGrid":false,"width":1341,"originOffsetRatio":0,"height":219.55,"stretchTexture":false,"isStatic":true,"physic":true,"id":-1,"rotation":0,"repeatTexture":true,"safeId":-1,"x":8430,"graphic":true,"smoothing":true,"y":-1450,"action":0,"wireframe":false},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"height":542,"x":12770,"y":-1470,"rotation":0,"width":1172},"className":"FinishZone"},{"params":{"isWheel":false,"ignore":false,"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":505,"y":0,"length":505},{"x":505,"y":305,"length":589.9576255969577},{"x":405,"y":305,"length":507.0009861923347},{"x":405,"y":105,"length":418.3897704294406},{"x":100,"y":105,"length":145},{"x":100,"y":310,"length":325.7299494980466},{"x":0,"y":310,"length":310}],"density":1,"graphic":true,"rotation":0,"line":true,"x":5730,"safeId":-1,"physic":true,"y":-1150,"rem":true,"plr":false,"isStatic":true,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"isWheel":false,"ignore":false,"layer":2,"vertices":[{"x":-2835,"y":-235,"length":2844.7231851271576},{"x":-2115,"y":-226,"length":2127.040432149798},{"x":-1944,"y":-71,"length":1945.2961214169939},{"x":-760,"y":-70,"length":763.2168761236874},{"x":-760,"y":0,"length":760},{"x":1120,"y":0,"length":1120},{"x":1149,"y":-8,"length":1149.0278499670928},{"x":1180,"y":-20,"length":1180.1694793545544},{"x":1208,"y":-41,"length":1208.6955778855154},{"x":1233,"y":-67,"length":1234.819015078728},{"x":1250,"y":-94,"length":1253.52941728545},{"x":1260,"y":-123,"length":1265.9893364479813},{"x":1267,"y":-154,"length":1276.324801921517},{"x":1266,"y":-185,"length":1279.4455830554107},{"x":1258,"y":-221,"length":1277.264655425805},{"x":1242,"y":-256,"length":1268.1088281373961},{"x":965,"y":-635,"length":1155.1839680327978},{"x":965,"y":-660,"length":1169.1129115701358},{"x":980,"y":-660,"length":1181.5244390193543},{"x":980,"y":-645,"length":1173.2114046496479},{"x":1025,"y":-645,"length":1211.053260595916},{"x":1025,"y":-1345,"length":1691.0499696933855},{"x":2250,"y":-1335,"length":2616.2425346286227},{"x":2410,"y":-1230,"length":2705.7346507002494},{"x":3945,"y":-1235,"length":4133.793657162873},{"x":4645,"y":-1855,"length":5001.7047093965875},{"x":8285,"y":-1855,"length":8490.126618608228},{"x":8285,"y":-1805,"length":8479.342545268471},{"x":8340,"y":-1805,"length":8533.090003041103},{"x":8340,"y":-1840,"length":8540.562042395102},{"x":8805,"y":-1840,"length":8995.200108946994},{"x":8805,"y":-1786,"length":8984.309711936694},{"x":8859,"y":-1786,"length":9037.238350292639},{"x":8860,"y":-1825,"length":9046.00602476032},{"x":9325,"y":-1825,"length":9501.907703193081},{"x":9325,"y":-1771,"length":9491.684044467556},{"x":9378,"y":-1771,"length":9543.758431561437},{"x":9379,"y":-1809,"length":9551.864844102432},{"x":10690,"y":-1810,"length":10842.149233431534},{"x":9925,"y":430,"length":9934.310494442983},{"x":2050,"y":320,"length":2074.8252938500627},{"x":-2710,"y":330,"length":2730.0183149568797},{"x":-2710,"y":145,"length":2713.8763789089585}],"density":1,"graphic":true,"rotation":0,"line":true,"x":2525,"safeId":-1,"physic":true,"y":392,"rem":true,"plr":false,"isStatic":true,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"vertices":[{"x":-15,"y":-95,"length":96.17692030835673},{"x":2165,"y":-20,"length":2165.0923767821087},{"x":4105,"y":-15,"length":4105.027405511442},{"x":4285,"y":-210,"length":4290.14277151705},{"x":4625,"y":-1205,"length":4779.398497719143},{"x":4745,"y":-1310,"length":4922.5120619456075},{"x":5255,"y":-1310,"length":5415.821728971514},{"x":6485,"y":-1320,"length":6617.977410055129},{"x":7670,"y":-1815,"length":7881.822441542311},{"x":9032,"y":-1821,"length":9213.743267532474},{"x":9490,"y":-2045,"length":9707.838327866817},{"x":10075,"y":-1830,"length":10239.849852414829},{"x":13115,"y":-1815,"length":13239.99433534622}],"shape":false,"camera":true,"textureMode":true,"straightSides":true,"snapToGrid":true,"width":13143,"originOffsetRatio":0,"height":2043,"stretchTexture":false,"rotation":0,"repeatTexture":true,"cameraOffsetY":100,"textureOffset":0,"wireframe":false,"direction":90,"lineId":-1,"x":-410,"physic":false,"y":420,"thick":128,"line":false,"smoothing":true,"directed":false,"isRoad":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"shapeH":20,"type":0,"textureOffset":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-615,"length":615}],"density":"1","textureMode":true,"straightSides":true,"snapToGrid":true,"width":20,"originOffsetRatio":0,"height":628,"stretchTexture":false,"isStatic":false,"physic":true,"id":-1,"rotation":0,"repeatTexture":true,"safeId":1,"x":3523,"graphic":true,"smoothing":true,"y":-640,"action":0,"wireframe":false},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"isWheel":false,"ignore":false,"layer":6,"vertices":[{"x":0,"y":-55,"length":55},{"x":80,"y":-55,"length":97.082439194738},{"x":165,"y":-55,"length":173.92527130926086},{"x":245,"y":-55,"length":251.09759058979438},{"x":335,"y":-55,"length":339.4849039353591},{"x":415,"y":-55,"length":418.6287137786896},{"x":489,"y":-55,"length":492.0833262771662},{"x":580,"y":-55,"length":582.6019224135808},{"x":675,"y":-55,"length":677.2370338367506},{"x":675,"y":20,"length":675.2962312940892},{"x":585,"y":20,"length":585.3417805009309},{"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}],"density":1,"graphic":true,"rotation":0,"line":true,"x":2394,"safeId":1,"physic":true,"y":-896,"rem":true,"plr":false,"isStatic":false,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"isWheel":false,"ignore":false,"layer":6,"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}],"density":1,"graphic":true,"rotation":90,"line":true,"x":3153,"safeId":1,"physic":true,"y":-819,"rem":true,"plr":false,"isStatic":false,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"isWheel":false,"ignore":false,"layer":6,"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}],"density":1,"graphic":true,"rotation":-18,"line":true,"x":479,"safeId":2,"physic":true,"y":-146,"rem":true,"plr":false,"isStatic":false,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"isWheel":false,"ignore":false,"layer":6,"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":80,"y":310,"length":320.1562118716424},{"x":-20,"y":410,"length":410.48751503547584},{"x":-50,"y":425,"length":427.93106921559223},{"x":-110,"y":365,"length":381.21516234273787},{"x":-95,"y":330,"length":343.4020966738555},{"x":5,"y":230,"length":230.05434140654683},{"x":37,"y":64,"length":73.92563831310488}],"density":1,"graphic":true,"rotation":-45,"line":true,"x":876,"safeId":2,"physic":true,"y":-19,"rem":true,"plr":false,"isStatic":false,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"shapeH":64,"type":5,"textureOffset":0,"vertices":[{"x":0,"y":9,"length":9},{"x":0,"y":-676,"length":676}],"density":"1","textureMode":true,"straightSides":true,"snapToGrid":false,"width":64,"originOffsetRatio":0,"height":698,"stretchTexture":false,"isStatic":true,"physic":true,"id":-1,"rotation":0,"repeatTexture":true,"safeId":-1,"x":3548,"graphic":true,"smoothing":true,"y":-262,"action":0,"wireframe":false},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"shapeH":20,"type":0,"textureOffset":0,"vertices":[{"x":0,"y":0,"length":0},{"x":205,"y":-257,"length":328.7461026384952}],"density":"1","textureMode":true,"straightSides":true,"snapToGrid":false,"width":220.6,"originOffsetRatio":0,"height":270,"stretchTexture":false,"isStatic":false,"physic":true,"id":-1,"rotation":0,"repeatTexture":true,"safeId":2,"x":9110,"graphic":true,"smoothing":true,"y":-1665,"action":0,"wireframe":false},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"shapeH":64,"type":5,"textureOffset":0,"vertices":[{"x":0,"y":0,"length":0},{"x":38,"y":-49,"length":62.00806399170998},{"x":61,"y":-90,"length":108.72442227944924},{"x":80,"y":-129,"length":151.7926216915697},{"x":93,"y":-179,"length":201.71762441591463},{"x":99,"y":-221,"length":242.16110340019515},{"x":101,"y":-271,"length":289.20926679482454},{"x":96,"y":-325,"length":338.88198535773483},{"x":80,"y":-385,"length":393.2238548206352},{"x":59,"y":-433,"length":437.00114416326187},{"x":33,"y":-477,"length":478.1401468189008},{"x":8,"y":-508,"length":508.06298822094885},{"x":-18,"y":-534,"length":534.3032846614365},{"x":-54,"y":-566,"length":568.5701363947987},{"x":-90,"y":-589,"length":595.8363869385622},{"x":-134,"y":-611,"length":625.5213825282074},{"x":-180,"y":-627,"length":652.3258388259659},{"x":-238,"y":-637,"length":680.0095587563458},{"x":-295,"y":-637,"length":701.9928774567446},{"x":-351,"y":-632,"length":722.9280738773394},{"x":-409,"y":-617,"length":740.249957784531},{"x":-456,"y":-596,"length":750.434540782872},{"x":-503,"y":-566,"length":757.2086898603317},{"x":-536,"y":-539,"length":760.1427497516503},{"x":-572,"y":-500,"length":759.7262664933996},{"x":-598,"y":-465,"length":757.5150163528114},{"x":-617,"y":-435,"length":754.9264864872606},{"x":-632,"y":-402,"length":749.0180238151817},{"x":-646,"y":-361,"length":740.0249995777169},{"x":-656,"y":-311,"length":725.9869144826234},{"x":-659,"y":-261,"length":708.8032166969899},{"x":-657,"y":-212,"length":690.3571539427979},{"x":-650,"y":-171,"length":672.1168053247887},{"x":-637,"y":-127,"length":649.5367580052725},{"x":-620,"y":-89,"length":626.3553304634678},{"x":-599,"y":-52,"length":601.2528586210631},{"x":-567,"y":-10,"length":567.0881765651617},{"x":-537,"y":24,"length":537.5360453030104},{"x":-484,"y":78,"length":490.2448367907611}],"density":"1","textureMode":true,"straightSides":true,"snapToGrid":false,"width":824.1,"originOffsetRatio":0,"height":769.4,"stretchTexture":false,"isStatic":true,"physic":true,"id":-1,"rotation":0,"repeatTexture":true,"safeId":-1,"x":9330,"graphic":true,"smoothing":true,"y":-1910,"action":0,"wireframe":false},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"isWheel":false,"ignore":false,"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":44,"y":-38,"length":58.137767414994535},{"x":101,"y":-65,"length":120.10828447696687},{"x":160,"y":-73,"length":175.86642658563346},{"x":217,"y":-70,"length":228.01096464863264},{"x":264,"y":-54,"length":269.46613887462746},{"x":301,"y":-30,"length":302.49132218957953},{"x":335,"y":0,"length":335},{"x":369,"y":45,"length":371.7337757051409},{"x":388,"y":96,"length":399.6998874155458},{"x":394,"y":151,"length":421.94430912147635},{"x":387,"y":210,"length":440.30557570850726},{"x":366,"y":260,"length":448.94988584473435},{"x":337,"y":301,"length":451.8517455980446},{"x":291,"y":342,"length":449.0489950996439},{"x":237,"y":366,"length":436.033255612459},{"x":194,"y":378,"length":424.87645263064417},{"x":132,"y":375,"length":397.55376994816686},{"x":78,"y":357,"length":365.4216742340279},{"x":37,"y":332,"length":334.0553846295551},{"x":0,"y":300,"length":300},{"x":-31,"y":255,"length":256.87740266516244},{"x":-51,"y":197,"length":203.49447166937975},{"x":-54,"y":137,"length":147.2582765076381},{"x":-47,"y":83,"length":95.38343671728336},{"x":-27,"y":39,"length":47.43416490252569}],"density":0.3,"graphic":true,"rotation":0,"line":true,"x":10668,"safeId":4,"physic":true,"y":-1840,"rem":true,"plr":false,"isStatic":false,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"isWheel":false,"ignore":false,"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":44,"y":-38,"length":58.137767414994535},{"x":101,"y":-65,"length":120.10828447696687},{"x":160,"y":-73,"length":175.86642658563346},{"x":217,"y":-70,"length":228.01096464863264},{"x":264,"y":-54,"length":269.46613887462746},{"x":301,"y":-30,"length":302.49132218957953},{"x":335,"y":0,"length":335},{"x":369,"y":45,"length":371.7337757051409},{"x":388,"y":96,"length":399.6998874155458},{"x":394,"y":151,"length":421.94430912147635},{"x":387,"y":210,"length":440.30557570850726},{"x":366,"y":260,"length":448.94988584473435},{"x":337,"y":301,"length":451.8517455980446},{"x":291,"y":342,"length":449.0489950996439},{"x":237,"y":366,"length":436.033255612459},{"x":194,"y":378,"length":424.87645263064417},{"x":132,"y":375,"length":397.55376994816686},{"x":78,"y":357,"length":365.4216742340279},{"x":37,"y":332,"length":334.0553846295551},{"x":0,"y":300,"length":300},{"x":-31,"y":255,"length":256.87740266516244},{"x":-51,"y":197,"length":203.49447166937975},{"x":-54,"y":137,"length":147.2582765076381},{"x":-47,"y":83,"length":95.38343671728336},{"x":-27,"y":39,"length":47.43416490252569}],"density":0.3,"graphic":true,"rotation":0,"line":true,"x":11186,"safeId":4,"physic":true,"y":-1825,"rem":true,"plr":false,"isStatic":false,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"isWheel":false,"ignore":false,"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":44,"y":-38,"length":58.137767414994535},{"x":101,"y":-65,"length":120.10828447696687},{"x":160,"y":-73,"length":175.86642658563346},{"x":217,"y":-70,"length":228.01096464863264},{"x":264,"y":-54,"length":269.46613887462746},{"x":301,"y":-30,"length":302.49132218957953},{"x":335,"y":0,"length":335},{"x":369,"y":45,"length":371.7337757051409},{"x":388,"y":96,"length":399.6998874155458},{"x":394,"y":151,"length":421.94430912147635},{"x":387,"y":210,"length":440.30557570850726},{"x":366,"y":260,"length":448.94988584473435},{"x":337,"y":301,"length":451.8517455980446},{"x":291,"y":342,"length":449.0489950996439},{"x":237,"y":366,"length":436.033255612459},{"x":194,"y":378,"length":424.87645263064417},{"x":132,"y":375,"length":397.55376994816686},{"x":78,"y":357,"length":365.4216742340279},{"x":37,"y":332,"length":334.0553846295551},{"x":0,"y":300,"length":300},{"x":-31,"y":255,"length":256.87740266516244},{"x":-51,"y":197,"length":203.49447166937975},{"x":-54,"y":137,"length":147.2582765076381},{"x":-47,"y":83,"length":95.38343671728336},{"x":-27,"y":39,"length":47.43416490252569}],"density":0.3,"graphic":true,"rotation":0,"line":true,"x":11706,"safeId":4,"physic":true,"y":-1810,"rem":true,"plr":false,"isStatic":false,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"shapeH":19,"type":1,"textureOffset":0,"vertices":[{"x":5,"y":-5,"length":7.0710678118654755},{"x":314,"y":-9,"length":314.1289544120376},{"x":315,"y":470,"length":565.795899596312},{"x":365,"y":525,"length":639.4137940332536},{"x":765,"y":530,"length":930.658369112963},{"x":780,"y":505,"length":929.2066508586774},{"x":575,"y":230,"length":619.293952820468},{"x":575,"y":-450,"length":730.1540933255117}],"density":"1","textureMode":true,"straightSides":true,"snapToGrid":true,"width":792.9,"originOffsetRatio":0,"height":996.05,"stretchTexture":false,"isStatic":true,"physic":true,"id":-1,"rotation":0,"repeatTexture":true,"safeId":-1,"x":2690,"graphic":true,"smoothing":true,"y":-360,"action":0,"wireframe":false},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"height":21.75,"x":5224,"safeId":1,"id":41,"active":true,"y":-1029,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5702,"safeId":1,"id":41,"active":true,"y":-1130,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5155,"safeId":1,"id":41,"active":true,"y":-1013,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5018,"safeId":1,"id":41,"active":true,"y":-984,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5634,"safeId":1,"id":41,"active":true,"y":-1114,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4949,"safeId":1,"id":41,"active":true,"y":-970,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5566,"safeId":1,"id":41,"active":true,"y":-1100,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4813,"safeId":1,"id":41,"active":true,"y":-941,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4882,"safeId":1,"id":41,"active":true,"y":-955,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5497,"safeId":1,"id":41,"active":true,"y":-1085,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5361,"safeId":1,"id":41,"active":true,"y":-1056,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5429,"safeId":1,"id":41,"active":true,"y":-1071,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5086,"safeId":1,"id":41,"active":true,"y":-999,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5293,"safeId":1,"id":41,"active":true,"y":-1042,"rotation":-12,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6662,"safeId":1,"id":42,"active":true,"y":-1281,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":7127,"safeId":1,"id":42,"active":true,"y":-1431,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6595,"safeId":1,"id":42,"active":true,"y":-1258,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6462,"safeId":1,"id":42,"active":true,"y":-1215,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":7061,"safeId":1,"id":42,"active":true,"y":-1409,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6395,"safeId":1,"id":42,"active":true,"y":-1194,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6995,"safeId":1,"id":42,"active":true,"y":-1388,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6262,"safeId":1,"id":42,"active":true,"y":-1151,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6329,"safeId":1,"id":42,"active":true,"y":-1172,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6928,"safeId":1,"id":42,"active":true,"y":-1366,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6795,"safeId":1,"id":42,"active":true,"y":-1323,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6862,"safeId":1,"id":42,"active":true,"y":-1344,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6528,"safeId":1,"id":42,"active":true,"y":-1237,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6729,"safeId":1,"id":42,"active":true,"y":-1301,"rotation":-18,"width":86},"className":"PlankCandy"},{"params":{"isWheel":false,"ignore":false,"layer":2,"vertices":[{"x":-3100,"y":-1000,"length":3257.299494980466},{"x":480,"y":-3464,"length":3497.09822567225},{"x":7210,"y":-3502,"length":8015.491500837612},{"x":8470,"y":-3645,"length":9221.004554819394},{"x":9980,"y":-3205,"length":10482.004817781759},{"x":10710,"y":-2030,"length":10900.688051678206},{"x":9585,"y":-2040,"length":9799.684943915288},{"x":9585,"y":-2470,"length":9898.137451056133},{"x":9120,"y":-2470,"length":9448.56073695883},{"x":9120,"y":-2040,"length":9345.373186770017},{"x":9060,"y":-2040,"length":9286.829383594812},{"x":9060,"y":-2470,"length":9390.660253677586},{"x":8595,"y":-2470,"length":8942.87006502946},{"x":8595,"y":-2025,"length":8830.325588561273},{"x":8540,"y":-2025,"length":8776.80038510618},{"x":8540,"y":-2390,"length":8868.128325638956},{"x":8495,"y":-2445,"length":8839.855768054138},{"x":8455,"y":-2470,"length":8808.400819672093},{"x":8395,"y":-2495,"length":8757.913564314276},{"x":8330,"y":-2505,"length":8698.501307696632},{"x":8255,"y":-2500,"length":8625.255068692171},{"x":8210,"y":-2480,"length":8576.392015294077},{"x":8165,"y":-2455,"length":8526.092305388207},{"x":8135,"y":-2425,"length":8488.748435429101},{"x":8110,"y":-2395,"length":8456.247690317497},{"x":8085,"y":-2350,"length":8419.603612997467},{"x":8080,"y":-2050,"length":8336.000239923222},{"x":7180,"y":-2045,"length":7465.5492095357595},{"x":7074,"y":-2068,"length":7370.0814106765465},{"x":6981,"y":-2100,"length":7290.017901212589},{"x":6901,"y":-2132,"length":7222.826662740841},{"x":6832,"y":-2171,"length":7168.644572023361},{"x":6747,"y":-2233,"length":7106.919023036635},{"x":6771,"y":-2260,"length":7138.209929667241},{"x":6808,"y":-2233,"length":7164.855406775492},{"x":6841,"y":-2275,"length":7209.36238512117},{"x":6814,"y":-2298,"length":7191.06389903469},{"x":6854,"y":-2351,"length":7246.000069003588},{"x":6879,"y":-2401,"length":7285.975706794527},{"x":6899,"y":-2456,"length":7323.123445634383},{"x":6910,"y":-2512,"length":7352.431162547528},{"x":6912,"y":-2572,"length":7375.020542344272},{"x":6909,"y":-2628,"length":7391.932426639194},{"x":6893,"y":-2690,"length":7399.293817655845},{"x":6869,"y":-2739,"length":7394.949763182979},{"x":6845,"y":-2779,"length":7387.615718213827},{"x":6813,"y":-2820,"length":7373.558774431787},{"x":6772,"y":-2860,"length":7351.162085003975},{"x":6737,"y":-2885,"length":7328.737544761717},{"x":6695,"y":-2910,"length":7300.077054387851},{"x":6654,"y":-2927,"length":7269.3221829824},{"x":6599,"y":-2941,"length":7224.699440115139},{"x":6553,"y":-2947,"length":7185.166525558054},{"x":6504,"y":-2946,"length":7140.093276701643},{"x":6457,"y":-2941,"length":7095.232906677553},{"x":6404,"y":-2930,"length":7042.450993794703},{"x":6363,"y":-2911,"length":6997.263036359288},{"x":6327,"y":-2891,"length":6956.206581176267},{"x":6293,"y":-2870,"length":6916.556151727535},{"x":6258,"y":-2840,"length":6872.275023600263},{"x":6228,"y":-2809,"length":6832.164005642721},{"x":6201,"y":-2775,"length":6793.601842910725},{"x":6178,"y":-2734,"length":6755.918886428403},{"x":6160,"y":-2692,"length":6722.534046027584},{"x":6147,"y":-2647,"length":6692.698857710542},{"x":6139,"y":-2595,"length":6664.934058188423},{"x":6138,"y":-2552,"length":6647.38655412787},{"x":6142,"y":-2504,"length":6632.810867196501},{"x":6148,"y":-2460,"length":6621.895801052747},{"x":6164,"y":-2415,"length":6620.205510405247},{"x":6181,"y":-2378,"length":6622.661474060108},{"x":6208,"y":-2335,"length":6632.608008920774},{"x":6233,"y":-2302,"length":6644.508484455415},{"x":6268,"y":-2266,"length":6665.026631604708},{"x":6327,"y":-2226,"length":6707.160725672227},{"x":6320,"y":-2214,"length":6696.580918647964},{"x":6259,"y":-2214,"length":6639.041873644118},{"x":4601,"y":-2221,"length":5109.0157564838255},{"x":4477,"y":-2253,"length":5011.939544727171},{"x":4255,"y":-2295,"length":4834.464810090151},{"x":4080,"y":-2308,"length":4687.564826218407},{"x":3905,"y":-2312,"length":4538.101915999684},{"x":3726,"y":-2302,"length":4379.757984181318},{"x":3556,"y":-2282,"length":4225.2408215390515},{"x":3370,"y":-2250,"length":4052.085882604168},{"x":3221,"y":-2208,"length":3905.138281802579},{"x":3075,"y":-2157,"length":3756.0982415267044},{"x":2932,"y":-2098,"length":3605.305534902694},{"x":2777,"y":-2017,"length":3432.2030825695615},{"x":2642,"y":-1935,"length":3274.81129227319},{"x":2518,"y":-1848,"length":3123.368053880298},{"x":2385,"y":-1746,"length":2955.797861830203},{"x":2268,"y":-1631,"length":2793.5613470980015},{"x":1345,"y":-1631,"length":2114.044938027572},{"x":1312,"y":-1696,"length":2144.238792672122},{"x":1267,"y":-1758,"length":2166.9916935696824},{"x":1226,"y":-1801,"length":2178.6869899092894},{"x":1171,"y":-1847,"length":2186.9270678282805},{"x":1111,"y":-1880,"length":2183.7401402181536},{"x":1028,"y":-1907,"length":2166.433243836514},{"x":948,"y":-1923,"length":2143.975979343052},{"x":867,"y":-1922,"length":2108.5001778515457},{"x":795,"y":-1909,"length":2067.9231126906047},{"x":737,"y":-1890,"length":2028.6125800654988},{"x":681,"y":-1861,"length":1981.6866553519505},{"x":627,"y":-1823,"length":1927.8117127976996},{"x":583,"y":-1784,"length":1876.8444261579061},{"x":545,"y":-1740,"length":1823.3554233884297},{"x":515,"y":-1690,"length":1766.7272002207924},{"x":490,"y":-1641,"length":1712.5948148934704},{"x":472,"y":-1589,"length":1657.6202822118219},{"x":461,"y":-1538,"length":1605.604247627665},{"x":455,"y":-1478,"length":1546.450451841248},{"x":460,"y":-1419,"length":1491.6973553640162},{"x":470,"y":-1364,"length":1442.7044049284664},{"x":-142,"y":-1357,"length":1364.40939603918},{"x":-144,"y":-1262,"length":1270.188962320174},{"x":-98,"y":-1186,"length":1190.0420160649792},{"x":195,"y":-1186,"length":1201.923874461274},{"x":198,"y":-902,"length":923.4760419198757},{"x":198,"y":-832,"length":855.2356400431404},{"x":185,"y":-779,"length":800.6659728001434},{"x":160,"y":-724,"length":741.4688125605824},{"x":132,"y":-683,"length":695.6385555732229},{"x":74,"y":-730,"length":733.7410987535045},{"x":32,"y":-758,"length":758.6751610537938},{"x":-30,"y":-796,"length":796.565126025487},{"x":-105,"y":-830,"length":836.6152042605968},{"x":-184,"y":-857,"length":876.5300907555884},{"x":-280,"y":-876,"length":919.6608070370293},{"x":-385,"y":-885,"length":965.1165732697787},{"x":-492,"y":-882,"length":1009.9445529334766},{"x":-594,"y":-870,"length":1053.4400789793408},{"x":-694,"y":-844,"length":1092.6902580328974},{"x":-794,"y":-798,"length":1125.7175489437836},{"x":-866,"y":-752,"length":1146.935046112028},{"x":-936,"y":-705,"length":1171.802457754719},{"x":-982,"y":-665,"length":1185.9801853319473},{"x":-1032,"y":-615,"length":1201.3529872606136},{"x":-1079,"y":-559,"length":1215.2045095373865},{"x":-1112,"y":-516,"length":1225.8874336577564},{"x":-1145,"y":-440,"length":1226.6315665268035},{"x":-1160,"y":-530,"length":1275.3430910935301},{"x":-1190,"y":-605,"length":1334.9625462910935},{"x":-1240,"y":-670,"length":1409.432509913121},{"x":-1295,"y":-710,"length":1476.863229957331},{"x":-1355,"y":-735,"length":1541.5090009467995},{"x":-1410,"y":-745,"length":1594.7178433817062},{"x":-1485,"y":-735,"length":1656.9399506318869},{"x":-1545,"y":-715,"length":1702.4247413615676},{"x":-1585,"y":-695,"length":1730.6790574800402},{"x":-1618,"y":-668,"length":1750.4707938151953},{"x":-1652,"y":-697,"length":1793.0178470946685},{"x":-1694,"y":-722,"length":1841.445084709289},{"x":-1753,"y":-742,"length":1903.5684910189073},{"x":-1810,"y":-748,"length":1958.469810847234},{"x":-1870,"y":-746,"length":2013.3097128857248},{"x":-1924,"y":-732,"length":2058.54317418897},{"x":-1969,"y":-711,"length":2093.437842401823},{"x":-2016,"y":-676,"length":2126.318884833599},{"x":-2046,"y":-646,"length":2145.5609988998217},{"x":-2079,"y":-599,"length":2163.571584209776},{"x":-2100,"y":-554,"length":2171.846219233765},{"x":-2112,"y":-502,"length":2170.8403902636414},{"x":-2115,"y":-226,"length":2127.040432149798},{"x":-2835,"y":-215,"length":2843.140868827994}],"density":1,"graphic":true,"rotation":0,"line":true,"x":2525,"safeId":-1,"physic":true,"y":392,"rem":true,"plr":false,"isStatic":true,"id":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"shapeH":64,"type":5,"textureOffset":0,"vertices":[{"x":0,"y":0,"length":0},{"x":1541,"y":-2,"length":1541.0012978579869}],"density":"1","textureMode":true,"straightSides":true,"snapToGrid":false,"width":1554,"originOffsetRatio":0,"height":66,"stretchTexture":false,"isStatic":true,"physic":true,"id":-1,"rotation":0,"repeatTexture":true,"safeId":-1,"x":4930,"graphic":true,"smoothing":true,"y":-848,"action":0,"wireframe":false},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"height":97.35,"x":3190,"y":344,"rotation":0,"scaleX":1,"scaleY":0.7584729255940786,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":4022,"y":-1011,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":7700,"y":-1524,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":100.35,"x":10140,"y":-1510,"rotation":0,"scaleX":1,"scaleY":0.781846513439813,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":1712,"y":262,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":90.05,"x":1713,"y":180,"rotation":0,"width":102},"className":"Sign21"},{"params":{"height":132.25,"x":1680,"y":200,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":238.5,"x":2840,"y":270,"rotation":0,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":331.2,"x":4350,"y":-1060,"rotation":0,"scaleX":1,"scaleY":1,"width":264},"className":"Dec14"},{"params":{"height":240.35,"x":7870,"y":-1580,"rotation":27,"scaleX":1,"scaleY":1,"width":139.45},"className":"Dec13"},{"params":{"height":238.5,"x":7840,"y":-1580,"rotation":-21,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":132.25,"x":10110,"y":-1580,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":132.25,"x":3980,"y":-1080,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"}],[{"params":{"height":18,"x":9338,"safeId":43,"y":-1953,"rotation":-54.00000000000001,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9367,"safeId":43,"y":-1995,"rotation":-60.99999999999999,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9392,"safeId":43,"y":-2052,"rotation":-72,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9407,"safeId":43,"y":-2113,"rotation":-81.99999999999999,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9411,"safeId":43,"y":-2175,"rotation":-91,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9405,"safeId":43,"y":-2237,"rotation":-101,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9388,"safeId":43,"y":-2298,"rotation":-110.99999999999994,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9360,"safeId":43,"y":-2354,"rotation":-121.99999999999991,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9323,"safeId":43,"y":-2404,"rotation":-131.99999999999994,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9278,"safeId":43,"y":-2448,"rotation":-140,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9226,"safeId":43,"y":-2484,"rotation":-151,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9168,"safeId":43,"y":-2510,"rotation":-162,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9107,"safeId":43,"y":-2524,"rotation":-172.00000000000006,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":9045,"safeId":43,"y":-2528,"rotation":179,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8983,"safeId":43,"y":-2522,"rotation":170.00000000000006,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8922,"safeId":43,"y":-2506,"rotation":160.00000000000006,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8866,"safeId":43,"y":-2479,"rotation":149.00000000000006,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8815,"safeId":43,"y":-2441,"rotation":138,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8772,"safeId":43,"y":-2396,"rotation":130,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8736,"safeId":43,"y":-2345,"rotation":120,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8710,"safeId":43,"y":-2290,"rotation":109.00000000000009,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8695,"safeId":43,"y":-2229,"rotation":99.00000000000009,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8690,"safeId":43,"y":-2166,"rotation":89.00000000000006,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8696,"safeId":43,"y":-2103,"rotation":80,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8712,"safeId":43,"y":-2042,"rotation":70,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8740,"safeId":43,"y":-1984,"rotation":58.99999999999999,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8778,"safeId":43,"y":-1933,"rotation":47.99999999999995,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"height":18,"x":8824,"safeId":43,"y":-1888,"rotation":41,"width":66,"ttl":0.5},"className":"GlassCrashed1"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2695,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":14},"className":"Tnt1"},{"params":{"type":0,"x":2640,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":2698,"safeId":-1,"id":32,"active":false,"height":48,"y":335,"rotation":90.00000000000006,"width":13.1},"className":"Removed1"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2625,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":13},"className":"Tnt1"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2555,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":12},"className":"Tnt1"},{"params":{"type":0,"x":2570,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":2500,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2485,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":11},"className":"Tnt1"},{"params":{"type":0,"x":2430,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2415,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":10},"className":"Tnt1"},{"params":{"type":0,"x":2360,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2345,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":9},"className":"Tnt1"},{"params":{"type":0,"x":2290,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2275,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":8},"className":"Tnt1"},{"params":{"type":0,"x":2220,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2205,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":7},"className":"Tnt1"},{"params":{"type":0,"x":2150,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2135,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":6},"className":"Tnt1"},{"params":{"type":0,"x":2080,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":2065,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":5},"className":"Tnt1"},{"params":{"type":0,"x":2010,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":1995,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":4},"className":"Tnt1"},{"params":{"type":0,"x":1940,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":1925,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":3},"className":"Tnt1"},{"params":{"type":0,"x":1870,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":1855,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":2},"className":"Tnt1"},{"params":{"type":0,"x":1800,"safeId":-1,"id":32,"active":false,"height":72,"y":335,"rotation":90,"width":12.3},"className":"Removed0"},{"params":{"impulse":1000,"count":12,"radius":64,"width":53.2,"height":53.2,"x":1791,"safeId":-1,"physic":true,"y":366,"rotation":0,"stones":false,"id":1},"className":"Tnt1"},{"params":{"rate":1,"height":154,"x":3385,"safeId":1,"id":-1,"rotation":0,"speed":900,"y":-320,"width":221},"className":"GeyserE"},{"params":{"rate":1,"height":154,"x":3435,"safeId":1,"id":-1,"rotation":-36,"speed":1000,"y":-100,"width":221},"className":"GeyserE"},{"params":{"rate":1,"height":154,"x":3535,"safeId":1,"id":-1,"rotation":-36,"speed":1000,"y":40,"width":221},"className":"GeyserE"},{"params":{"rate":1,"height":154,"x":3385,"safeId":1,"id":-1,"rotation":0,"speed":900,"y":-490,"width":221},"className":"GeyserE"},{"params":{"rate":1,"height":154,"x":3385,"safeId":1,"id":-1,"rotation":0,"speed":900,"y":-660,"width":221},"className":"GeyserE"},{"params":{"type":0,"x":5884,"safeId":2,"id":22,"active":false,"height":72,"y":-1184,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5949,"safeId":2,"id":22,"active":false,"height":72,"y":-1184,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5914,"safeId":2,"id":22,"active":false,"height":72,"y":-1224,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":6019,"safeId":2,"id":22,"active":false,"height":72,"y":-1184,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5984,"safeId":2,"id":22,"active":false,"height":72,"y":-1224,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":6083,"safeId":2,"id":22,"active":false,"height":72,"y":-1184,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":6054,"safeId":2,"id":22,"active":false,"height":72,"y":-1224,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5918,"safeId":2,"id":22,"active":false,"height":72,"y":-1264,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5948,"safeId":2,"id":22,"active":false,"height":72,"y":-1304,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5983,"safeId":2,"id":22,"active":false,"height":72,"y":-1264,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":6018,"safeId":2,"id":22,"active":false,"height":72,"y":-1304,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":6048,"safeId":2,"id":22,"active":false,"height":72,"y":-1264,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5984,"safeId":2,"id":22,"active":false,"height":72,"y":-1314,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5949,"safeId":2,"id":22,"active":false,"height":72,"y":-1354,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":6019,"safeId":2,"id":22,"active":false,"height":72,"y":-1354,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":5984,"safeId":2,"id":22,"active":false,"height":72,"y":-1394,"rotation":90.00000000000006,"width":12.3},"className":"Removed0"},{"params":{"impulse":3000,"count":25,"radius":64,"width":53.2,"height":53.2,"x":9329,"safeId":3,"physic":true,"y":-1879,"rotation":39,"stones":false,"id":45},"className":"Tnt1"},{"params":{"impulse":10000,"count":20,"radius":64,"width":53.2,"height":53.2,"x":10839,"safeId":4,"physic":true,"y":-1436,"rotation":0,"stones":true,"id":51},"className":"Tnt1"},{"params":{"impulse":10000,"count":20,"radius":64,"width":53.2,"height":53.2,"x":11357,"safeId":4,"physic":true,"y":-1421,"rotation":0,"stones":true,"id":52},"className":"Tnt1"},{"params":{"impulse":10000,"count":20,"radius":64,"width":53.2,"height":53.2,"x":11877,"safeId":4,"physic":true,"y":-1406,"rotation":0,"stones":true,"id":53},"className":"Tnt1"}],null,[{"params":{"height":32,"x":630,"y":250,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":505,"x":3190,"y":300,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":815,"x":4020,"y":-1080,"width":128,"id":2,"rotation":0},"className":"SafePointE"},{"params":{"height":635,"x":7700,"y":-1590,"width":128,"id":3,"rotation":0},"className":"SafePointE"},{"params":{"height":352,"x":10140,"y":-1570,"width":128,"id":4,"rotation":0},"className":"SafePointE"}],[{"params":{"height":17,"x":3004,"safeId":1,"id":-1,"rotation":90,"graphic":1,"y":-636,"width":17},"className":"PivotJointE"},{"params":{"sideWait":0,"position":0,"vertices":[{"x":0,"y":0,"length":0},{"x":496,"y":0,"length":496}],"startTime":"0","cycle":0,"rotation":0,"speed":110,"snapToGrid":true,"body":false,"height":13,"x":2700,"safeId":1,"accelDist":0,"y":-905,"width":509,"stopOnEnd":true,"id":21,"active":0},"className":"frg.game.editor.objects::MoverPather"},{"params":{"id_off":-1,"off":false,"safeId":1,"id":21,"width":514,"x":3510,"height":64,"sndId":-1,"hint":-1,"y":-210,"rotation":-36},"className":"ToggleE"},{"params":{"sideWait":0,"position":0,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":368,"length":368}],"startTime":"0","cycle":0,"rotation":0,"speed":650,"snapToGrid":true,"body":false,"height":381,"x":3524,"safeId":1,"accelDist":0,"y":-950,"width":13,"stopOnEnd":true,"id":20,"active":0},"className":"frg.game.editor.objects::MoverPather"},{"params":{"id_off":-1,"off":false,"safeId":1,"id":20,"width":514,"x":3460,"height":64,"sndId":-1,"hint":-1,"y":-270,"rotation":-6},"className":"ToggleE"},{"params":{"height":17,"x":700,"safeId":2,"id":-1,"rotation":-18,"graphic":0,"y":-60,"width":17},"className":"PivotJointE"},{"params":{"snd":false,"rotation":-45,"rate":-80,"height":17,"x":1111,"safeId":-1,"id":31,"width":17,"useWeld":false,"graphic":0,"time":1.3,"y":-42},"className":"MotorJointE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":31,"width":77,"x":888,"height":491,"sndId":-1,"hint":-1,"y":300,"rotation":0},"className":"ToggleE"},{"params":{"height":17,"x":9112,"safeId":3,"id":-1,"rotation":0,"graphic":0,"y":-1669,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":9308,"safeId":3,"id":45,"rotation":0,"graphic":0,"y":-1914,"width":17},"className":"PivotJointE"},{"params":{"id_off":-1,"off":false,"safeId":3,"id":45,"width":64,"x":8910,"height":349,"sndId":-1,"hint":-1,"y":-2440,"rotation":-27},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":4,"id":51,"width":64,"x":10595,"height":339,"sndId":-1,"hint":-1,"y":-1554,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":1,"width":60,"x":1970,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":2,"width":60,"x":2040,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":4,"width":60,"x":2180,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":3,"width":60,"x":2110,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":8,"width":60,"x":2460,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":7,"width":60,"x":2390,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":6,"width":60,"x":2320,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":5,"width":60,"x":2250,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":14,"width":60,"x":2880,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":13,"width":60,"x":2810,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":10,"width":60,"x":2600,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":11,"width":60,"x":2670,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":12,"width":60,"x":2740,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":9,"width":60,"x":2530,"height":812,"sndId":-1,"hint":-1,"y":20,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":4,"id":52,"width":64,"x":11095,"height":339,"sndId":-1,"hint":-1,"y":-1554,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":4,"id":53,"width":64,"x":11615,"height":339,"sndId":-1,"hint":-1,"y":-1534,"rotation":0},"className":"ToggleE"},{"params":{"height":17,"x":1090,"safeId":-1,"id":31,"rotation":0,"graphic":0,"y":290,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":750,"safeId":-1,"id":31,"rotation":0,"graphic":0,"y":130,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2870,"safeId":1,"id":21,"rotation":0,"graphic":0,"y":-780,"width":17},"className":"PivotJointE"},{"params":{"id_off":-1,"off":false,"safeId":2,"id":22,"width":60,"x":5250,"height":812,"sndId":-1,"hint":-1,"y":-1390,"rotation":0},"className":"ToggleE"},{"params":{"height":17,"x":5738,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1137,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5190,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1020,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5054,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-991,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4916,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-962,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5327,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1049,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5258,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1035,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5122,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1006,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5533,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1093,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5395,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1064,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4986,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-977,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5602,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1108,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4848,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-947,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5464,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1079,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4779,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-934,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5669,"safeId":1,"id":-1,"rotation":-12,"graphic":0,"y":-1122,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7162,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1442,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6630,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1269,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6497,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1226,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6363,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1182,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6762,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1312,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6696,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1291,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6563,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1248,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6962,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1378,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6828,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1334,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6431,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1205,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7029,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1399,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6297,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1161,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6895,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1356,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6230,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1140,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7095,"safeId":1,"id":-1,"rotation":-18,"graphic":0,"y":-1421,"width":17},"className":"PivotJointE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":41,"width":64,"x":4020,"height":1661,"sndId":-1,"hint":-1,"y":-1300,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":42,"width":64,"x":5000,"height":1661,"sndId":-1,"hint":-1,"y":-1350,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":43,"width":64,"x":7690,"height":487,"sndId":-1,"hint":-1,"y":-1610,"rotation":0},"className":"ToggleE"},{"params":{"id_off":-1,"off":false,"safeId":-1,"id":32,"width":77,"x":1168,"height":491,"sndId":-1,"hint":-1,"y":290,"rotation":0},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map20.json b/assets/levels/map20.json new file mode 100644 index 0000000..25904ba --- /dev/null +++ b/assets/levels/map20.json @@ -0,0 +1 @@ +{"settings":{"theme":3,"prizes":"30,38,46","countdown":0,"gravityY":500},"layers":[[{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":69,"y":65,"length":94.79451460923254},{"x":128,"y":105,"length":165.55663683464942},{"x":199,"y":134,"length":239.91039994131143},{"x":264,"y":154,"length":305.6337677678957},{"x":330,"y":167,"length":369.84996958226185},{"x":395,"y":169,"length":429.6347285776605},{"x":459,"y":162,"length":486.7494221876386},{"x":529,"y":143,"length":547.9872261284929},{"x":594,"y":114,"length":604.8404748361339},{"x":652,"y":79,"length":656.7686046089597},{"x":707,"y":37,"length":707.9675133789685},{"x":759,"y":-17,"length":759.19035821064},{"x":800,"y":-70,"length":803.0566605165541},{"x":831,"y":-123,"length":840.0535697204077},{"x":859,"y":-188,"length":879.3321329281672},{"x":875,"y":-242,"length":907.848555652318},{"x":887,"y":-318,"length":942.2807437276855},{"x":888,"y":-381,"length":966.2841197080701},{"x":881,"y":-450,"length":989.2729653639586},{"x":869,"y":-511,"length":1008.1081291210779},{"x":851,"y":-563,"length":1020.3773811683596},{"x":822,"y":-623,"length":1031.413108313056},{"x":787,"y":-678,"length":1038.7747590310423},{"x":750,"y":-723,"length":1041.7432505180918},{"x":705,"y":-765,"length":1040.312453063982},{"x":650,"y":-808,"length":1036.997589196812},{"x":589,"y":-844,"length":1029.2021181478399},{"x":531,"y":-871,"length":1020.0990148019946},{"x":453,"y":-891,"length":999.544896440375},{"x":402,"y":-899,"length":984.7867789526828},{"x":346,"y":-902,"length":966.084882399057},{"x":-1349,"y":-903,"length":1623.332991101949},{"x":-1349,"y":-505,"length":1440.4256315408998},{"x":-1211,"y":-366,"length":1265.0996008220063},{"x":-6,"y":-369,"length":369.04877726392755}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":1091,"x":7007,"isStatic":true,"repeatTexture":true,"id":-1,"width":2256,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1987,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1335,"y":0,"length":1335}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":19,"x":5660,"isStatic":true,"repeatTexture":true,"id":-1,"width":1348,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-2490,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":4,"y":-4,"length":5.656854249492381},{"x":107,"y":-22,"length":109.23827168167757},{"x":168,"y":-44,"length":173.6663467687393},{"x":223,"y":-76,"length":235.5949914577982},{"x":263,"y":-112,"length":285.8548582760139},{"x":300,"y":-154,"length":337.21803036018105},{"x":329,"y":-209,"length":389.7717280665698}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":220.85,"x":4828,"isStatic":true,"repeatTexture":true,"id":-1,"width":339.9,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1980,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":2,"y":9,"length":9.219544457292887},{"x":658,"y":-209,"length":690.3948145807585}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":236,"x":2930,"isStatic":true,"repeatTexture":true,"id":-1,"width":669,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-2195,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1077,"y":0,"length":1077},{"x":1145,"y":-92,"length":1148.6901235755447}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":108,"x":2511,"isStatic":true,"repeatTexture":true,"id":-1,"width":1159.15,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-504,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":628,"y":-315,"length":702.5731278664165}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":332,"x":1580,"isStatic":true,"repeatTexture":true,"id":-1,"width":641,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-376,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":849,"y":0,"length":849}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":19,"x":1282,"isStatic":true,"repeatTexture":true,"id":-1,"width":862,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-380,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":849,"y":0,"length":849}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":19,"x":1370,"isStatic":true,"repeatTexture":true,"id":-1,"width":862,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-310,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":91,"y":0,"length":91},{"x":147,"y":-8,"length":147.2175261305528},{"x":213,"y":-28,"length":214.83249288690016},{"x":267,"y":-61,"length":273.87953556262653},{"x":311,"y":-97,"length":325.7759966602819},{"x":351,"y":-137,"length":376.7890656587582},{"x":390,"y":-191,"length":434.25913922449575},{"x":415,"y":-248,"length":483.45527197456437},{"x":428,"y":-301,"length":523.2446846361652},{"x":438,"y":-363,"length":568.8699324098611},{"x":433,"y":-430,"length":610.2368392681648},{"x":419,"y":-485,"length":640.9258927520405},{"x":397,"y":-537,"length":667.8158428788583},{"x":369,"y":-588,"length":694.1937769816149},{"x":325,"y":-637,"length":715.1181720527035},{"x":278,"y":-678,"length":732.7810041206036},{"x":246,"y":-700,"length":741.9676542815057},{"x":208,"y":-721,"length":750.4032249397653},{"x":158,"y":-737,"length":753.7459784303993},{"x":109,"y":-745,"length":752.9316037994421},{"x":58,"y":-748,"length":750.2452932208239},{"x":8,"y":-744,"length":744.043009509531},{"x":-53,"y":-730,"length":731.9214438722232},{"x":-114,"y":-706,"length":715.1447405945177},{"x":-159,"y":-681,"length":699.3153794962614},{"x":-198,"y":-652,"length":681.4014969164656},{"x":-235,"y":-612,"length":655.5676929196557},{"x":-273,"y":-557,"length":620.3047638056635},{"x":-296,"y":-507,"length":587.0817660258238},{"x":-303,"y":-444,"length":537.5360453030104},{"x":-296,"y":-350,"length":458.3841183985327}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":767,"x":7293,"isStatic":true,"repeatTexture":true,"id":-1,"width":760.1,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1994,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-7,"y":-44,"length":44.553338819890925},{"x":-20,"y":-83,"length":85.37564055396598},{"x":-37,"y":-114,"length":119.85407794480753},{"x":-60,"y":-142,"length":154.1557653803451},{"x":-80,"y":-160,"length":178.88543819998318},{"x":-101,"y":-175,"length":202.05444810743464},{"x":-136,"y":-193,"length":236.10379073619296},{"x":-176,"y":-204,"length":269.4290259047826},{"x":-220,"y":-207,"length":302.07449412355226},{"x":-262,"y":-201,"length":330.2196238868914},{"x":-302,"y":-189,"length":356.2653505464712},{"x":-337,"y":-166,"length":375.6660751252367},{"x":-367,"y":-137,"length":391.7371567773473},{"x":-393,"y":-105,"length":406.78495547401945},{"x":-412,"y":-64,"length":416.94124286282835},{"x":-421,"y":-25,"length":421.7416270656716},{"x":-421,"y":19,"length":421.4285230024185},{"x":-412,"y":66,"length":417.2529209005013},{"x":-390,"y":111,"length":405.4885941675795},{"x":-364,"y":147,"length":392.56209699867867},{"x":-332,"y":175,"length":375.2985478255944},{"x":-293,"y":196,"length":352.51241112902676},{"x":-255,"y":208,"length":329.07294024273705},{"x":-204,"y":212,"length":294.2108087749327},{"x":-167,"y":208,"length":266.74519677025114}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":438.1,"x":1417,"isStatic":true,"repeatTexture":true,"id":-1,"width":439.9,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-190,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":2,"vertices":[{"x":0,"y":-1380,"length":1380},{"x":1135,"y":-1380,"length":1786.7918177560587},{"x":1140,"y":-1325,"length":1747.9201926861535},{"x":1160,"y":-1285,"length":1731.1340213859814},{"x":1190,"y":-1240,"length":1718.6331778480246},{"x":1230,"y":-1205,"length":1721.89575758813},{"x":1275,"y":-1185,"length":1740.646431645439},{"x":1320,"y":-1175,"length":1767.2082503202614},{"x":1360,"y":-1175,"length":1797.2826711455268},{"x":1360,"y":230,"length":1379.3114224133722},{"x":200,"y":230,"length":304.7950130825634},{"x":175,"y":185,"length":254.65663156493687},{"x":145,"y":155,"length":212.24985276791125},{"x":110,"y":130,"length":170.29386365926402},{"x":65,"y":110,"length":127.76932339180638},{"x":0,"y":100,"length":100}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":2300,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-820},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-7,"y":-44,"length":44.553338819890925},{"x":-20,"y":-83,"length":85.37564055396598},{"x":-37,"y":-114,"length":119.85407794480753},{"x":-60,"y":-142,"length":154.1557653803451},{"x":-80,"y":-160,"length":178.88543819998318},{"x":-101,"y":-175,"length":202.05444810743464},{"x":-136,"y":-193,"length":236.10379073619296},{"x":-176,"y":-204,"length":269.4290259047826},{"x":-220,"y":-207,"length":302.07449412355226},{"x":-262,"y":-201,"length":330.2196238868914},{"x":-302,"y":-189,"length":356.2653505464712},{"x":-337,"y":-166,"length":375.6660751252367},{"x":-367,"y":-137,"length":391.7371567773473},{"x":-393,"y":-105,"length":406.78495547401945},{"x":-412,"y":-64,"length":416.94124286282835},{"x":-421,"y":-25,"length":421.7416270656716},{"x":-421,"y":19,"length":421.4285230024185},{"x":-412,"y":66,"length":417.2529209005013},{"x":-390,"y":111,"length":405.4885941675795},{"x":-364,"y":147,"length":392.56209699867867},{"x":-332,"y":175,"length":375.2985478255944},{"x":-293,"y":196,"length":352.51241112902676},{"x":-255,"y":208,"length":329.07294024273705},{"x":-204,"y":212,"length":294.2108087749327},{"x":-167,"y":208,"length":266.74519677025114}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":438.1,"x":2519,"isStatic":true,"repeatTexture":true,"id":-1,"width":439.9,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-506,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"vertices":[{"x":-310,"y":0,"length":310},{"x":1135,"y":0,"length":1135},{"x":1176,"y":-4,"length":1176.0068027014129},{"x":1218,"y":-12,"length":1218.0591118660868},{"x":1256,"y":-25,"length":1256.248781093936},{"x":1297,"y":-46,"length":1297.8154722455731},{"x":1330,"y":-68,"length":1331.7372113146046},{"x":1368,"y":-103,"length":1371.8720785845887},{"x":1401,"y":-141,"length":1408.0774126446315},{"x":1426,"y":-182,"length":1437.567389724739},{"x":1443,"y":-224,"length":1460.2825069143298},{"x":1455,"y":-273,"length":1480.3898135288557},{"x":1460,"y":-321,"length":1494.8715663895678},{"x":1460,"y":-366,"length":1505.1764016220823},{"x":2237,"y":-367,"length":2266.904938456838},{"x":2300,"y":-379,"length":2331.0171599539976},{"x":2349,"y":-396,"length":2382.145461553513},{"x":2391,"y":-418,"length":2427.2628617436553},{"x":2433,"y":-448,"length":2473.9023828760905},{"x":2465,"y":-479,"length":2511.1085201559886},{"x":2492,"y":-514,"length":2544.4567200092047},{"x":2516,"y":-555,"length":2576.4861730659454},{"x":2533,"y":-594,"length":2601.7157800190244},{"x":2543,"y":-636,"length":2621.3250466128766},{"x":2543,"y":-691,"length":2635.209669077586},{"x":3587,"y":-694,"length":3653.5195360090797},{"x":3647,"y":-701,"length":3713.759550644064},{"x":3704,"y":-721,"length":3773.5205047806485},{"x":3751,"y":-747,"length":3824.658154659054},{"x":3795,"y":-783,"length":3874.9340639551533},{"x":3836,"y":-829,"length":3924.555643636614},{"x":3866,"y":-876,"length":3964.0045408652095},{"x":3885,"y":-923,"length":3993.138364745204},{"x":3898,"y":-992,"length":4022.2466358988977},{"x":3895,"y":-2388,"length":4568.76011626787},{"x":4943,"y":-2386,"length":5488.738015245399},{"x":5864,"y":-2397,"length":6334.990528801129},{"x":7053,"y":-2387,"length":7445.977303215475},{"x":7121,"y":-2313,"length":7487.229794790594},{"x":7181,"y":-2275,"length":7532.754210778419},{"x":7175,"y":-592,"length":7199.381153960388}],"lineId":0,"physic":true,"directed":true,"width":7529.55,"shape":true,"height":2461,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-50,"smoothing":true,"y":390,"direction":90,"textureOffset":0,"camera":false,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"vertices":[{"x":-300,"y":30,"length":301.4962686336267},{"x":1135,"y":0,"length":1135},{"x":1176,"y":-4,"length":1176.0068027014129},{"x":1218,"y":-12,"length":1218.0591118660868},{"x":1256,"y":-25,"length":1256.248781093936},{"x":3639,"y":-633,"length":3693.6445416417646},{"x":3699,"y":-640,"length":3753.9580445178126},{"x":3756,"y":-660,"length":3813.546380994992},{"x":3803,"y":-686,"length":3864.376405062012},{"x":3847,"y":-722,"length":3914.1656837696587},{"x":3888,"y":-768,"length":3963.1260388738583},{"x":3918,"y":-815,"length":4001.8681887338566},{"x":3937,"y":-862,"length":4030.2621502825345},{"x":3950,"y":-931,"length":4058.2337290993974},{"x":3944,"y":-2165,"length":4499.151142160041},{"x":3999,"y":-2270,"length":4598.358511469066},{"x":4114,"y":-2335,"length":4730.456743275431},{"x":6799,"y":-2360,"length":7196.943865280596},{"x":7407,"y":-2168,"length":7717.7634713691505},{"x":7836,"y":-2193,"length":8137.08455160692},{"x":8851,"y":-2192,"length":9118.39157965921}],"lineId":0,"physic":false,"directed":false,"width":9164,"shape":false,"height":2454.05,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":-50,"smoothing":true,"y":370,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":1850,"y":0,"length":1850}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":64,"x":5170,"isStatic":true,"repeatTexture":true,"id":-1,"width":1863,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-2001,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":-10,"length":14.142135623730951},{"x":35,"y":-10,"length":36.40054944640259},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5401,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2317},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":-10,"length":14.142135623730951},{"x":35,"y":-10,"length":36.40054944640259},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5655,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2317},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":-10,"length":14.142135623730951},{"x":35,"y":-10,"length":36.40054944640259},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":-9,"plr":false,"line":true,"x":5160,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2311},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":-10,"length":14.142135623730951},{"x":35,"y":-10,"length":36.40054944640259},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":6165,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2317},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":-10,"length":14.142135623730951},{"x":35,"y":-10,"length":36.40054944640259},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5921,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2317},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":-10,"length":14.142135623730951},{"x":35,"y":-10,"length":36.40054944640259},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":6441,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2317},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":10,"y":-10,"length":14.142135623730951},{"x":35,"y":-10,"length":36.40054944640259},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":6685,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2317},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":45,"y":300,"length":303.35622624235026},{"x":0,"y":300,"length":300}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":6951,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-2317},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":382,"x":6070,"y":-2690,"rotation":0,"width":828},"className":"FinishZone"},{"params":{"layer":6,"vertices":[{"x":-10,"y":-635,"length":635.0787352761861},{"x":175,"y":-635,"length":658.6729082025463},{"x":185,"y":100,"length":210.2974084481309},{"x":0,"y":100,"length":100}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-350,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":290},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":10,"length":10},{"x":0,"y":1405,"length":1405}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":1408,"x":3670,"isStatic":true,"repeatTexture":true,"id":-1,"width":64,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-2000,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-7,"y":-44,"length":44.553338819890925},{"x":-20,"y":-83,"length":85.37564055396598},{"x":-37,"y":-114,"length":119.85407794480753},{"x":-60,"y":-142,"length":154.1557653803451},{"x":-80,"y":-160,"length":178.88543819998318},{"x":-101,"y":-175,"length":202.05444810743464},{"x":-136,"y":-193,"length":236.10379073619296},{"x":-176,"y":-204,"length":269.4290259047826},{"x":-220,"y":-207,"length":302.07449412355226},{"x":-262,"y":-201,"length":330.2196238868914},{"x":-302,"y":-189,"length":356.2653505464712},{"x":-337,"y":-166,"length":375.6660751252367},{"x":-367,"y":-137,"length":391.7371567773473},{"x":-393,"y":-105,"length":406.78495547401945},{"x":-412,"y":-64,"length":416.94124286282835},{"x":-421,"y":-25,"length":421.7416270656716},{"x":-421,"y":19,"length":421.4285230024185},{"x":-412,"y":66,"length":417.2529209005013},{"x":-390,"y":111,"length":405.4885941675795},{"x":-364,"y":147,"length":392.56209699867867},{"x":-332,"y":175,"length":375.2985478255944},{"x":-293,"y":196,"length":352.51241112902676},{"x":-255,"y":208,"length":329.07294024273705},{"x":-204,"y":212,"length":294.2108087749327},{"x":-167,"y":208,"length":266.74519677025114}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":438.1,"x":3859,"isStatic":true,"repeatTexture":true,"id":-1,"width":439.9,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-2206,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"height":128.35,"x":7449,"y":-2075,"rotation":-9,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":7438,"y":-2148,"rotation":168,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":4580,"y":-2060,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":97.35,"x":3020,"y":-353,"rotation":0,"scaleX":1,"scaleY":0.7584729255940786,"width":9.3},"className":"SignPillar"},{"params":{"height":331.2,"x":50,"y":280,"rotation":0,"scaleX":1,"scaleY":1,"width":264},"className":"Dec14"},{"params":{"height":240.35,"x":30,"y":270,"rotation":33,"scaleX":1,"scaleY":1,"width":139.45},"className":"Dec13"},{"params":{"height":331.2,"x":1820,"y":-90,"rotation":0,"scaleX":1,"scaleY":1,"width":264},"className":"Dec14"},{"params":{"height":132.25,"x":2980,"y":-420,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":132.25,"x":4540,"y":-2120,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"}],[{"params":{"height":99,"force":6200,"y":-560,"rotation":0,"safeId":1,"x":3770,"time":2,"width":100},"className":"BoostE"},{"params":{"stones":false,"safeId":2,"physic":false,"impulse":40000,"rotation":0,"height":53.2,"x":7342,"id":51,"count":12,"radius":64,"y":-2010,"width":53.2},"className":"Tnt1"},{"params":{"height":99,"force":6000,"y":-1870,"rotation":0,"safeId":2,"x":7390,"time":2,"width":100},"className":"BoostE"}],null,[{"params":{"height":32,"x":430,"y":300,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":843,"x":3020,"y":-410,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":720,"x":4580,"y":-2140,"width":128,"id":2,"rotation":0},"className":"SafePointE"}],[{"params":{"height":341,"hint":-1,"id":51,"rotation":0,"safeId":2,"x":7360,"off":false,"id_off":-1,"y":-2760,"width":64,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map21.json b/assets/levels/map21.json new file mode 100644 index 0000000..4364ce7 --- /dev/null +++ b/assets/levels/map21.json @@ -0,0 +1 @@ +{"layers":[[{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":1940,"vertices":[{"y":4,"x":7},{"y":-178,"x":122},{"y":-153,"x":148},{"y":-123,"x":181},{"y":-99,"x":213},{"y":-75,"x":248},{"y":-54,"x":287},{"y":-36,"x":327},{"y":-22,"x":369},{"y":-10,"x":415},{"y":-2,"x":463},{"y":2,"x":514},{"y":-2,"x":567},{"y":-17,"x":617},{"y":-39,"x":656},{"y":-67,"x":690},{"y":-104,"x":722},{"y":-139,"x":741},{"y":-183,"x":757},{"y":-229,"x":763},{"y":-266,"x":764},{"y":-322,"x":751},{"y":-366,"x":734},{"y":-395,"x":715},{"y":-428,"x":685},{"y":-455,"x":650},{"y":-479,"x":610},{"y":-494,"x":571},{"y":-501,"x":517},{"y":-491,"x":211}],"y":470,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":522.05,"physic":true,"textureOffset":0,"shapeH":19,"width":774.6,"snapToGrid":false,"action":0,"wireframe":false,"type":1,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":1700,"vertices":[{"y":0,"x":0},{"y":185,"x":110}],"y":290,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":198,"physic":true,"textureOffset":0,"shapeH":19,"width":126.3,"snapToGrid":false,"action":0,"wireframe":false,"type":1,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}},{"className":"FinishZone","params":{"rotation":0,"x":1880,"height":467,"y":370,"width":143}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":1520,"vertices":[{"y":-5,"x":1},{"y":24,"x":23},{"y":42,"x":41},{"y":60,"x":67},{"y":73,"x":96},{"y":81,"x":122},{"y":80,"x":151},{"y":69,"x":184}],"y":-100,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":102.05,"physic":true,"textureOffset":0,"shapeH":19,"width":197.05,"snapToGrid":false,"action":0,"wireframe":false,"type":1,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-150,"physic":true,"y":470,"vertices":[{"y":0,"x":0},{"y":0,"x":3575}],"snapToGrid":true,"shape":true,"cameraOffsetY":80,"lineId":0,"textureMode":true,"straightSides":true,"direction":90,"originOffsetRatio":0,"stretchTexture":false,"directed":true,"repeatTexture":true,"width":3588,"rotation":0,"thick":128,"height":64,"textureOffset":0,"camera":true,"wireframe":false,"smoothing":true,"isRoad":true,"line":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":730,"vertices":[{"y":-210,"x":-225},{"y":-177,"x":-228},{"y":-146,"x":-227},{"y":-122,"x":-222},{"y":-96,"x":-211},{"y":-71,"x":-197},{"y":-48,"x":-176},{"y":-26,"x":-149},{"y":-11,"x":-122},{"y":-5,"x":-101},{"y":-1,"x":-75},{"y":0,"x":437},{"y":-4,"x":466},{"y":-11,"x":495},{"y":-23,"x":522},{"y":-36,"x":542},{"y":-54,"x":562},{"y":-74,"x":578},{"y":-98,"x":593},{"y":-121,"x":602},{"y":-147,"x":607},{"y":-176,"x":608},{"y":-205,"x":605},{"y":-232,"x":597},{"y":-257,"x":585},{"y":-279,"x":567},{"y":-294,"x":551},{"y":-314,"x":519}],"y":140,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":331.55,"physic":true,"textureOffset":0,"shapeH":19,"width":855,"snapToGrid":false,"action":0,"wireframe":false,"type":1,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":680,"vertices":[{"y":-246,"x":-338},{"y":-200,"x":-318},{"y":-174,"x":-304},{"y":-149,"x":-288},{"y":-121,"x":-266},{"y":-94,"x":-242},{"y":-70,"x":-211},{"y":-49,"x":-180},{"y":-28,"x":-139},{"y":-16,"x":-105},{"y":-8,"x":-67},{"y":-2,"x":-30},{"y":0,"x":15},{"y":0,"x":519},{"y":-4,"x":565},{"y":-13,"x":604},{"y":-28,"x":649},{"y":-46,"x":680},{"y":-71,"x":717},{"y":-104,"x":755},{"y":-139,"x":786},{"y":-186,"x":815},{"y":-231,"x":835},{"y":-279,"x":847},{"y":-326,"x":852},{"y":-365,"x":852},{"y":-415,"x":842},{"y":-443,"x":833},{"y":-475,"x":825},{"y":-502,"x":825},{"y":-532,"x":830},{"y":-559,"x":839},{"y":-582,"x":854},{"y":-603,"x":870},{"y":-620,"x":891},{"y":-635,"x":914},{"y":-644,"x":940},{"y":-648,"x":966},{"y":-649,"x":993},{"y":-645,"x":1020},{"y":-639,"x":1043},{"y":-630,"x":1063},{"y":-616,"x":1083},{"y":-601,"x":1098},{"y":-584,"x":1114},{"y":-559,"x":1130},{"y":-535,"x":1140},{"y":-533,"x":1263},{"y":-575,"x":1261},{"y":-619,"x":1268},{"y":-653,"x":1279},{"y":-681,"x":1295},{"y":-711,"x":1319},{"y":-733,"x":1341},{"y":-755,"x":1374},{"y":-771,"x":1410},{"y":-781,"x":1445},{"y":-784,"x":1482},{"y":-781,"x":1520},{"y":-775,"x":1555},{"y":-759,"x":1590},{"y":-739,"x":1625},{"y":-713,"x":1653},{"y":-683,"x":1677},{"y":-647,"x":1695},{"y":-605,"x":1708},{"y":-570,"x":1712},{"y":-527,"x":1710},{"y":-476,"x":1697},{"y":-434,"x":1675},{"y":-390,"x":1641},{"y":-363,"x":1603},{"y":-344,"x":1560},{"y":-334,"x":1516},{"y":-332,"x":1471}],"y":310,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":803.05,"physic":true,"textureOffset":0,"shapeH":19,"width":2068.25,"snapToGrid":false,"action":0,"wireframe":false,"type":1,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":320,"vertices":[{"y":-6,"x":-1},{"y":22,"x":-34},{"y":46,"x":-56},{"y":74,"x":-81},{"y":107,"x":-106},{"y":142,"x":-128},{"y":176,"x":-146},{"y":210,"x":-163},{"y":251,"x":-177},{"y":293,"x":-189},{"y":334,"x":-197},{"y":373,"x":-199},{"y":422,"x":-201},{"y":472,"x":-199},{"y":520,"x":-192},{"y":560,"x":-184},{"y":600,"x":-174},{"y":643,"x":-156},{"y":686,"x":-133},{"y":727,"x":-108},{"y":761,"x":-83},{"y":794,"x":-54},{"y":824,"x":-23},{"y":859,"x":18},{"y":893,"x":64},{"y":923,"x":110}],"y":-450,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":944.2,"physic":true,"textureOffset":0,"shapeH":19,"width":327,"snapToGrid":false,"action":0,"wireframe":false,"type":1,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":1350,"vertices":[{"y":7,"x":-19},{"y":-4,"x":28},{"y":-14,"x":71},{"y":-31,"x":129},{"y":-54,"x":179},{"y":-76,"x":224},{"y":-109,"x":268},{"y":-142,"x":310},{"y":-177,"x":346},{"y":-213,"x":375},{"y":-248,"x":402},{"y":-293,"x":428},{"y":-339,"x":451},{"y":-389,"x":468},{"y":-428,"x":477},{"y":-479,"x":486},{"y":-511,"x":488},{"y":-512,"x":561},{"y":-468,"x":568},{"y":-391,"x":590},{"y":-339,"x":607},{"y":-337,"x":462}],"y":470,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"graphic":true,"height":537.85,"physic":true,"textureOffset":0,"shapeH":19,"width":645.55,"snapToGrid":false,"action":0,"wireframe":false,"type":1,"smoothing":true,"safeId":-1,"textureMode":true,"id":-1,"straightSides":true,"density":"1"}}],[{"className":"SignPillar","params":{"x":900,"y":430,"scaleX":1,"width":9.3,"rotation":0,"scaleY":0.6649785742111414,"height":85.35}},{"className":"Dec14","params":{"x":260,"y":360,"scaleX":1,"width":165.85,"rotation":0,"scaleY":1,"height":244.8}},{"className":"Dec29","params":{"rotation":0,"x":870,"height":82.25,"y":450,"width":63.15}},{"className":"Dec14","params":{"x":2667,"y":350,"scaleX":-1,"width":165.85,"rotation":0,"scaleY":1,"height":244.8}},{"className":"Dec15","params":{"x":2090,"y":350,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2}},{"className":"Dec15","params":{"x":2780,"y":350,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2}},{"className":"Dec34","params":{"rotation":18,"x":1680,"height":36.2,"y":400,"width":197.5}},{"className":"Dec34","params":{"rotation":-30,"x":2050,"height":36.2,"y":390,"width":197.5}}],[{"className":"GlassCrashed1","params":{"x":336,"ttl":0.5,"y":-28,"safeId":-1,"width":66,"rotation":90,"height":18}},{"className":"GlassCrashed1","params":{"x":342,"ttl":0.5,"y":-91,"safeId":-1,"width":66,"rotation":99.99999999999999,"height":18}},{"className":"GlassCrashed1","params":{"x":359,"ttl":0.5,"y":-151,"safeId":-1,"width":66,"rotation":111.99999999999999,"height":18}},{"className":"GlassCrashed1","params":{"x":338,"ttl":0.5,"y":32,"safeId":-1,"width":66,"rotation":84,"height":18}},{"className":"GlassCrashed1","params":{"x":1218,"ttl":0.5,"y":-184,"safeId":-1,"width":66,"rotation":-161,"height":18}},{"className":"GlassCrashed1","params":{"x":1156,"ttl":0.5,"y":-196,"safeId":-1,"width":66,"rotation":-176,"height":18}},{"className":"GlassCrashed1","params":{"x":1092,"ttl":0.5,"y":-198,"safeId":-1,"width":66,"rotation":0,"height":18}},{"className":"GlassCrashed0","params":{"x":405,"ttl":0.5,"y":-230,"safeId":-1,"width":132,"rotation":123.00000000000006,"height":18}},{"className":"GlassCrashed1","params":{"x":1822,"ttl":0.5,"y":-205,"safeId":1,"width":66,"rotation":-103.99999999999999,"height":18}},{"className":"GlassCrashed1","params":{"x":1972,"ttl":0.5,"y":160,"safeId":1,"width":66,"rotation":64,"height":18}},{"className":"GlassCrashed1","params":{"x":2001,"ttl":0.5,"y":212,"safeId":1,"width":66,"rotation":57,"height":18}},{"className":"GlassCrashed1","params":{"x":2038,"ttl":0.5,"y":261,"safeId":1,"width":66,"rotation":48.99999999999999,"height":18}},{"className":"GlassCrashed1","params":{"x":2305,"ttl":0.5,"y":42,"safeId":1,"width":66,"rotation":128.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":2344,"ttl":0.5,"y":5,"safeId":1,"width":66,"rotation":145.99999999999991,"height":18}},{"className":"GlassCrashed1","params":{"x":2392,"ttl":0.5,"y":-18,"safeId":1,"width":66,"rotation":163.99999999999997,"height":18}},{"className":"GlassCrashed1","params":{"x":2448,"ttl":0.5,"y":-26,"safeId":1,"width":66,"rotation":178.00000000000003,"height":18}},{"className":"GlassCrashed1","params":{"x":2277,"ttl":0.5,"y":91,"safeId":1,"width":66,"rotation":108.99999999999994,"height":18}},{"className":"GlassCrashed1","params":{"x":2266,"ttl":0.5,"y":147,"safeId":1,"width":66,"rotation":90.99999999999996,"height":18}},{"className":"GlassCrashed1","params":{"x":2274,"ttl":0.5,"y":207,"safeId":1,"width":66,"rotation":72.99999999999993,"height":18}},{"className":"GlassCrashed1","params":{"x":2298,"ttl":0.5,"y":252,"safeId":1,"width":66,"rotation":51.99999999999993,"height":18}},{"className":"GlassCrashed0","params":{"x":1834,"ttl":0.5,"y":-110,"safeId":1,"width":132,"rotation":87.00000000000006,"height":18}}],null,[{"className":"PlayerWP","params":{"rotation":0,"x":880,"height":32,"y":50,"width":64}},{"className":"SafePointE","params":{"x":900,"id":1,"y":400,"width":128,"rotation":0,"height":128}}]],"settings":{"theme":3,"countdown":0,"gravityY":500,"prizes":"24,32,43"}} \ No newline at end of file diff --git a/assets/levels/map22.json b/assets/levels/map22.json new file mode 100644 index 0000000..8a79a93 --- /dev/null +++ b/assets/levels/map22.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"32,40,49","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":660,"y":0,"length":660},{"x":620,"y":45,"length":621.6309194369276},{"x":30,"y":45,"length":54.08326913195984}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":4180,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-140},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":-180,"y":0,"length":180},{"x":420,"y":0,"length":420},{"x":420,"y":45,"length":422.4038352098617},{"x":-180,"y":45,"length":185.53975315279473}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3698,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-141},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":0,"length":25},{"x":65,"y":20,"length":68.00735254367721},{"x":65,"y":50,"length":82.00609733428362},{"x":0,"y":50,"length":50}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":4196,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":122},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":535,"y":0,"length":535},{"x":455,"y":45,"length":457.21985958617324},{"x":50,"y":45,"length":67.26812023536856}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":3599,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":122},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":-2925,"y":0,"length":2925},{"x":1180,"y":0,"length":1180},{"x":1345,"y":125,"length":1350.7960615873885},{"x":1381,"y":142,"length":1388.2813115503643},{"x":1420,"y":152,"length":1428.1120404225994},{"x":1462,"y":156,"length":1470.2992892605232},{"x":1508,"y":151,"length":1515.5411574747814},{"x":1550,"y":137,"length":1556.0427372022916},{"x":1585,"y":120,"length":1589.5360958468355},{"x":2002,"y":-165,"length":2008.787943014394},{"x":2056,"y":-198,"length":2065.5120430537313},{"x":2120,"y":-228,"length":2132.225128826691},{"x":2187,"y":-245,"length":2200.6803493465377},{"x":2263,"y":-254,"length":2277.209915664342},{"x":2343,"y":-251,"length":2356.4061619338886},{"x":2429,"y":-233,"length":2440.1495855787202},{"x":2529,"y":-184,"length":2535.6847201495693},{"x":2825,"y":-45,"length":2825.3583843470196},{"x":2950,"y":10,"length":2950.0169491038523},{"x":3065,"y":35,"length":3065.1998303536425},{"x":3180,"y":40,"length":3180.2515623767877},{"x":7635,"y":45,"length":7635.132611814938}],"lineId":0,"physic":true,"directed":true,"width":10573,"shape":true,"height":474.2,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":2900,"smoothing":true,"y":370,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"layer":0,"vertices":[{"x":135,"y":10,"length":135.36986370680884},{"x":775,"y":5,"length":775.0161288644256},{"x":680,"y":40,"length":681.1754546370561},{"x":220,"y":40,"length":223.60679774997897}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":-20.000000000000007,"plr":false,"line":true,"x":1042,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":260},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":522,"x":1712,"directed":false,"isPillar":false,"y":94,"thick":16,"direction":90,"snapToGrid":true,"vertices":[{"x":60,"y":275,"length":281.4693589007514},{"x":30,"y":235,"length":236.90715480964266},{"x":0,"y":185,"length":185},{"x":-15,"y":130,"length":130.86252328302402},{"x":-15,"y":60,"length":61.84658438426491},{"x":0,"y":0,"length":0},{"x":25,"y":-45,"length":51.478150704935004},{"x":65,"y":-88,"length":109.40292500660117},{"x":110,"y":-120,"length":162.78820596099706},{"x":159,"y":-141,"length":212.51352898109803},{"x":215,"y":-149,"length":261.5836386320826},{"x":265,"y":-148,"length":303.52759347380595},{"x":312,"y":-136,"length":340.3527581789224},{"x":354,"y":-117,"length":372.83374310810444},{"x":394,"y":-88,"length":403.7078151336682},{"x":429,"y":-52,"length":432.1400236034612},{"x":456,"y":-15,"length":456.2466438232724},{"x":480,"y":32,"length":481.06548410793306},{"x":506,"y":75,"length":511.5281028447997},{"x":540,"y":115,"length":552.1095905705678},{"x":584,"y":156,"length":604.4766331298506},{"x":637,"y":193,"length":665.5959735455135},{"x":687,"y":225,"length":722.9066329755178},{"x":736,"y":248,"length":776.659513557904},{"x":820,"y":270,"length":863.3075929238663},{"x":895,"y":279,"length":937.4785330875583},{"x":977,"y":276,"length":1015.2364256664553},{"x":1036,"y":264,"length":1069.1080394422258},{"x":1097,"y":244,"length":1123.8082576667605},{"x":1160,"y":212,"length":1179.2132970756393},{"x":1229,"y":160,"length":1239.371211542369},{"x":1292,"y":103,"length":1296.0991474420466},{"x":1344,"y":33,"length":1344.4050728854008},{"x":1381,"y":-40,"length":1381.579168922288},{"x":1405,"y":-130,"length":1411.0014174337316},{"x":1430,"y":-170,"length":1440.0694427700353},{"x":1465,"y":-200,"length":1478.5888542796472},{"x":1515,"y":-220,"length":1530.8902638660943},{"x":1585,"y":-230,"length":1601.6007617380806},{"x":1665,"y":-230,"length":1680.8108162431606},{"x":1745,"y":-230,"length":1760.0923271237791},{"x":1810,"y":-230,"length":1824.5547402037573}],"rotation":0,"width":1838},"className":"frg.game.editor.objects::BonesPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":25,"y":-34,"length":42.20189569201838},{"x":25,"y":206,"length":207.51144546747295},{"x":46,"y":269,"length":272.90474528670256},{"x":93,"y":316,"length":329.40097146183405},{"x":486,"y":468,"length":674.6999333036872}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":538.35,"x":3490,"isStatic":true,"repeatTexture":true,"id":-1,"width":504.55,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-100,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"height":477,"x":4973,"directed":false,"isPillar":false,"y":-230,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-133,"y":99,"length":165.8010856418015},{"x":-49,"y":85,"length":98.11218069128827},{"x":6,"y":61,"length":61.29437168288782},{"x":53,"y":28,"length":59.941638282582836},{"x":97,"y":-24,"length":99.92497185388645},{"x":117,"y":-72,"length":137.37903770226373},{"x":130,"y":-137,"length":188.86238376129853},{"x":130,"y":-199,"length":237.69938998659632},{"x":115,"y":-264,"length":287.9600666759195},{"x":84,"y":-314,"length":325.0415358073488},{"x":51,"y":-342,"length":345.7817230566127},{"x":8,"y":-361,"length":361.08863177895813},{"x":-38,"y":-365,"length":366.9727510320078},{"x":-73,"y":-362,"length":369.28715114393026},{"x":-112,"y":-347,"length":364.6272068839625}],"rotation":0,"width":276},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":767,"x":5111,"directed":false,"isPillar":false,"y":135,"thick":16,"direction":90,"snapToGrid":true,"vertices":[{"x":895,"y":279,"length":937.4785330875583},{"x":977,"y":276,"length":1015.2364256664553},{"x":1036,"y":264,"length":1069.1080394422258},{"x":1097,"y":244,"length":1123.8082576667605},{"x":1160,"y":212,"length":1179.2132970756393},{"x":1229,"y":160,"length":1239.371211542369},{"x":1292,"y":103,"length":1296.0991474420466},{"x":1344,"y":33,"length":1344.4050728854008},{"x":1381,"y":-40,"length":1381.579168922288},{"x":1405,"y":-130,"length":1411.0014174337316},{"x":1425,"y":-240,"length":1445.0692024951609},{"x":1435,"y":-310,"length":1468.1025168563672},{"x":1445,"y":-370,"length":1491.6182487486535},{"x":1455,"y":-415,"length":1513.0267677737893},{"x":1490,"y":-445,"length":1555.0321540083987},{"x":1540,"y":-465,"length":1608.6718123967983},{"x":1610,"y":-475,"length":1678.6080543116668},{"x":1690,"y":-475,"length":1755.4842636719932},{"x":1770,"y":-475,"length":1832.6278945819852},{"x":1850,"y":-475,"length":1910.0065444914057},{"x":1945,"y":-475,"length":2002.1613321608227},{"x":2030,"y":-475,"length":2084.832127534493},{"x":2110,"y":-475,"length":2162.8048918013847},{"x":2180,"y":-475,"length":2231.1488072291368},{"x":2265,"y":-475,"length":2314.2709435154734},{"x":2345,"y":-475,"length":2392.62408246678},{"x":2410,"y":-475,"length":2456.3641830966353},{"x":2475,"y":-475,"length":2520.168645150558},{"x":2550,"y":-475,"length":2593.862949347941},{"x":2630,"y":-475,"length":2672.5502801631255},{"x":2735,"y":-475,"length":2775.941281799743},{"x":2770,"y":-475,"length":2810.4314615375342},{"x":2805,"y":-475,"length":2844.934094139968},{"x":2838,"y":-461,"length":2875.198254033972},{"x":2865,"y":-441,"length":2898.742140998402},{"x":2884,"y":-420,"length":2914.4220696391935},{"x":2898,"y":-398,"length":2925.2022152323075},{"x":2909,"y":-372,"length":2932.689039090234},{"x":2913,"y":-342,"length":2933.0075008427784},{"x":2910,"y":-313,"length":2926.7847546411745},{"x":2903,"y":-287,"length":2917.1523786048615},{"x":2889,"y":-258,"length":2900.497371141715},{"x":2867,"y":-233,"length":2876.452328824519},{"x":2833,"y":-211,"length":2840.846704769548},{"x":2788,"y":-187,"length":2794.2643038910974},{"x":2736,"y":-155,"length":2740.387016463186},{"x":2684,"y":-124,"length":2686.8628547062094},{"x":2643,"y":-98,"length":2644.8162507062752},{"x":2597,"y":-68,"length":2597.89010545096},{"x":2559,"y":-43,"length":2559.361248436805},{"x":2519,"y":-18,"length":2519.0643104136902},{"x":2492,"y":0,"length":2492},{"x":2470,"y":20,"length":2470.080970332754},{"x":2452,"y":47,"length":2452.4504072457817},{"x":2439,"y":73,"length":2440.092211372349},{"x":2434,"y":107,"length":2436.3507547149284},{"x":2434,"y":136,"length":2437.7965460636783},{"x":2442,"y":164,"length":2447.500766087725},{"x":2456,"y":186,"length":2463.0330895057014},{"x":2474,"y":210,"length":2482.896695394313},{"x":2500,"y":233,"length":2510.834323486916},{"x":2529,"y":248,"length":2541.1306538625677},{"x":2562,"y":256,"length":2574.7582410781793},{"x":2595,"y":256,"length":2607.5967863149394},{"x":2627,"y":248,"length":2638.68016250549},{"x":2668,"y":230,"length":2677.895442320331},{"x":2720,"y":200,"length":2727.343029396926},{"x":2765,"y":170,"length":2770.221110308706},{"x":2810,"y":140,"length":2813.485382936972},{"x":2850,"y":115,"length":2852.3192317831467},{"x":2895,"y":85,"length":2896.2475722907393},{"x":2940,"y":55,"length":2940.5144107791753},{"x":2975,"y":35,"length":2975.2058752294774},{"x":3013,"y":12,"length":3013.02389635396},{"x":3048,"y":1,"length":3048.0001640419905},{"x":3081,"y":0,"length":3081},{"x":3118,"y":15,"length":3118.0360806122817},{"x":3160,"y":40,"length":3160.253154416589},{"x":3193,"y":66,"length":3193.6820442868134},{"x":3230,"y":100,"length":3231.54761685481},{"x":3265,"y":130,"length":3267.587030210519},{"x":3300,"y":160,"length":3303.8765110094537},{"x":3330,"y":185,"length":3335.13492980419},{"x":3365,"y":215,"length":3371.861503680126},{"x":3407,"y":245,"length":3415.797710638029},{"x":3459,"y":273,"length":3469.756475604592},{"x":3507,"y":277,"length":3517.9223982345034},{"x":3550,"y":268,"length":3560.101683941064},{"x":3591,"y":241,"length":3599.077937472319},{"x":3640,"y":200,"length":3645.490364820623},{"x":3695,"y":155,"length":3698.249585952792},{"x":3750,"y":110,"length":3751.612986436634},{"x":3805,"y":70,"length":3805.643835148003},{"x":3850,"y":35,"length":3850.1590876222244},{"x":3894,"y":4,"length":3894.0020544421905},{"x":3922,"y":-21,"length":3922.056220912699},{"x":3942,"y":-53,"length":3942.356275122785},{"x":3953,"y":-96,"length":3954.1655251139905},{"x":3957,"y":-147,"length":3959.7295362183513},{"x":3955,"y":-185,"length":3959.3244373251355},{"x":3970,"y":-235,"length":3976.9492076213396},{"x":4010,"y":-270,"length":4019.079496601181},{"x":4070,"y":-290,"length":4080.3186150103525},{"x":4140,"y":-290,"length":4150.1445757949205},{"x":4210,"y":-290,"length":4219.976303251003},{"x":4285,"y":-290,"length":4294.802090900115},{"x":4350,"y":-290,"length":4359.655949728143},{"x":4410,"y":-290,"length":4419.524861339734},{"x":4485,"y":-290,"length":4494.3659174571},{"x":4550,"y":-290,"length":4559.232391532592},{"x":4635,"y":-290,"length":4644.063414726375},{"x":4710,"y":-290,"length":4718.919367821409},{"x":4785,"y":-290,"length":4793.779823896796},{"x":4865,"y":-290,"length":4873.635706533676},{"x":4940,"y":-290,"length":4948.504824692},{"x":5010,"y":-290,"length":5018.386194784136},{"x":5080,"y":-290,"length":5088.270826125512},{"x":5175,"y":-290,"length":5183.119234592235},{"x":5235,"y":-290,"length":5243.02632074263},{"x":5305,"y":-290,"length":5312.9205715877215},{"x":5365,"y":-290,"length":5372.832120958183},{"x":5712,"y":-298,"length":5719.768177120468}],"rotation":0,"width":4830},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":1692,"x":9850,"y":-1000,"rotation":0,"width":1242},"className":"FinishZone"},{"params":{"height":387,"x":8224,"directed":false,"isPillar":false,"y":-287,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":319,"y":-84,"length":329.874218453034},{"x":261,"y":-83,"length":273.87953556262653},{"x":188,"y":-78,"length":203.53869410998982},{"x":123,"y":-70,"length":141.52384958020326},{"x":76,"y":-66,"length":100.65783625729296},{"x":50,"y":-87,"length":100.34440691936945},{"x":65,"y":-135,"length":149.83324063771698},{"x":74,"y":-198,"length":211.3764414498456},{"x":66,"y":-250,"length":258.5652722234755},{"x":38,"y":-309,"length":311.3278015211619},{"x":11,"y":-351,"length":351.17232237179513},{"x":-24,"y":-386,"length":386.7453942841466},{"x":-71,"y":-419,"length":424.9729403150276},{"x":-125,"y":-440,"length":457.4111935665764}],"rotation":0,"width":457},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":100,"y":0,"length":100},{"x":95,"y":455,"length":464.81178986768396},{"x":-5,"y":455,"length":455.02747169813824}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":0,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-80},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"height":128.35,"x":3334,"y":-205,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":7590,"y":-410,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":960,"y":323,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":995,"y":306,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":70.65,"x":996,"y":243,"rotation":0,"width":70.65},"className":"Sign2"},{"params":{"height":79.6,"x":3368,"y":-177,"rotation":0,"scaleX":-1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":7554,"y":-390,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":95.5,"x":8940,"y":370,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"}],[{"params":{"height":18,"x":1190,"y":302,"rotation":90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":8638,"y":-393,"rotation":170.00000000000006,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9043,"y":-169,"rotation":-110.99999999999994,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8700,"y":-399,"rotation":179,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8762,"y":-395,"rotation":-172.00000000000006,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9062,"y":-108,"rotation":-103,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8823,"y":-381,"rotation":-162,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9072,"y":-46,"rotation":-94.99999999999996,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8881,"y":-355,"rotation":-151,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8933,"y":-319,"rotation":-140,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8978,"y":-275,"rotation":-131.99999999999994,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9015,"y":-225,"rotation":-121.99999999999991,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8578,"y":-378,"rotation":161.00000000000009,"safeId":2,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":4150,"y":-135,"rotation":0,"safeId":1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":4163,"y":133,"rotation":0,"safeId":1,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":99,"force":6000,"y":220,"rotation":0,"safeId":2,"x":8800,"time":2,"width":100},"className":"BoostE"},{"params":{"height":99,"force":6000,"y":180,"rotation":0,"safeId":2,"x":7990,"time":2,"width":100},"className":"BoostE"}],null,[{"params":{"height":32,"x":480,"y":270,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":2998,"x":3330,"y":-260,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":1440,"x":7590,"y":-480,"width":128,"id":2,"rotation":0},"className":"SafePointE"}],[{"params":{"height":17,"x":4800,"id":-1,"rotation":0,"safeId":1,"graphic":1,"y":-120,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3640,"id":-1,"rotation":0,"safeId":1,"graphic":1,"y":140,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":1763,"id":-1,"rotation":0,"safeId":-1,"graphic":0,"y":6,"width":17},"className":"PivotJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map23.json b/assets/levels/map23.json new file mode 100644 index 0000000..9835c49 --- /dev/null +++ b/assets/levels/map23.json @@ -0,0 +1 @@ +{"layers":[[{"params":{"x":4801,"plr":false,"vertices":[{"y":0,"x":0},{"y":-24,"x":35},{"y":-47,"x":80},{"y":-61,"x":137},{"y":-61,"x":194},{"y":-48,"x":250},{"y":-30,"x":292},{"y":5,"x":335},{"y":34,"x":364},{"y":93,"x":397},{"y":135,"x":409},{"y":187,"x":416},{"y":229,"x":411},{"y":277,"x":397},{"y":331,"x":366},{"y":367,"x":335},{"y":396,"x":298},{"y":420,"x":249},{"y":432,"x":199},{"y":432,"x":140},{"y":420,"x":86},{"y":395,"x":35},{"y":365,"x":-4},{"y":323,"x":-39},{"y":266,"x":-69},{"y":208,"x":-81},{"y":153,"x":-78},{"y":99,"x":-66},{"y":42,"x":-35}],"y":2067,"isStatic":false,"density":0.7,"rem":true,"layer":3,"physic":true,"rotation":0,"ignore":false,"isWheel":false,"line":true,"id":-1,"graphic":true,"safeId":1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"rotation":0,"x":8570,"height":372,"y":-962,"width":1261},"className":"FinishZone"},{"params":{"density":2.5,"x":4480,"id":-1,"vertices":[{"y":0,"x":0},{"y":0,"x":1030},{"y":835,"x":1035},{"y":835,"x":5}],"y":1640,"viscosity":1.5,"rotation":0,"bg":true,"sf":true},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"x":-50,"vertices":[{"y":0,"x":0},{"y":55,"x":135},{"y":99,"x":220},{"y":126,"x":318},{"y":133,"x":403},{"y":133,"x":655},{"y":135,"x":857},{"y":168,"x":865},{"y":175,"x":911},{"y":217,"x":1025},{"y":285,"x":1125},{"y":351,"x":1221},{"y":435,"x":1349},{"y":487,"x":1473},{"y":527,"x":1627},{"y":563,"x":1848},{"y":619,"x":2639},{"y":608,"x":2721},{"y":572,"x":2797},{"y":519,"x":2857},{"y":446,"x":2903},{"y":361,"x":2923},{"y":295,"x":2937},{"y":268,"x":2972},{"y":261,"x":3021},{"y":279,"x":3067},{"y":325,"x":3113},{"y":489,"x":3239},{"y":1310,"x":3952},{"y":1375,"x":4033},{"y":1415,"x":4127},{"y":1423,"x":4185},{"y":1424,"x":4255},{"y":1411,"x":4311},{"y":1380,"x":4376},{"y":1326,"x":4446},{"y":1308,"x":4517},{"y":1315,"x":4548},{"y":1343,"x":4570},{"y":2264,"x":4569},{"y":2269,"x":5554}],"y":290,"shape":true,"physic":true,"directed":true,"textureOffset":0,"originOffsetRatio":0,"stretchTexture":false,"isRoad":true,"thick":128,"width":5572.55,"rotation":0,"height":2330.65,"direction":90,"straightSides":true,"wireframe":false,"snapToGrid":false,"camera":false,"smoothing":true,"line":true,"lineId":0,"cameraOffsetY":120,"repeatTexture":true,"textureMode":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":1340,"plr":false,"vertices":[{"y":-40,"x":-1800},{"y":-870,"x":-1655},{"y":-1205,"x":-1025},{"y":-1240,"x":-120},{"y":-1445,"x":1465},{"y":-1380,"x":5400},{"y":-1878,"x":6900},{"y":-1218,"x":6801},{"y":-858,"x":6803},{"y":-858,"x":7776},{"y":-907,"x":7809},{"y":-945,"x":7854},{"y":-969,"x":7925},{"y":-974,"x":8897},{"y":-968,"x":8922},{"y":-959,"x":8941},{"y":-938,"x":8960},{"y":-909,"x":8965},{"y":-884,"x":8964},{"y":-857,"x":8951},{"y":-834,"x":8926},{"y":-827,"x":8892},{"y":-820,"x":8066},{"y":-806,"x":8015},{"y":-784,"x":7974},{"y":-752,"x":7935},{"y":-688,"x":7915},{"y":-499,"x":7919},{"y":-195,"x":7921},{"y":-143,"x":7917},{"y":-99,"x":7893},{"y":-69,"x":7858},{"y":-60,"x":7813},{"y":-63,"x":7761},{"y":-84,"x":7729},{"y":-128,"x":7687},{"y":-198,"x":7641},{"y":-281,"x":7584},{"y":-359,"x":7515},{"y":-417,"x":7452},{"y":-480,"x":7377},{"y":-534,"x":7277},{"y":-570,"x":7200},{"y":-587,"x":7125},{"y":-600,"x":7057},{"y":-603,"x":6977},{"y":-599,"x":6887},{"y":-582,"x":6782},{"y":-546,"x":6662},{"y":-514,"x":6599},{"y":-475,"x":6544},{"y":-425,"x":6475},{"y":-371,"x":6418},{"y":-317,"x":6372},{"y":-235,"x":6311},{"y":-165,"x":6280},{"y":-111,"x":6257},{"y":-53,"x":6239},{"y":1,"x":6223},{"y":48,"x":6211},{"y":82,"x":6188},{"y":101,"x":6158},{"y":105,"x":5410},{"y":110,"x":4958},{"y":55,"x":4865},{"y":40,"x":4790},{"y":43,"x":4717},{"y":66,"x":4653},{"y":112,"x":4595},{"y":165,"x":4550},{"y":215,"x":4525},{"y":280,"x":4515},{"y":980,"x":4520},{"y":1020,"x":4510},{"y":1035,"x":4480},{"y":1030,"x":4385},{"y":1010,"x":4315},{"y":1000,"x":4220},{"y":970,"x":4140},{"y":910,"x":4050},{"y":870,"x":3975},{"y":860,"x":3915},{"y":845,"x":3830},{"y":845,"x":3740},{"y":850,"x":3675},{"y":860,"x":3605},{"y":885,"x":3535},{"y":920,"x":3460},{"y":955,"x":3395},{"y":990,"x":3350},{"y":1030,"x":3300},{"y":1105,"x":3245},{"y":1195,"x":3180},{"y":1270,"x":3120},{"y":1310,"x":3055},{"y":1340,"x":2975},{"y":1335,"x":2860},{"y":1295,"x":2740},{"y":1185,"x":2640},{"y":955,"x":2500},{"y":800,"x":2370},{"y":665,"x":2295},{"y":485,"x":2265},{"y":355,"x":2204},{"y":275,"x":2145},{"y":220,"x":2080},{"y":185,"x":2010},{"y":170,"x":1945},{"y":115,"x":1890},{"y":15,"x":1870},{"y":-80,"x":1815},{"y":-130,"x":1735},{"y":-155,"x":1635},{"y":-135,"x":1565},{"y":-75,"x":1490},{"y":37,"x":1460},{"y":280,"x":1404},{"y":453,"x":1366},{"y":553,"x":1297},{"y":593,"x":1188},{"y":614,"x":1057},{"y":651,"x":868},{"y":645,"x":762},{"y":614,"x":645},{"y":571,"x":557},{"y":555,"x":481},{"y":554,"x":425},{"y":560,"x":356},{"y":568,"x":256},{"y":568,"x":211},{"y":553,"x":168},{"y":525,"x":147},{"y":420,"x":140},{"y":420,"x":215},{"y":351,"x":215},{"y":330,"x":290},{"y":305,"x":350},{"y":269,"x":421},{"y":222,"x":465},{"y":183,"x":495},{"y":137,"x":514},{"y":99,"x":522},{"y":48,"x":520},{"y":0,"x":506},{"y":-51,"x":476},{"y":-95,"x":431},{"y":-123,"x":374},{"y":-132,"x":321},{"y":-129,"x":268},{"y":-109,"x":210},{"y":-75,"x":164},{"y":-40,"x":140},{"y":-65,"x":120},{"y":-75,"x":90},{"y":-40,"x":18},{"y":-26,"x":-8},{"y":85,"x":-280},{"y":103,"x":-450},{"y":105,"x":-638},{"y":91,"x":-843},{"y":81,"x":-995},{"y":90,"x":-1127},{"y":125,"x":-1189},{"y":191,"x":-1222},{"y":272,"x":-1225},{"y":1405,"x":-1135},{"y":1490,"x":-1765}],"y":80,"isStatic":true,"density":1,"rem":true,"layer":2,"physic":true,"rotation":0,"ignore":false,"isWheel":false,"line":true,"id":-1,"graphic":true,"safeId":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":5620,"plr":false,"vertices":[{"y":75,"x":260},{"y":104,"x":312},{"y":117,"x":357},{"y":125,"x":400},{"y":119,"x":442},{"y":103,"x":479},{"y":77,"x":514},{"y":48,"x":540},{"y":13,"x":555},{"y":-33,"x":563},{"y":-856,"x":557},{"y":-890,"x":595},{"y":-890,"x":1420},{"y":-890,"x":1895},{"y":-898,"x":1957},{"y":-912,"x":2008},{"y":-932,"x":2058},{"y":-959,"x":2098},{"y":-988,"x":2132},{"y":-1033,"x":2176},{"y":-1067,"x":2203},{"y":-1098,"x":2222},{"y":-1135,"x":2240},{"y":-1179,"x":2257},{"y":-1167,"x":2330},{"y":-1211,"x":2334},{"y":-1254,"x":2339},{"y":-1296,"x":2353},{"y":-1336,"x":2371},{"y":-1378,"x":2395},{"y":-1418,"x":2422},{"y":-1448,"x":2453},{"y":-1475,"x":2480},{"y":-1499,"x":2515},{"y":-1515,"x":2544},{"y":-1530,"x":2576},{"y":-1562,"x":2574},{"y":-1588,"x":2584},{"y":-1602,"x":2610},{"y":-1605,"x":2646},{"y":-1585,"x":2685},{"y":-1161,"x":3340},{"y":-1137,"x":3396},{"y":-1122,"x":3452},{"y":-1117,"x":3504},{"y":-1120,"x":3557},{"y":-1127,"x":3611},{"y":-1143,"x":3661},{"y":-1159,"x":3697},{"y":-1182,"x":3734},{"y":-1207,"x":3767},{"y":-1237,"x":3798},{"y":-1275,"x":3831},{"y":-1314,"x":3857},{"y":-1362,"x":3880},{"y":-1408,"x":3896},{"y":-1461,"x":3901},{"y":-1481,"x":3930},{"y":-1484,"x":4018},{"y":-1862,"x":4020},{"y":-1862,"x":3974},{"y":-1889,"x":3985},{"y":-1905,"x":4010},{"y":-1905,"x":4596},{"y":-1910,"x":4658},{"y":-1923,"x":4712},{"y":-1945,"x":4761},{"y":-1975,"x":4803},{"y":-2008,"x":4838},{"y":-2047,"x":4874},{"y":-2099,"x":4904},{"y":-2153,"x":4921},{"y":-2213,"x":4929},{"y":-2263,"x":4929},{"y":-2324,"x":4915},{"y":-2374,"x":4897},{"y":-2418,"x":4865},{"y":-2467,"x":4821},{"y":-2497,"x":4783},{"y":-2520,"x":4740},{"y":-2536,"x":4694},{"y":-2548,"x":4625},{"y":-2540,"x":2487},{"y":-3207,"x":2585},{"y":-3782,"x":6635},{"y":-1225,"x":6620},{"y":248,"x":5300},{"y":320,"x":4117},{"y":215,"x":2055},{"y":635,"x":867},{"y":926,"x":564},{"y":1182,"x":-124},{"y":160,"x":-120},{"y":65,"x":-76},{"y":12,"x":-25},{"y":-5,"x":30},{"y":5,"x":95},{"y":25,"x":165}],"y":1410,"isStatic":true,"density":1,"rem":true,"layer":2,"physic":true,"rotation":0,"ignore":false,"isWheel":false,"line":true,"id":-1,"graphic":true,"safeId":-1},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"x":-50,"vertices":[{"y":0,"x":0},{"y":55,"x":135},{"y":99,"x":220},{"y":126,"x":318},{"y":132,"x":388},{"y":133,"x":655},{"y":135,"x":857},{"y":163,"x":935},{"y":217,"x":1025},{"y":285,"x":1125},{"y":351,"x":1221},{"y":435,"x":1349},{"y":487,"x":1473},{"y":527,"x":1627},{"y":563,"x":1848},{"y":619,"x":2639},{"y":608,"x":2721},{"y":572,"x":2797},{"y":519,"x":2857},{"y":446,"x":2903},{"y":361,"x":2923},{"y":295,"x":2937},{"y":268,"x":2972},{"y":261,"x":3021},{"y":273,"x":3063},{"y":315,"x":3107},{"y":489,"x":3239},{"y":1310,"x":3952},{"y":1375,"x":4033},{"y":1422,"x":4143},{"y":1428,"x":4291},{"y":1379,"x":4854},{"y":1357,"x":5406},{"y":1252,"x":6117},{"y":1199,"x":6232},{"y":523,"x":6350},{"y":449,"x":6400},{"y":399,"x":6466},{"y":366,"x":7034},{"y":25,"x":9282},{"y":-851,"x":10871},{"y":-96,"x":11133},{"y":-127,"x":11308},{"y":-197,"x":11493}],"y":290,"shape":false,"physic":false,"directed":false,"textureOffset":0,"originOffsetRatio":0,"stretchTexture":false,"isRoad":false,"thick":128,"width":11506,"rotation":0,"height":2292,"direction":90,"straightSides":true,"wireframe":false,"snapToGrid":false,"camera":true,"smoothing":true,"line":false,"lineId":0,"cameraOffsetY":120,"repeatTexture":true,"textureMode":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":820,"vertices":[{"y":0,"x":0},{"y":-12,"x":729}],"y":440,"height":31,"shapeH":19,"isStatic":false,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":742,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":7935,"vertices":[{"y":0,"x":0},{"y":-51,"x":3},{"y":-101,"x":12},{"y":-151,"x":27},{"y":-196,"x":48},{"y":-232,"x":70},{"y":-265,"x":96},{"y":-296,"x":126},{"y":-322,"x":158},{"y":-347,"x":192},{"y":-363,"x":223},{"y":-378,"x":264}],"y":243,"height":414.55,"shapeH":64,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":306.95,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":5,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":9620,"vertices":[{"y":0,"x":0},{"y":-392,"x":1}],"y":-70,"height":405,"shapeH":64,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":65,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":5,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":10260,"vertices":[{"y":-149,"x":-233},{"y":-149,"x":-7},{"y":-138,"x":19},{"y":-124,"x":36},{"y":-98,"x":53},{"y":-75,"x":61},{"y":-49,"x":61},{"y":-17,"x":50},{"y":8,"x":30},{"y":24,"x":6},{"y":29,"x":-26},{"y":33,"x":-694},{"y":35,"x":-860},{"y":46,"x":-900},{"y":72,"x":-940},{"y":98,"x":-973},{"y":148,"x":-988},{"y":650,"x":-980},{"y":693,"x":-985},{"y":738,"x":-1004},{"y":768,"x":-1033},{"y":786,"x":-1063},{"y":795,"x":-1095},{"y":797,"x":-1129},{"y":791,"x":-1165},{"y":773,"x":-1198},{"y":757,"x":-1221},{"y":694,"x":-1268},{"y":618,"x":-1317},{"y":549,"x":-1368},{"y":494,"x":-1417},{"y":429,"x":-1484},{"y":387,"x":-1540},{"y":346,"x":-1597},{"y":315,"x":-1663},{"y":286,"x":-1734},{"y":266,"x":-1805},{"y":256,"x":-1879},{"y":252,"x":-1967},{"y":258,"x":-2045},{"y":268,"x":-2107},{"y":284,"x":-2182},{"y":308,"x":-2253},{"y":340,"x":-2313},{"y":378,"x":-2373},{"y":426,"x":-2433},{"y":477,"x":-2485},{"y":532,"x":-2533},{"y":590,"x":-2577},{"y":648,"x":-2611},{"y":706,"x":-2639},{"y":768,"x":-2662},{"y":842,"x":-2678},{"y":903,"x":-2697},{"y":933,"x":-2717},{"y":960,"x":-2757},{"y":961,"x":-3955},{"y":918,"x":-4021},{"y":900,"x":-4073},{"y":885,"x":-4132},{"y":890,"x":-4202},{"y":908,"x":-4270},{"y":946,"x":-4320},{"y":980,"x":-4349},{"y":1012,"x":-4375},{"y":1054,"x":-4395},{"y":1087,"x":-4401},{"y":1835,"x":-4396},{"y":1868,"x":-4404},{"y":1885,"x":-4433},{"y":1881,"x":-4523},{"y":1863,"x":-4593},{"y":1853,"x":-4644},{"y":1849,"x":-4704},{"y":1826,"x":-4763},{"y":1792,"x":-4825},{"y":1755,"x":-4873},{"y":1726,"x":-4941},{"y":1715,"x":-4988},{"y":1701,"x":-5054},{"y":1692,"x":-5121},{"y":1690,"x":-5192},{"y":1698,"x":-5262},{"y":1710,"x":-5329},{"y":1740,"x":-5412},{"y":1770,"x":-5472},{"y":1800,"x":-5523},{"y":1832,"x":-5568},{"y":1870,"x":-5615},{"y":1924,"x":-5656},{"y":1967,"x":-5688},{"y":2006,"x":-5717},{"y":2054,"x":-5751},{"y":2100,"x":-5785},{"y":2120,"x":-5810},{"y":2148,"x":-5849},{"y":2170,"x":-5885},{"y":2182,"x":-5936},{"y":2184,"x":-6008},{"y":2176,"x":-6062},{"y":2162,"x":-6127},{"y":2138,"x":-6181},{"y":2107,"x":-6222},{"y":2069,"x":-6254},{"y":2034,"x":-6279},{"y":1976,"x":-6314},{"y":1929,"x":-6339},{"y":1894,"x":-6363},{"y":1852,"x":-6391},{"y":1808,"x":-6417},{"y":1752,"x":-6460},{"y":1702,"x":-6500},{"y":1637,"x":-6557},{"y":1554,"x":-6603},{"y":1518,"x":-6624},{"y":1477,"x":-6637},{"y":1420,"x":-6645},{"y":1373,"x":-6650},{"y":1323,"x":-6659},{"y":1258,"x":-6693},{"y":1196,"x":-6724},{"y":1141,"x":-6755},{"y":1112,"x":-6784},{"y":1058,"x":-6852},{"y":1025,"x":-6913},{"y":1017,"x":-6971},{"y":993,"x":-7003},{"y":959,"x":-7029},{"y":904,"x":-7049},{"y":858,"x":-7055},{"y":808,"x":-7076},{"y":766,"x":-7105},{"y":739,"x":-7145},{"y":718,"x":-7185},{"y":699,"x":-7234},{"y":692,"x":-7285},{"y":712,"x":-7351},{"y":743,"x":-7395},{"y":774,"x":-7429},{"y":1297,"x":-7550},{"y":1351,"x":-7587},{"y":1394,"x":-7623},{"y":1422,"x":-7678},{"y":1439,"x":-7733},{"y":1497,"x":-8052},{"y":1491,"x":-8153},{"y":1462,"x":-8266},{"y":1441,"x":-8309},{"y":1413,"x":-8369},{"y":1398,"x":-8440},{"y":1396,"x":-8494},{"y":1410,"x":-8678},{"y":1411,"x":-8708},{"y":1397,"x":-8751},{"y":1370,"x":-8776},{"y":1262,"x":-8778}],"y":-760,"height":2397.05,"shapeH":64,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":8903,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":5,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"x":2518,"y":861,"scaleX":1.3225806451612903,"width":12.3,"rotation":9,"scaleY":0.7195169458511882,"height":92.35},"className":"SignPillar"},{"params":{"x":5758,"y":1376,"scaleX":1,"width":9.3,"rotation":9,"scaleY":0.7896377093883911,"height":101.35},"className":"SignPillar"},{"params":{"x":6500,"y":460,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35},"className":"SignPillar"},{"params":{"x":9790,"y":-536,"scaleX":1,"width":9.3,"rotation":0,"scaleY":0.6805609661082976,"height":87.3},"className":"SignPillar"},{"params":{"x":660,"y":310,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2},"className":"Dec15"},{"params":{"rotation":9,"x":2481,"height":82.25,"y":880,"width":63.15},"className":"Dec29"},{"params":{"x":2920,"y":450,"scaleX":1,"width":171.75,"rotation":9,"scaleY":1,"height":213.45},"className":"Dec13"},{"params":{"x":3406,"y":880,"scaleX":-1,"width":165.85,"rotation":36,"scaleY":1,"height":244.8},"className":"Dec14"},{"params":{"x":4547,"y":1500,"scaleX":-1,"width":171.75,"rotation":0,"scaleY":1,"height":213.45},"className":"Dec13"},{"params":{"rotation":15,"x":5725,"height":82.25,"y":1399,"width":63.15},"className":"Dec29"},{"params":{"rotation":0,"x":6468,"height":82.25,"y":501,"width":63.15},"className":"Dec29"},{"params":{"x":7317,"y":400,"scaleX":-1,"width":171.75,"rotation":-9,"scaleY":1,"height":213.45},"className":"Dec13"},{"params":{"x":8480,"y":-200,"scaleX":1,"width":197,"rotation":33,"scaleY":1,"height":234.2},"className":"Dec15"},{"params":{"rotation":0,"x":9760,"height":82.25,"y":-516,"width":63.15},"className":"Dec29"},{"params":{"x":7340,"y":400,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2},"className":"Dec15"}],[{"params":{"x":1520,"impulse":3000,"count":40,"y":470,"width":53.2,"stones":false,"height":53.2,"physic":true,"rotation":0,"id":1,"safeId":-1,"radius":64},"className":"Tnt1"},{"params":{"x":6100,"force":5000,"y":1460,"width":100,"rotation":0,"height":99,"safeId":2,"time":1},"className":"BoostE"},{"params":{"speed":1000,"x":6040,"id":-1,"y":430,"width":361,"rotation":0,"height":128,"safeId":-1,"rate":1},"className":"GeyserE"}],null,[{"params":{"rotation":0,"x":450,"height":32,"y":350,"width":64},"className":"PlayerWP"},{"params":{"x":2520,"id":1,"y":810,"width":128,"rotation":0,"height":619},"className":"SafePointE"},{"params":{"x":5760,"id":2,"y":1320,"width":128,"rotation":0,"height":566},"className":"SafePointE"},{"params":{"x":6500,"id":3,"y":380,"width":128,"rotation":0,"height":876},"className":"SafePointE"},{"params":{"x":9790,"id":4,"y":-590,"width":128,"rotation":0,"height":807},"className":"SafePointE"}],[{"params":{"x":830,"id":-1,"y":440,"width":17,"rotation":0,"graphic":0,"height":17,"safeId":-1},"className":"PivotJointE"},{"params":{"rotation":-39,"x":1850,"id":1,"safeId":-1,"id_off":-1,"width":808,"sndId":-1,"off":false,"height":64,"hint":-1,"y":-200},"className":"ToggleE"},{"params":{"rotation":33,"x":3960,"id":2,"safeId":1,"id_off":-1,"width":64,"sndId":-1,"off":false,"height":1224,"hint":-1,"y":1370},"className":"ToggleE"},{"params":{"x":4970,"id":2,"y":2491,"width":17,"rotation":0,"graphic":0,"height":17,"safeId":1},"className":"PivotJointE"}]],"settings":{"countdown":0,"prizes":"28,34,42","theme":3,"gravityY":500}} \ No newline at end of file diff --git a/assets/levels/map24.json b/assets/levels/map24.json new file mode 100644 index 0000000..edb5169 --- /dev/null +++ b/assets/levels/map24.json @@ -0,0 +1 @@ +{"layers":[[{"params":{"x":2493,"vertices":[{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256}],"y":-662,"height":197,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":77.05,"rotation":-170.99999999999994,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1560,"vertices":[{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256}],"y":-1472,"height":197,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":77.05,"rotation":-11.999999999999886,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1497,"vertices":[{"y":345,"x":234},{"y":292,"x":251},{"y":259,"x":256}],"y":-373,"height":99,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":40.45,"rotation":-11.999999999999886,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":2247,"vertices":[{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256}],"y":137,"height":197,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":77.05,"rotation":171.0000000000001,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1647,"vertices":[{"y":367,"x":221},{"y":335,"x":238},{"y":305,"x":246},{"y":274,"x":254}],"y":97,"height":106,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":50.6,"rotation":162.0000000000001,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":827,"vertices":[{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256}],"y":-363,"height":197,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":77.05,"rotation":-11.999999999999886,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":868,"vertices":[{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256}],"y":-1002,"height":197,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":77.05,"rotation":-11.999999999999886,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1663,"vertices":[{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256}],"y":-282,"height":197,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":77.05,"rotation":-170.99999999999994,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":-30,"vertices":[{"y":0,"x":-1025},{"y":0,"x":35},{"y":-10,"x":5690},{"y":-10,"x":6105}],"y":410,"shape":true,"physic":true,"directed":true,"textureOffset":0,"originOffsetRatio":0,"stretchTexture":false,"isRoad":true,"thick":128,"width":7143,"rotation":0,"height":74,"direction":90,"straightSides":true,"wireframe":false,"snapToGrid":true,"camera":true,"smoothing":true,"line":true,"lineId":0,"cameraOffsetY":50,"repeatTexture":true,"textureMode":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"x":1263,"vertices":[{"y":0,"x":0},{"y":0,"x":580},{"y":-6,"x":623},{"y":-19,"x":663},{"y":-47,"x":706},{"y":-79,"x":741},{"y":-118,"x":770},{"y":-161,"x":790},{"y":-201,"x":801},{"y":-252,"x":804},{"y":-293,"x":798},{"y":-336,"x":787},{"y":-366,"x":773},{"y":-399,"x":751},{"y":-431,"x":718},{"y":-452,"x":690},{"y":-469,"x":662},{"y":-483,"x":625},{"y":-491,"x":585},{"y":-489,"x":523}],"y":406,"height":510.05,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":820.05,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1270,"vertices":[{"y":-5,"x":63},{"y":-8,"x":35},{"y":-8,"x":2},{"y":0,"x":-40},{"y":9,"x":-75},{"y":26,"x":-110},{"y":47,"x":-143},{"y":69,"x":-167},{"y":98,"x":-190},{"y":130,"x":-209},{"y":161,"x":-224},{"y":192,"x":-233},{"y":237,"x":-238},{"y":272,"x":-236},{"y":312,"x":-229},{"y":348,"x":-214},{"y":385,"x":-192},{"y":416,"x":-164},{"y":444,"x":-132},{"y":465,"x":-97},{"y":479,"x":-63},{"y":485,"x":-28},{"y":486,"x":9},{"y":485,"x":46},{"y":474,"x":93},{"y":461,"x":126},{"y":433,"x":167},{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":303,"x":250},{"y":259,"x":256},{"y":224,"x":257},{"y":184,"x":254}],"y":-80,"height":513,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":514.05,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1472,"vertices":[{"y":9,"x":-75},{"y":26,"x":-110},{"y":47,"x":-143},{"y":69,"x":-167},{"y":98,"x":-190},{"y":130,"x":-209},{"y":161,"x":-224},{"y":192,"x":-233},{"y":237,"x":-238},{"y":272,"x":-236},{"y":312,"x":-229},{"y":348,"x":-214},{"y":385,"x":-192},{"y":416,"x":-164},{"y":444,"x":-132},{"y":465,"x":-97},{"y":479,"x":-63},{"y":485,"x":-28},{"y":486,"x":9},{"y":485,"x":46},{"y":474,"x":93},{"y":461,"x":126},{"y":433,"x":167},{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256},{"y":177,"x":251}],"y":-465,"height":495.05,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":513.05,"rotation":81,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1790,"vertices":[{"y":-4,"x":0},{"y":0,"x":-40},{"y":9,"x":-75},{"y":26,"x":-110},{"y":47,"x":-143},{"y":69,"x":-167},{"y":98,"x":-190},{"y":130,"x":-209},{"y":161,"x":-224},{"y":192,"x":-233},{"y":237,"x":-238},{"y":272,"x":-236},{"y":312,"x":-229},{"y":348,"x":-214},{"y":385,"x":-192},{"y":416,"x":-164},{"y":444,"x":-132},{"y":519,"x":-47},{"y":566,"x":-41},{"y":584,"x":-75},{"y":584,"x":-109},{"y":558,"x":-157},{"y":524,"x":-201},{"y":484,"x":-239},{"y":446,"x":-269},{"y":389,"x":-300},{"y":335,"x":-320},{"y":-146,"x":-421},{"y":-202,"x":-441},{"y":-255,"x":-469},{"y":-300,"x":-499},{"y":-347,"x":-545},{"y":-376,"x":-591},{"y":-402,"x":-637},{"y":-416,"x":-690},{"y":-426,"x":-739},{"y":-428,"x":-796},{"y":-418,"x":-860},{"y":-398,"x":-914},{"y":-370,"x":-966},{"y":-329,"x":-1017},{"y":-289,"x":-1052},{"y":-231,"x":-1086},{"y":-180,"x":-1109},{"y":-129,"x":-1122},{"y":-75,"x":-1127},{"y":-9,"x":-1120},{"y":985,"x":-913},{"y":1054,"x":-889},{"y":1109,"x":-853},{"y":1149,"x":-819},{"y":1186,"x":-774},{"y":1227,"x":-726},{"y":1285,"x":-738},{"y":1316,"x":-783},{"y":1344,"x":-850},{"y":1338,"x":-930},{"y":1120,"x":-1434},{"y":615,"x":-1071},{"y":351,"x":-1655},{"y":-28,"x":-1383},{"y":-72,"x":-1181},{"y":-350,"x":-1238}],"y":-180,"height":1791.2,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":1676,"rotation":-168,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":2450,"vertices":[{"y":591,"x":-4},{"y":-81,"x":-10},{"y":-189,"x":-33},{"y":-258,"x":-58},{"y":-334,"x":-93},{"y":-388,"x":-133},{"y":-446,"x":-182},{"y":-493,"x":-231},{"y":-536,"x":-287},{"y":-580,"x":-357},{"y":-618,"x":-438},{"y":-635,"x":-528},{"y":-642,"x":-632}],"y":-480,"height":1249,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":644,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":1612,"vertices":[{"y":451,"x":-296},{"y":485,"x":-28},{"y":486,"x":9},{"y":485,"x":46},{"y":474,"x":93},{"y":461,"x":126},{"y":433,"x":167},{"y":404,"x":196},{"y":375,"x":218},{"y":335,"x":238},{"y":292,"x":251},{"y":259,"x":256},{"y":220,"x":256},{"y":177,"x":251}],"y":-1025,"height":325,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":568,"rotation":66,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"x":3390,"vertices":[{"y":-16,"x":85},{"y":-270,"x":89},{"y":-620,"x":444},{"y":-1006,"x":-63},{"y":-1388,"x":399},{"y":-2196,"x":-647},{"y":-2182,"x":-1202},{"y":-2173,"x":-1283},{"y":-2153,"x":-1344},{"y":-2110,"x":-1404},{"y":-2065,"x":-1456},{"y":-2016,"x":-1494},{"y":-1951,"x":-1523},{"y":-1894,"x":-1539},{"y":-1833,"x":-1544},{"y":-1770,"x":-1540},{"y":-1715,"x":-1529},{"y":-1659,"x":-1505},{"y":-1615,"x":-1475},{"y":-1564,"x":-1429},{"y":-1531,"x":-1380},{"y":-1498,"x":-1321},{"y":-1479,"x":-1266},{"y":-1470,"x":-1201},{"y":-1474,"x":-1130},{"y":-1498,"x":-1063},{"y":-1526,"x":-1009},{"y":-1566,"x":-958}],"y":420,"height":2196.1,"shapeH":19,"isStatic":true,"density":"1","graphic":true,"snapToGrid":false,"straightSides":true,"wireframe":false,"width":2011.95,"rotation":0,"textureMode":true,"id":-1,"action":0,"smoothing":true,"textureOffset":0,"originOffsetRatio":0,"type":1,"safeId":-1,"repeatTexture":true,"stretchTexture":false,"physic":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"rotation":0,"x":3210,"height":253,"y":277,"width":540},"className":"FinishZone"}],[{"params":{"x":1309,"y":-763,"scaleX":1,"width":9.3,"rotation":21,"scaleY":1,"height":128.35},"className":"SignPillar"},{"params":{"x":1960,"y":-1255,"scaleX":1,"width":9.3,"rotation":39,"scaleY":1,"height":128.35},"className":"SignPillar"},{"params":{"x":3600,"y":-900,"scaleX":1,"width":9.3,"rotation":-39,"scaleY":1,"height":128.35},"className":"SignPillar"},{"params":{"x":950,"y":300,"scaleX":1,"width":171.75,"rotation":6,"scaleY":1,"height":213.45},"className":"Dec13"},{"params":{"x":2220,"y":290,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2},"className":"Dec15"},{"params":{"x":2180,"y":300,"scaleX":1,"width":165.85,"rotation":0,"scaleY":1,"height":244.8},"className":"Dec14"},{"params":{"x":3610,"y":290,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2},"className":"Dec15"},{"params":{"x":3737,"y":300,"scaleX":-1,"width":171.75,"rotation":0,"scaleY":1,"height":213.45},"className":"Dec13"},{"params":{"x":3470,"y":290,"scaleX":1,"width":165.85,"rotation":0,"scaleY":1,"height":244.8},"className":"Dec14"}],[{"params":{"x":2560,"force":6000,"y":320,"width":100,"rotation":0,"height":99,"safeId":1,"time":2},"className":"BoostE"}],null,[{"params":{"rotation":0,"x":1550,"height":32,"y":320,"width":64},"className":"PlayerWP"},{"params":{"x":1330,"id":1,"y":-830,"width":128,"rotation":0,"height":335},"className":"SafePointE"},{"params":{"x":2000,"id":2,"y":-1310,"width":128,"rotation":0,"height":370},"className":"SafePointE"},{"params":{"x":3550,"id":3,"y":-960,"width":128,"rotation":0,"height":370},"className":"SafePointE"}]],"settings":{"countdown":0,"prizes":"27,34,42","theme":3,"gravityY":500}} \ No newline at end of file diff --git a/assets/levels/map25.json b/assets/levels/map25.json new file mode 100644 index 0000000..8ce4242 --- /dev/null +++ b/assets/levels/map25.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"25,33,42","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":0,"vertices":[{"x":260,"y":0,"length":260},{"x":340,"y":0,"length":340},{"x":410,"y":35,"length":411.4911906711977},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":700,"y":125,"length":711.0731326663946},{"x":310,"y":125,"length":334.2528982671654},{"x":260,"y":50,"length":264.76404589747455}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":9010,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":260,"y":0,"length":260},{"x":340,"y":0,"length":340},{"x":410,"y":35,"length":411.4911906711977},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":695,"y":130,"length":707.0537461890715},{"x":305,"y":130,"length":331.54939300200806},{"x":260,"y":50,"length":264.76404589747455}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":8497,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":260,"y":0,"length":260},{"x":340,"y":0,"length":340},{"x":410,"y":35,"length":411.4911906711977},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":695,"y":120,"length":705.2836308890204},{"x":305,"y":120,"length":327.75753233144775},{"x":260,"y":50,"length":264.76404589747455}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":9510,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":260,"y":0,"length":260},{"x":340,"y":0,"length":340},{"x":410,"y":35,"length":411.4911906711977},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":690,"y":115,"length":699.5176909842953},{"x":300,"y":115,"length":321.2864765283469},{"x":260,"y":50,"length":264.76404589747455}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":10560,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":260,"y":0,"length":260},{"x":340,"y":0,"length":340},{"x":410,"y":35,"length":411.4911906711977},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":695,"y":115,"length":704.4501401802686},{"x":305,"y":115,"length":325.96012026013244},{"x":260,"y":50,"length":264.76404589747455}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":10030,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":260,"y":0,"length":260},{"x":340,"y":0,"length":340},{"x":410,"y":35,"length":411.4911906711977},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":695,"y":110,"length":703.6511919978534},{"x":305,"y":110,"length":324.2298567374695},{"x":260,"y":50,"length":264.76404589747455}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":11060,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-320},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"sf":true,"bg":true,"x":8680,"vertices":[{"x":0,"y":0,"length":0},{"x":3290,"y":-5,"length":3290.0037993899036},{"x":3290,"y":275,"length":3301.473156032016},{"x":0,"y":280,"length":280}],"id":-1,"density":1.5,"viscosity":1.5,"y":-260,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":80,"y":0,"length":80},{"x":150,"y":35,"length":154.02921800749363},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":695,"y":120,"length":705.2836308890204},{"x":45,"y":120,"length":128.16005617976296},{"x":0,"y":50,"length":50}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":7710,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1020},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":428,"x":10860,"y":-780,"rotation":0,"width":1844},"className":"FinishZone"},{"params":{"sf":true,"bg":true,"x":7220,"vertices":[{"x":0,"y":0,"length":0},{"x":1310,"y":0,"length":1310},{"x":1310,"y":280,"length":1339.5894893585871},{"x":0,"y":280,"length":280}],"id":-1,"density":1.5,"viscosity":1.5,"y":-960,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":80,"y":0,"length":80},{"x":150,"y":35,"length":154.02921800749363},{"x":580,"y":35,"length":581.0550748423078},{"x":660,"y":0,"length":660},{"x":740,"y":0,"length":740},{"x":740,"y":55,"length":742.0411039827915},{"x":695,"y":100,"length":702.1573897638619},{"x":45,"y":100,"length":109.65856099730654},{"x":0,"y":50,"length":50}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":6150,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1450},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":1,"vertices":[{"x":0,"y":0,"length":0},{"x":55,"y":-30,"length":62.64982043070834},{"x":109,"y":-60,"length":124.42266674525185},{"x":156,"y":-96,"length":183.17205026968497},{"x":194,"y":-130,"length":233.52944139872386},{"x":231,"y":-169,"length":286.22019495486336},{"x":265,"y":-209,"length":337.4996296294264},{"x":296,"y":-254,"length":390.041023483428},{"x":320,"y":-300,"length":438.63424398922615},{"x":341,"y":-352,"length":490.0867270188002},{"x":360,"y":-404,"length":541.1247545621989},{"x":370,"y":-458,"length":588.7817931967666},{"x":376,"y":-519,"length":640.8876656638041},{"x":377,"y":-570,"length":683.3952004513933},{"x":374,"y":-628,"length":730.9309132879796},{"x":365,"y":-690,"length":780.5927235120757},{"x":353,"y":-742,"length":821.6891139597749},{"x":347,"y":-778,"length":851.8761647094019},{"x":346,"y":-821,"length":890.9304125463448},{"x":358,"y":-870,"length":940.7784011126106},{"x":376,"y":-909,"length":983.6955829930314},{"x":404,"y":-948,"length":1030.4950266740739},{"x":434,"y":-978,"length":1069.9719622494788},{"x":473,"y":-1005,"length":1110.74479517124},{"x":512,"y":-1023,"length":1143.972464703587},{"x":553,"y":-1033,"length":1171.7073013342538},{"x":590,"y":-1038,"length":1193.9614734152858},{"x":634,"y":-1035,"length":1213.746678677227},{"x":676,"y":-1023,"length":1226.1749467347634},{"x":709,"y":-1008,"length":1232.3737257828893},{"x":737,"y":-990,"length":1234.207843112334},{"x":772,"y":-962,"length":1233.4617951116281},{"x":804,"y":-923,"length":1224.0690340009423},{"x":823,"y":-885,"length":1208.5338224476798},{"x":836,"y":-837,"length":1182.9898562540593},{"x":839,"y":-799,"length":1158.5862074097033},{"x":834,"y":-748,"length":1120.2946041109008},{"x":823,"y":-698,"length":1079.1353019895141},{"x":817,"y":-655,"length":1047.1456441202436},{"x":814,"y":-612,"length":1018.4007069911136},{"x":815,"y":-562,"length":989.9843433105394},{"x":818,"y":-514,"length":966.084882399057},{"x":824,"y":-476,"length":951.6049600543284},{"x":833,"y":-437,"length":940.6689109351919},{"x":846,"y":-390,"length":931.5664227525593},{"x":861,"y":-349,"length":929.0435942408731},{"x":882,"y":-309,"length":934.5613944519642},{"x":903,"y":-272,"length":943.0763489771123},{"x":930,"y":-234,"length":958.9869655005745},{"x":952,"y":-205,"length":973.8218522912699},{"x":993,"y":-163,"length":1006.2892228380467},{"x":1048,"y":-117,"length":1054.510787047719},{"x":1112,"y":-73,"length":1114.3935570524445},{"x":1157,"y":-44,"length":1157.8363442214102},{"x":1213,"y":-22,"length":1213.1994889547225},{"x":1267,"y":4,"length":1267.006314112128},{"x":1310,"y":38,"length":1310.5510291476635},{"x":1341,"y":71,"length":1342.87825211372},{"x":1362,"y":110,"length":1366.4347770749982},{"x":1377,"y":153,"length":1385.4739261350248},{"x":1384,"y":201,"length":1398.5195744071657},{"x":1383,"y":246,"length":1404.7081547424718},{"x":1372,"y":293,"length":1402.937275860899},{"x":1352,"y":340,"length":1394.0961229413128},{"x":1320,"y":381,"length":1373.8853663970658},{"x":1284,"y":416,"length":1349.7081165941026},{"x":1240,"y":441,"length":1316.0854835458067},{"x":1195,"y":457,"length":1279.4037673854177},{"x":1153,"y":464,"length":1242.8616173975283},{"x":1102,"y":461,"length":1194.5396602875937},{"x":1057,"y":452,"length":1149.588187134854},{"x":1022,"y":436,"length":1111.1165555422167},{"x":991,"y":413,"length":1073.6153873711014},{"x":953,"y":386,"length":1028.204746147381},{"x":910,"y":360,"length":978.6214794290998},{"x":849,"y":332,"length":911.6057261777155},{"x":793,"y":313,"length":852.5362162395214},{"x":737,"y":302,"length":796.4753605730689},{"x":681,"y":295,"length":742.1495806102703},{"x":618,"y":292,"length":683.5115214829959},{"x":546,"y":296,"length":621.0732645992741},{"x":475,"y":310,"length":567.2080746956975},{"x":415,"y":331,"length":530.8351909962263},{"x":370,"y":351,"length":510.00098039121457},{"x":315,"y":380,"length":493.5838327984416},{"x":266,"y":413,"length":491.248409666637},{"x":219,"y":447,"length":497.76500479644005},{"x":158,"y":469,"length":494.8989795907848},{"x":102,"y":474,"length":484.85049242008614},{"x":35,"y":464,"length":465.31817071762845},{"x":-19,"y":439,"length":439.410969366947},{"x":-67,"y":403,"length":408.53151653207857},{"x":-100,"y":364,"length":377.48642359692883},{"x":-123,"y":320,"length":342.82502825785633},{"x":-138,"y":274,"length":306.78983033992506},{"x":-143,"y":225,"length":266.59707425251315},{"x":-137,"y":173,"length":220.6762334280699},{"x":-122,"y":128,"length":176.82759965570986},{"x":-93,"y":76,"length":120.10412149464314},{"x":-45,"y":30,"length":54.08326913195984}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":0,"plr":false,"line":true,"x":2309,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-221},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-3,"y":6,"length":6.708203932499369},{"x":161,"y":-336,"length":372.5815347007954},{"x":193,"y":-336,"length":387.48548359906334},{"x":352,"y":5,"length":352.035509572543}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":57,"stretchTexture":false,"height":356.5,"x":2039.8,"isStatic":false,"repeatTexture":true,"id":-1,"width":369.45,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":39.65,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":0,"length":20},{"x":43,"y":11,"length":44.384682042344295},{"x":68,"y":21,"length":71.16881339463234},{"x":98,"y":29,"length":102.20078277586722},{"x":131,"y":35,"length":135.5949851580065},{"x":167,"y":39,"length":171.49344010777787},{"x":201,"y":39,"length":204.74862636901864},{"x":240,"y":35,"length":242.53865671269807},{"x":279,"y":27,"length":280.30340704315387},{"x":315,"y":16,"length":315.40608744918035},{"x":350,"y":0,"length":350},{"x":370,"y":0,"length":370},{"x":370,"y":43,"length":372.4902683292545},{"x":338,"y":59,"length":343.11076928595526},{"x":300,"y":72,"length":308.5190431723786},{"x":251,"y":81,"length":263.74609001841145},{"x":217,"y":86,"length":233.42022191746798},{"x":176,"y":87,"length":196.32880583347927},{"x":134,"y":84,"length":158.15182578775372},{"x":95,"y":78,"length":122.9186723000212},{"x":63,"y":70,"length":94.17536832951598},{"x":27,"y":59,"length":64.88451279003334},{"x":0,"y":43,"length":43}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":57,"plr":false,"line":true,"x":2042.65,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":25.95},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":3750,"y":0,"length":3750},{"x":4135,"y":-210,"length":4140.329093200201},{"x":4625,"y":-1455,"length":4848.468830465965},{"x":6220,"y":-1770,"length":6466.938997702081},{"x":7025,"y":-1775,"length":7245.774630776202},{"x":7505,"y":-1390,"length":7632.635521233802},{"x":8920,"y":-615,"length":8941.175817530935},{"x":12285,"y":-615,"length":12300.384140342934}],"lineId":-1,"physic":false,"directed":false,"width":12298,"shape":false,"height":1839.05,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":-240,"smoothing":true,"y":460,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"sf":true,"bg":true,"x":5880,"vertices":[{"x":0,"y":0,"length":0},{"x":1310,"y":0,"length":1310},{"x":1310,"y":280,"length":1339.5894893585871},{"x":0,"y":280,"length":280}],"id":-1,"density":1.5,"viscosity":1.5,"y":-1400,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-2,"y":4,"length":4.47213595499958},{"x":161,"y":-336,"length":372.5815347007954},{"x":193,"y":-336,"length":387.48548359906334},{"x":352,"y":2,"length":352.00568177232594}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":33,"stretchTexture":false,"height":354.5,"x":3115,"isStatic":false,"repeatTexture":true,"id":-1,"width":368.45,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":180,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":0,"length":20},{"x":43,"y":11,"length":44.384682042344295},{"x":68,"y":21,"length":71.16881339463234},{"x":98,"y":29,"length":102.20078277586722},{"x":131,"y":35,"length":135.5949851580065},{"x":167,"y":39,"length":171.49344010777787},{"x":201,"y":39,"length":204.74862636901864},{"x":240,"y":37,"length":242.83533515532702},{"x":275,"y":29,"length":276.5248632582611},{"x":313,"y":15,"length":313.35921878891645},{"x":349,"y":-3,"length":349.0128937446294},{"x":370,"y":0,"length":370},{"x":370,"y":43,"length":372.4902683292545},{"x":338,"y":59,"length":343.11076928595526},{"x":300,"y":72,"length":308.5190431723786},{"x":251,"y":81,"length":263.74609001841145},{"x":217,"y":86,"length":233.42022191746798},{"x":176,"y":87,"length":196.32880583347927},{"x":134,"y":84,"length":158.15182578775372},{"x":95,"y":78,"length":122.9186723000212},{"x":63,"y":70,"length":94.17536832951598},{"x":27,"y":59,"length":64.88451279003334},{"x":0,"y":43,"length":43}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":33,"plr":false,"line":true,"x":3113,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":166},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":0,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":0,"length":20},{"x":43,"y":11,"length":44.384682042344295},{"x":68,"y":21,"length":71.16881339463234},{"x":98,"y":29,"length":102.20078277586722},{"x":131,"y":35,"length":135.5949851580065},{"x":167,"y":39,"length":171.49344010777787},{"x":201,"y":39,"length":204.74862636901864},{"x":240,"y":35,"length":242.53865671269807},{"x":279,"y":27,"length":280.30340704315387},{"x":315,"y":16,"length":315.40608744918035},{"x":350,"y":0,"length":350},{"x":370,"y":0,"length":370},{"x":370,"y":43,"length":372.4902683292545},{"x":338,"y":59,"length":343.11076928595526},{"x":300,"y":72,"length":308.5190431723786},{"x":251,"y":81,"length":263.74609001841145},{"x":217,"y":86,"length":233.42022191746798},{"x":176,"y":87,"length":196.32880583347927},{"x":134,"y":84,"length":158.15182578775372},{"x":95,"y":78,"length":122.9186723000212},{"x":63,"y":70,"length":94.17536832951598},{"x":27,"y":59,"length":64.88451279003334},{"x":0,"y":43,"length":43}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":171,"plr":false,"line":true,"x":3035,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-1361},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":4,"y":10,"length":10.770329614269007},{"x":161,"y":-336,"length":372.5815347007954},{"x":193,"y":-336,"length":387.48548359906334},{"x":349,"y":5,"length":349.03581478123414}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":171,"stretchTexture":false,"height":360.5,"x":3025,"isStatic":false,"repeatTexture":true,"id":-1,"width":359.55,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1369,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"height":103,"x":1240,"directed":true,"isPillar":false,"y":390,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":105,"y":-30,"length":109.20164833920778},{"x":205,"y":-80,"length":220.05681084665386},{"x":260,"y":10,"length":260.1922366251537}],"rotation":0,"width":273},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":2,"vertices":[{"x":-2045,"y":0,"length":2045},{"x":-1636,"y":-946,"length":1889.8179806531634},{"x":420,"y":-2095,"length":2136.685517337542},{"x":2185,"y":-4135,"length":4676.799119055681},{"x":2905,"y":-4065,"length":4996.323648443924},{"x":7315,"y":-4185,"length":8427.541159792694},{"x":7310,"y":-1790,"length":7525.968376229069},{"x":6870,"y":-1790,"length":7099.366168891417},{"x":5370,"y":-2345,"length":5859.686425057232},{"x":3570,"y":-2345,"length":4271.290788508785},{"x":3570,"y":-2745,"length":4503.323772504038},{"x":2640,"y":-2745,"length":3808.49379676533},{"x":2640,"y":-2160,"length":3411.040896852455},{"x":3070,"y":-2160,"length":3753.731476810775},{"x":3075,"y":-1745,"length":3535.6258286193124},{"x":2820,"y":-1745,"length":3316.2365717783164},{"x":2825,"y":-1890,"length":3398.929978684468},{"x":2020,"y":-2445,"length":3171.5020100892257},{"x":1165,"y":-1920,"length":2245.8016386137047},{"x":1100,"y":-1930,"length":2221.463481581455},{"x":1040,"y":-1930,"length":2192.3731434224424},{"x":967,"y":-1917,"length":2147.0859321415155},{"x":903,"y":-1899,"length":2102.762468753901},{"x":836,"y":-1872,"length":2050.19023507576},{"x":785,"y":-1845,"length":2005.056108940595},{"x":735,"y":-1805,"length":1948.9099517422553},{"x":685,"y":-1760,"length":1888.603981781252},{"x":640,"y":-1705,"length":1821.160344395847},{"x":610,"y":-1660,"length":1768.530463407402},{"x":585,"y":-1615,"length":1717.687398801074},{"x":113,"y":-616,"length":626.2786919575022},{"x":88,"y":-555,"length":561.9332700597109},{"x":75,"y":-507,"length":512.5173167806138},{"x":65,"y":-455,"length":459.6194077712559},{"x":60,"y":-390,"length":394.58839313897715},{"x":-235,"y":-390,"length":455.3295509847785},{"x":-235,"y":-350,"length":421.57442996462675},{"x":-440,"y":-350,"length":562.2277118748239},{"x":-440,"y":-310,"length":538.2378656319156},{"x":-630,"y":-310,"length":702.1395872616783},{"x":-630,"y":-270,"length":685.4195795277517},{"x":-795,"y":-270,"length":839.5981181493918},{"x":-795,"y":-230,"length":827.6019574650607},{"x":-975,"y":-230,"length":1001.7609495283792},{"x":-975,"y":-190,"length":993.3403243601863},{"x":-1145,"y":-190,"length":1160.6571414504801},{"x":-1145,"y":-145,"length":1154.1447049655428},{"x":-1345,"y":-145,"length":1352.7934062524107},{"x":-1345,"y":-265,"length":1370.8573959387606},{"x":-1655,"y":-265,"length":1676.0817402501586},{"x":-1651,"y":0,"length":1651},{"x":230,"y":0,"length":230},{"x":269,"y":36,"length":271.39823138701547},{"x":320,"y":68,"length":327.1452276894774},{"x":371,"y":94,"length":382.7231375289453},{"x":427,"y":114,"length":441.955880150949},{"x":489,"y":131,"length":506.2430246433031},{"x":559,"y":140,"length":576.2646961249665},{"x":614,"y":140,"length":629.7586839417143},{"x":681,"y":133,"length":693.8659812961001},{"x":734,"y":121,"length":743.9065801564064},{"x":785,"y":101,"length":791.4707827835466},{"x":840,"y":73,"length":843.1660571915831},{"x":887,"y":40,"length":887.9014584963807},{"x":935,"y":3,"length":935.0048128218378},{"x":982,"y":-37,"length":982.696799628451},{"x":1014,"y":-77,"length":1016.9193675016717},{"x":1196,"y":-78,"length":1198.5407794480755},{"x":1233,"y":-36,"length":1233.525435489678},{"x":1273,"y":2,"length":1273.0015710909395},{"x":1319,"y":38,"length":1319.5472708470886},{"x":1384,"y":73,"length":1385.9238795835795},{"x":1437,"y":97,"length":1440.2701135550928},{"x":1498,"y":114,"length":1502.3315213360866},{"x":1565,"y":127,"length":1570.1445793301966},{"x":1617,"y":131,"length":1622.2977531883596},{"x":1696,"y":124,"length":1700.5269771456142},{"x":1759,"y":109,"length":1762.3739671250253},{"x":1818,"y":89,"length":1820.177189176922},{"x":1892,"y":52,"length":1892.7144528427948},{"x":1942,"y":17,"length":1942.0744064015673},{"x":2001,"y":-32,"length":2001.255855706611},{"x":2045,"y":-90,"length":2046.979482066198},{"x":2082,"y":-153,"length":2087.6141884936496},{"x":2116,"y":-237,"length":2129.231081869697},{"x":2135,"y":-309,"length":2157.245002311977},{"x":2141,"y":-400,"length":2178.045224507517},{"x":2137,"y":-481,"length":2190.463421287833},{"x":2104,"y":-598,"length":2187.331707812055},{"x":2020,"y":-732,"length":2148.5399693745517},{"x":1645,"y":-1417,"length":2171.1549921643086},{"x":1652,"y":-1470,"length":2211.3353431806763},{"x":1685,"y":-1522,"length":2270.618638168902},{"x":1717,"y":-1547,"length":2311.1248343609655},{"x":1755,"y":-1562,"length":2349.4401460773583},{"x":3225,"y":-1574,"length":3588.6071114013025},{"x":3275,"y":-1579,"length":3635.775845675858},{"x":3323,"y":-1593,"length":3685.102169546999},{"x":3361,"y":-1611,"length":3727.149312812676},{"x":3399,"y":-1636,"length":3772.22706103437},{"x":3433,"y":-1665,"length":3815.4572465171195},{"x":3461,"y":-1697,"length":3854.6504381071964},{"x":3481,"y":-1731,"length":3887.637071538443},{"x":3500,"y":-1770,"length":3922.1040271772495},{"x":3512,"y":-1812,"length":3951.8967597851033},{"x":3515,"y":-1850,"length":3972.1184524130194},{"x":3515,"y":-1895,"length":3993.275597801885},{"x":4090,"y":-1895,"length":4507.6740121708},{"x":4090,"y":-1570,"length":4380.981625161192},{"x":5205,"y":-1570,"length":5436.6280910137675},{"x":5205,"y":-1820,"length":5514.020765285528},{"x":5400,"y":-1820,"length":5698.455931215051},{"x":5400,"y":-1135,"length":5517.991029351171},{"x":6670,"y":-1140,"length":6766.720032630285},{"x":6670,"y":-1360,"length":6807.238794107344},{"x":6870,"y":-1360,"length":7003.3206409531185},{"x":6870,"y":-490,"length":6887.452359181877},{"x":9985,"y":-510,"length":9998.016053197754},{"x":9990,"y":-1360,"length":10082.147588683672},{"x":8110,"y":-1355,"length":8222.416007476148},{"x":8100,"y":-2275,"length":8413.419340553519},{"x":11650,"y":-2275,"length":11870.05160056181},{"x":11675,"y":-865,"length":11707.00004270949},{"x":12160,"y":1070,"length":12206.985704915034},{"x":2297,"y":509,"length":2352.7197028120454},{"x":285,"y":455,"length":536.8891878218446},{"x":-2078,"y":221,"length":2089.718880615285}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":1830,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":390},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":758,"y":0,"length":758},{"x":802,"y":36,"length":802.8075734570521},{"x":854,"y":69,"length":856.7829363380202},{"x":909,"y":97,"length":914.1608173620219},{"x":972,"y":118,"length":979.1363541407295},{"x":1037,"y":132,"length":1045.3673995299453},{"x":1108,"y":137,"length":1116.4376382046603},{"x":1172,"y":136,"length":1179.8643989882905},{"x":1231,"y":126,"length":1237.4316142720777},{"x":1318,"y":100,"length":1321.7881827282313},{"x":1387,"y":61,"length":1388.3407362747807},{"x":1461,"y":11,"length":1461.041409406318},{"x":1506,"y":-33,"length":1506.361510395164},{"x":1543,"y":-75,"length":1544.8216725564153},{"x":1726,"y":-77,"length":1727.716701314194},{"x":1759,"y":-45,"length":1759.5755169926638},{"x":1809,"y":2,"length":1809.0011055828572},{"x":1863,"y":44,"length":1863.519519618724},{"x":1936,"y":80,"length":1937.6521875713402},{"x":1996,"y":104,"length":1998.707582414196},{"x":2064,"y":120,"length":2067.48542921105},{"x":2132,"y":130,"length":2135.9597374482505},{"x":2195,"y":126,"length":2198.6134266851004},{"x":2256,"y":116,"length":2258.980300932259},{"x":2316,"y":99,"length":2318.1149669505176},{"x":2369,"y":78,"length":2370.2837382895746},{"x":2425,"y":49,"length":2425.495001025564},{"x":2472,"y":14,"length":2472.03964369506},{"x":2522,"y":-29,"length":2522.1667272406876},{"x":2560,"y":-73,"length":2561.0406088150967},{"x":2593,"y":-123,"length":2595.9156380745503},{"x":2620,"y":-180,"length":2626.1759270848556},{"x":2645,"y":-238,"length":2655.686163687268},{"x":2658,"y":-293,"length":2674.100409483533},{"x":2668,"y":-340,"length":2689.5769184018513},{"x":2672,"y":-395,"length":2701.0385039832363},{"x":2666,"y":-469,"length":2706.9386768081763},{"x":2649,"y":-541,"length":2703.6793448928074},{"x":2171,"y":-1414,"length":2590.875720678242}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":1598.35,"x":1300,"isStatic":true,"repeatTexture":true,"id":-1,"width":2710.6,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":390,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":4,"y":4,"length":5.656854249492381},{"x":9,"y":272,"length":272.1488563268271}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":281,"x":174,"isStatic":true,"repeatTexture":true,"id":-1,"width":69,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":121,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":67,"y":-35,"length":75.59100475585703},{"x":-134,"y":-35,"length":138.49548729110273}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":64,"x":620,"isStatic":true,"repeatTexture":true,"id":-1,"width":214,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":280,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":37,"y":-36,"length":51.62363799656123},{"x":-134,"y":-35,"length":138.49548729110273}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":65,"x":818,"isStatic":true,"repeatTexture":true,"id":-1,"width":184,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":240,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":47,"y":-35,"length":58.60034129593445},{"x":-134,"y":-35,"length":138.49548729110273}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":64,"x":988,"isStatic":true,"repeatTexture":true,"id":-1,"width":194,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":200,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":32,"y":-35,"length":47.4236228055175},{"x":-134,"y":-35,"length":138.49548729110273}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":64,"x":1168,"isStatic":true,"repeatTexture":true,"id":-1,"width":179,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":160,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":52,"y":-35,"length":62.68173577685928},{"x":-134,"y":-35,"length":138.49548729110273}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":64,"x":1338,"isStatic":true,"repeatTexture":true,"id":-1,"width":199,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":120,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":67,"y":-36,"length":76.05918747922567},{"x":-139,"y":-35,"length":143.33875958721003}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":65,"x":1528,"isStatic":true,"repeatTexture":true,"id":-1,"width":219,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":80,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":1265,"y":-1568,"length":2014.6585318609207},{"x":1148,"y":-1578,"length":1951.4066721214213},{"x":1066,"y":-1564,"length":1892.736643064745},{"x":996,"y":-1540,"length":1834.0163576151658},{"x":921,"y":-1509,"length":1767.8580259738053},{"x":871,"y":-1478,"length":1715.553846429776},{"x":822,"y":-1435,"length":1653.7560279557563},{"x":780,"y":-1393,"length":1596.511509510658},{"x":733,"y":-1331,"length":1519.490046035182},{"x":697,"y":-1275,"length":1453.077423952351},{"x":215,"y":-253,"length":332.01505989939676},{"x":185,"y":-173,"length":253.28639916110774},{"x":171,"y":-101,"length":198.600100704909},{"x":168,"y":-50,"length":175.2826289168439},{"x":150,"y":-34,"length":153.80507143784303},{"x":-139,"y":-35,"length":143.33875958721003}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":1608.3,"x":1728,"isStatic":true,"repeatTexture":true,"id":-1,"width":1417,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":40,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2889,"smoothing":true,"y":-301,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2858,"smoothing":true,"y":-302,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2384,"smoothing":true,"y":17,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2353,"smoothing":true,"y":16,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":3414,"smoothing":true,"y":8,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":3383,"smoothing":true,"y":7,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":7,"y":9,"length":11.40175425099138},{"x":-1,"y":-9,"length":9.055385138137417},{"x":5,"y":-27,"length":27.459060435491963},{"x":16,"y":-37,"length":40.311288741492746},{"x":28,"y":-42,"length":50.47771785649585},{"x":41,"y":-41,"length":57.982756057296896},{"x":54,"y":-34,"length":63.812224534175265},{"x":62,"y":-22,"length":65.7875368135941},{"x":65,"y":-8,"length":65.49045732013177},{"x":61,"y":5,"length":61.204574992397426},{"x":52,"y":14,"length":53.85164807134504},{"x":40,"y":21,"length":45.17742799230607},{"x":23,"y":21,"length":31.144823004794873},{"x":12,"y":14,"length":18.439088914585774},{"x":5,"y":6,"length":7.810249675906654}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2868,"smoothing":true,"y":-1000,"width":79,"height":76,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":2837,"smoothing":true,"y":-1001,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"}],[{"params":{"height":128.35,"x":4000,"y":-1240,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":5580,"y":-1570,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":3963,"y":-1224,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":79.6,"x":5614,"y":-1544,"rotation":0,"scaleX":-1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":4700,"y":-1820,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":79.6,"x":7140,"y":-1470,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":8620,"y":-1020,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":8650,"y":-1040,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":8650,"y":-1070,"rotation":24,"width":110.7},"className":"Sign15"},{"params":{"height":128.35,"x":930,"y":320,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":930,"y":280,"rotation":0,"width":110.7},"className":"Sign15"},{"params":{"height":79.6,"x":897,"y":350,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"}],[{"params":{"stones":false,"safeId":2,"physic":false,"impulse":5000,"rotation":0,"height":53.2,"x":11730,"id":45,"count":50,"radius":64,"y":-180,"width":53.2},"className":"Tnt1"},{"params":{"rate":1,"height":128,"x":5270,"id":-1,"rotation":-180,"safeId":1,"speed":1000,"y":-2020,"width":254},"className":"GeyserE"}],null,[{"params":{"height":32,"x":330,"y":310,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1064,"x":4000,"y":-1310,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":1074,"x":5580,"y":-1640,"width":128,"id":2,"rotation":0},"className":"SafePointE"}],[{"params":{"height":907,"hint":-1,"id":45,"rotation":0,"safeId":2,"x":11730,"off":false,"id_off":-1,"y":-520,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":-1,"rotation":36,"rate":-28,"height":17,"x":3448,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-4,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":2039.8,"id":-1,"rotation":57,"safeId":-1,"graphic":0,"y":39.65,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2230.3,"id":-1,"rotation":57,"safeId":-1,"graphic":0,"y":333.3,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3115,"id":-1,"rotation":33,"safeId":-1,"graphic":0,"y":180,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3410,"id":-1,"rotation":33,"safeId":-1,"graphic":0,"y":370,"width":17},"className":"PivotJointE"},{"params":{"safeId":-1,"rotation":57,"rate":-27,"height":17,"x":2417.85,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":5.25,"width":17},"className":"MotorJointE"},{"params":{"height":1406,"hint":-1,"id":1,"rotation":0,"safeId":-1,"x":1220,"off":false,"id_off":-1,"y":160,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":3016,"id":-1,"rotation":171,"safeId":-1,"graphic":0,"y":-1370,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2686,"id":-1,"rotation":171,"safeId":-1,"graphic":0,"y":-1313,"width":17},"className":"PivotJointE"},{"params":{"safeId":-1,"rotation":174,"rate":-27,"height":17,"x":2900,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-1009,"width":17},"className":"MotorJointE"},{"params":{"height":64,"hint":-1,"id":2,"rotation":0,"safeId":-1,"x":3270,"off":false,"id_off":-1,"y":-780,"width":1772,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":2050,"id":1,"rotation":0,"safeId":-1,"graphic":0,"y":160,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2270,"id":1,"rotation":0,"safeId":-1,"graphic":0,"y":280,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3130,"id":1,"rotation":0,"safeId":-1,"graphic":0,"y":230,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3170,"id":1,"rotation":0,"safeId":-1,"graphic":0,"y":150,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":2910,"id":1,"rotation":0,"safeId":-1,"graphic":0,"y":-1400,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3010,"id":1,"rotation":0,"safeId":-1,"graphic":0,"y":-1330,"width":17},"className":"PivotJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map3.json b/assets/levels/map3.json new file mode 100644 index 0000000..1f891c2 --- /dev/null +++ b/assets/levels/map3.json @@ -0,0 +1 @@ +{"settings":{"theme":3,"prizes":"32,37,44","countdown":0,"gravityY":500},"layers":[[{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":52,"y":-10,"length":52.952809179494906},{"x":105,"y":-33,"length":110.06361796706484},{"x":154,"y":-71,"length":169.57889019568444},{"x":181,"y":-109,"length":211.28653530218153},{"x":208,"y":-160,"length":262.41951146970763},{"x":233,"y":-203,"length":309.0275068662982},{"x":259,"y":-237,"length":351.0697936308392},{"x":299,"y":-266,"length":400.1962018810274},{"x":347,"y":-280,"length":445.88002870727456},{"x":393,"y":-284,"length":484.87627287793737},{"x":432,"y":-278,"length":513.7197679669335},{"x":479,"y":-252,"length":541.2439376103903},{"x":515,"y":-220,"length":560.0223209837266},{"x":539,"y":-188,"length":570.8458636094335},{"x":554,"y":-153,"length":574.7390712314589},{"x":562,"y":-112,"length":573.0514811079368},{"x":555,"y":-52,"length":557.4307131832619},{"x":535,"y":5,"length":535.0233639758175}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":305.05,"x":6860,"isStatic":true,"repeatTexture":true,"id":-1,"width":578.1,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":370,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":6228,"y":-36,"length":6228.1040453736805}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":55,"x":15273,"isStatic":true,"repeatTexture":true,"id":-1,"width":6241,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-1957,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-21,"y":-54,"length":57.9396237474839},{"x":-29,"y":-110,"length":113.75851616472501},{"x":-21,"y":-151,"length":152.45327152934436},{"x":-7,"y":-183,"length":183.13383084509536},{"x":16,"y":-219,"length":219.58369702689677},{"x":47,"y":-249,"length":253.39692184397188},{"x":87,"y":-269,"length":282.71894170713074},{"x":142,"y":-281,"length":314.8412298286233},{"x":184,"y":-281,"length":335.882419903156},{"x":221,"y":-272,"length":350.46397817750113},{"x":254,"y":-255,"length":359.9180462271932},{"x":287,"y":-225,"length":364.6834243559748},{"x":308,"y":-193,"length":363.4735203560226},{"x":330,"y":-152,"length":363.3235472688221},{"x":354,"y":-104,"length":368.96070251450897},{"x":385,"y":-66,"length":390.6161799004235},{"x":429,"y":-32,"length":430.1918176813687},{"x":474,"y":-14,"length":474.20670598379354},{"x":539,"y":6,"length":539.033394141773}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":305.6,"x":5900,"isStatic":true,"repeatTexture":true,"id":-1,"width":584.15,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":370,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-21,"y":-54,"length":57.9396237474839},{"x":-29,"y":-110,"length":113.75851616472501},{"x":-21,"y":-151,"length":152.45327152934436},{"x":-7,"y":-183,"length":183.13383084509536},{"x":16,"y":-219,"length":219.58369702689677},{"x":47,"y":-249,"length":253.39692184397188},{"x":87,"y":-269,"length":282.71894170713074},{"x":142,"y":-281,"length":314.8412298286233},{"x":184,"y":-281,"length":335.882419903156},{"x":221,"y":-272,"length":350.46397817750113},{"x":254,"y":-255,"length":359.9180462271932},{"x":287,"y":-225,"length":364.6834243559748},{"x":308,"y":-193,"length":363.4735203560226},{"x":330,"y":-152,"length":363.3235472688221},{"x":354,"y":-104,"length":368.96070251450897},{"x":385,"y":-66,"length":390.6161799004235},{"x":429,"y":-32,"length":430.1918176813687},{"x":474,"y":-14,"length":474.20670598379354},{"x":539,"y":6,"length":539.033394141773}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":305.6,"x":7500,"isStatic":true,"repeatTexture":true,"id":-1,"width":584.15,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":370,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":4,"y":-1697,"length":1697.0047141949842}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":1710,"x":21510,"isStatic":true,"repeatTexture":true,"id":-1,"width":23,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-297,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-3,"y":5,"length":5.830951894845301},{"x":52,"y":-10,"length":52.952809179494906},{"x":105,"y":-33,"length":110.06361796706484},{"x":154,"y":-71,"length":169.57889019568444},{"x":181,"y":-109,"length":211.28653530218153},{"x":208,"y":-160,"length":262.41951146970763},{"x":233,"y":-203,"length":309.0275068662982},{"x":259,"y":-237,"length":351.0697936308392},{"x":299,"y":-266,"length":400.1962018810274},{"x":347,"y":-280,"length":445.88002870727456},{"x":393,"y":-284,"length":484.87627287793737},{"x":432,"y":-278,"length":513.7197679669335},{"x":479,"y":-252,"length":541.2439376103903},{"x":515,"y":-220,"length":560.0223209837266},{"x":539,"y":-188,"length":570.8458636094335},{"x":554,"y":-153,"length":574.7390712314589},{"x":562,"y":-112,"length":573.0514811079368},{"x":555,"y":-52,"length":557.4307131832619},{"x":535,"y":5,"length":535.0233639758175}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":307.7,"x":5260,"isStatic":true,"repeatTexture":true,"id":-1,"width":581.1,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":370,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":2,"vertices":[{"x":-955,"y":-690,"length":1178.1871667948178},{"x":-335,"y":-855,"length":918.2864476839458},{"x":105,"y":-765,"length":772.172260574025},{"x":80,"y":-15,"length":81.39410298049853},{"x":-280,"y":410,"length":496.4876634922564},{"x":-100,"y":530,"length":539.351462406472},{"x":355,"y":90,"length":366.23080154459973},{"x":485,"y":90,"length":493.27983944207574},{"x":515,"y":1690,"length":1766.7272002207924},{"x":-1070,"y":1595,"length":1920.6574395242897},{"x":-1120,"y":645,"length":1292.4492253082904}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":310,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":270},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":4,"vertices":[{"x":45,"y":-75,"length":87.46427842267951},{"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":228,"y":13,"length":228.3703133071372},{"x":150,"y":90,"length":174.92855684535903},{"x":-10,"y":-10,"length":14.142135623730951}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":89,"isStatic":false,"id":2,"isWheel":false,"ignore":false,"graphic":false,"y":662},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":-145,"y":-100,"length":176.13914953808538},{"x":445,"y":-60,"length":449.02672526253934},{"x":1070,"y":-440,"length":1156.9356075426151},{"x":12965,"y":-415,"length":12971.640220110949},{"x":13730,"y":-1055,"length":13770.4729403169},{"x":21695,"y":-1110,"length":21723.37738474384}],"lineId":-1,"physic":false,"directed":false,"width":21853,"shape":false,"height":1114.6,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":90,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-220,"smoothing":true,"y":860,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-2,"y":7,"length":7.280109889280518},{"x":161,"y":-336,"length":372.5815347007954},{"x":193,"y":-336,"length":387.48548359906334},{"x":351,"y":5,"length":351.03561072916807}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":-3,"stretchTexture":false,"height":357.5,"x":1657,"isStatic":true,"repeatTexture":true,"id":-1,"width":367.5,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":225,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":6,"vertices":[{"x":-1,"y":-16,"length":16.0312195418814},{"x":20,"y":0,"length":20},{"x":43,"y":11,"length":44.384682042344295},{"x":68,"y":21,"length":71.16881339463234},{"x":98,"y":29,"length":102.20078277586722},{"x":131,"y":35,"length":135.5949851580065},{"x":167,"y":39,"length":171.49344010777787},{"x":201,"y":39,"length":204.74862636901864},{"x":240,"y":35,"length":242.53865671269807},{"x":279,"y":27,"length":280.30340704315387},{"x":315,"y":16,"length":315.40608744918035},{"x":350,"y":0,"length":350},{"x":378,"y":-19,"length":378.4772119956497},{"x":404,"y":25,"length":404.7727757643787},{"x":371,"y":45,"length":373.7191458836435},{"x":338,"y":59,"length":343.11076928595526},{"x":300,"y":72,"length":308.5190431723786},{"x":251,"y":81,"length":263.74609001841145},{"x":217,"y":86,"length":233.42022191746798},{"x":176,"y":87,"length":196.32880583347927},{"x":134,"y":84,"length":158.15182578775372},{"x":95,"y":78,"length":122.9186723000212},{"x":63,"y":70,"length":94.17536832951598},{"x":27,"y":59,"length":64.88451279003334},{"x":-5,"y":45,"length":45.27692569068709},{"x":-35,"y":25,"length":43.01162633521314}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":-3,"plr":false,"line":true,"x":1647,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":216},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-2,"y":7,"length":7.280109889280518},{"x":161,"y":-336,"length":372.5815347007954},{"x":193,"y":-336,"length":387.48548359906334},{"x":351,"y":5,"length":351.03561072916807}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":-3,"stretchTexture":false,"height":357.5,"x":2867,"isStatic":true,"repeatTexture":true,"id":-1,"width":367.5,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":255,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":6,"vertices":[{"x":-1,"y":-16,"length":16.0312195418814},{"x":20,"y":0,"length":20},{"x":43,"y":11,"length":44.384682042344295},{"x":68,"y":21,"length":71.16881339463234},{"x":98,"y":29,"length":102.20078277586722},{"x":131,"y":35,"length":135.5949851580065},{"x":167,"y":39,"length":171.49344010777787},{"x":201,"y":39,"length":204.74862636901864},{"x":240,"y":35,"length":242.53865671269807},{"x":279,"y":27,"length":280.30340704315387},{"x":315,"y":16,"length":315.40608744918035},{"x":350,"y":0,"length":350},{"x":378,"y":-19,"length":378.4772119956497},{"x":404,"y":25,"length":404.7727757643787},{"x":371,"y":45,"length":373.7191458836435},{"x":338,"y":59,"length":343.11076928595526},{"x":300,"y":72,"length":308.5190431723786},{"x":251,"y":81,"length":263.74609001841145},{"x":217,"y":86,"length":233.42022191746798},{"x":176,"y":87,"length":196.32880583347927},{"x":134,"y":84,"length":158.15182578775372},{"x":95,"y":78,"length":122.9186723000212},{"x":63,"y":70,"length":94.17536832951598},{"x":27,"y":59,"length":64.88451279003334},{"x":-5,"y":45,"length":45.27692569068709},{"x":-35,"y":25,"length":43.01162633521314}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":-3,"plr":false,"line":true,"x":2857,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":246},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"x":0,"y":2,"length":2},{"x":31,"y":-15,"length":34.438350715445125},{"x":72,"y":-22,"length":75.28612089887484},{"x":111,"y":-18,"length":112.44998888394787},{"x":146,"y":-2,"length":146.01369798755184},{"x":177,"y":22,"length":178.36199146679206},{"x":198,"y":57,"length":206.0412580043133},{"x":207,"y":95,"length":227.75864418282788},{"x":206,"y":131,"length":244.12496799794977},{"x":191,"y":172,"length":257.0311265197272},{"x":161,"y":208,"length":263.0304164920856},{"x":124,"y":228,"length":259.53805116013336},{"x":71,"y":239,"length":249.32308356828895},{"x":28,"y":231,"length":232.69078194032525},{"x":-5,"y":210,"length":210.05951537600004},{"x":-30,"y":185,"length":187.41664813991312},{"x":-48,"y":149,"length":156.54072952429985},{"x":-54,"y":110,"length":122.53978945632312},{"x":-48,"y":72,"length":86.53323061113575},{"x":-30,"y":34,"length":45.34313619501854}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":5777,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-95},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"x":0,"y":2,"length":2},{"x":31,"y":-15,"length":34.438350715445125},{"x":72,"y":-22,"length":75.28612089887484},{"x":111,"y":-18,"length":112.44998888394787},{"x":146,"y":-2,"length":146.01369798755184},{"x":177,"y":22,"length":178.36199146679206},{"x":198,"y":57,"length":206.0412580043133},{"x":207,"y":95,"length":227.75864418282788},{"x":206,"y":131,"length":244.12496799794977},{"x":191,"y":172,"length":257.0311265197272},{"x":161,"y":208,"length":263.0304164920856},{"x":124,"y":228,"length":259.53805116013336},{"x":71,"y":239,"length":249.32308356828895},{"x":28,"y":231,"length":232.69078194032525},{"x":-5,"y":210,"length":210.05951537600004},{"x":-30,"y":185,"length":187.41664813991312},{"x":-48,"y":149,"length":156.54072952429985},{"x":-54,"y":110,"length":122.53978945632312},{"x":-48,"y":72,"length":86.53323061113575},{"x":-30,"y":34,"length":45.34313619501854}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":7369,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-96},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":1643,"x":21270,"y":-1118,"rotation":0,"width":450},"className":"FinishZone"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-8,"y":5,"length":9.433981132056603},{"x":-8,"y":-1684,"length":1684.019002268086}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":1702,"x":21497,"isStatic":true,"repeatTexture":true,"id":-1,"width":64,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-307,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"vertices":[{"x":1505,"y":-460,"length":1573.7296464132587},{"x":1590,"y":-460,"length":1655.2039149301213},{"x":1620,"y":-420,"length":1673.5590817177624},{"x":4810,"y":-435,"length":4829.629903004991},{"x":4840,"y":-460,"length":4861.810362406169},{"x":8835,"y":-450,"length":8846.45267889904},{"x":9895,"y":-425,"length":9904.12287888231},{"x":12420,"y":-425,"length":12427.26941045377},{"x":13210,"y":-420,"length":13216.675073557646},{"x":13215,"y":-370,"length":13220.178705297443},{"x":13270,"y":-370,"length":13275.157249539458},{"x":13275,"y":-420,"length":13281.64240596772},{"x":13515,"y":-420,"length":13521.524507243996},{"x":13522,"y":-483,"length":13530.623525913357},{"x":13550,"y":-529,"length":13560.322304429199},{"x":14090,"y":-1045,"length":14128.69863080107},{"x":14131,"y":-1074,"length":14171.7549019167},{"x":14182,"y":-1079,"length":14222.987203819035},{"x":16990,"y":-1085,"length":17024.609393463335},{"x":24750,"y":-1140,"length":24776.240634930877}],"lineId":0,"physic":true,"directed":true,"width":23258,"shape":true,"height":834,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":170,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-799,"smoothing":true,"y":818,"direction":90,"textureOffset":0,"camera":false,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":5194,"y":-48,"length":5194.221789642795}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":112,"x":16300,"isStatic":true,"repeatTexture":true,"id":-1,"width":5207,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-270,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":3193,"y":-13,"length":3193.026464030638}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":77,"x":820,"isStatic":true,"repeatTexture":true,"id":-1,"width":3206,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":390,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-35,"y":-1424,"length":1424.4300614631804},{"x":-886,"y":-498,"length":1016.366075781753},{"x":-932,"y":-439,"length":1030.2159967696095},{"x":-959,"y":-385,"length":1033.3953744816163},{"x":-974,"y":-345,"length":1033.2961821278543},{"x":-983,"y":-297,"length":1026.887530355686},{"x":-987,"y":-245,"length":1016.9532929294246},{"x":-982,"y":-193,"length":1000.7861909518936},{"x":-972,"y":-153,"length":983.9679872841392},{"x":-953,"y":-106,"length":958.8769472669577},{"x":-928,"y":-63,"length":930.1360115595999},{"x":-899,"y":-27,"length":899.4053591123416},{"x":-869,"y":1,"length":869.0005753738026},{"x":-829,"y":29,"length":829.5070825496308},{"x":-785,"y":51,"length":786.6549434154723},{"x":-739,"y":67,"length":742.0309966571477},{"x":-698,"y":75,"length":702.0178060419835},{"x":-649,"y":78,"length":653.670406244615},{"x":-62,"y":73,"length":95.77577981932593},{"x":-2,"y":59,"length":59.033888572581766},{"x":47,"y":37,"length":59.81638571495272},{"x":100,"y":0,"length":100}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":1518,"x":15315,"isStatic":true,"repeatTexture":true,"id":-1,"width":1103.05,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-533,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":6,"vertices":[{"x":0,"y":-465,"length":465},{"x":55,"y":-465,"length":468.2413907377262},{"x":55,"y":35,"length":65.19202405202648},{"x":260,"y":35,"length":262.3451924468981},{"x":260,"y":-465,"length":532.7522876534647},{"x":310,"y":-465,"length":558.8604476969183},{"x":335,"y":70,"length":342.23529917295207},{"x":336,"y":113,"length":354.4925951271761},{"x":330,"y":149,"length":362.0787207224418},{"x":317,"y":181,"length":365.0342449688796},{"x":297,"y":210,"length":363.7430411705494},{"x":275,"y":236,"length":362.38239471585814},{"x":242,"y":262,"length":356.6623052692841},{"x":210,"y":278,"length":348.40206658399717},{"x":171,"y":285,"length":332.3642580061821},{"x":132,"y":285,"length":314.08438356594553},{"x":92,"y":277,"length":291.87839933780646},{"x":57,"y":263,"length":269.1059270993487},{"x":35,"y":245,"length":247.48737341529164},{"x":11,"y":223,"length":223.27113561766106},{"x":-7,"y":201,"length":201.12185361118767},{"x":-24,"y":165,"length":166.73631877908304},{"x":-33,"y":127,"length":131.21737689803132},{"x":-35,"y":80,"length":87.32124598286491}],"density":1,"safeId":-1,"physic":false,"rem":true,"rotation":45,"plr":false,"line":true,"x":100,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":530},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-13,"y":-2,"length":13.152946437965905},{"x":-5,"y":-52,"length":52.23983154643591},{"x":5,"y":-90,"length":90.13878188659973},{"x":32,"y":-131,"length":134.8517704741024},{"x":569,"y":-645,"length":860.1081327368089},{"x":599,"y":-667,"length":896.4875905443421},{"x":634,"y":-682,"length":931.1713053998174},{"x":667,"y":-681,"length":953.2313465261201},{"x":698,"y":-674,"length":970.2989230129033}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":718.7,"x":12720,"isStatic":true,"repeatTexture":true,"id":-1,"width":749.65,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":410,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":3,"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}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":180,"plr":false,"line":true,"x":10196,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":117},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"height":128.35,"x":4250,"y":300,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":8660,"y":331,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":11820,"y":340,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":14160,"y":-325,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":753,"y":300,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":760,"y":240,"rotation":-18,"width":110.7},"className":"Sign15"},{"params":{"height":132.25,"x":4212,"y":239,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":238.5,"x":5160,"y":250,"rotation":15,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":240.35,"x":5040,"y":260,"rotation":0,"scaleX":1,"scaleY":1,"width":139.45},"className":"Dec13"},{"params":{"height":238.5,"x":6710,"y":250,"rotation":0,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":132.25,"x":8630,"y":271,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":238.5,"x":12220,"y":280,"rotation":-21,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":331.2,"x":14390,"y":-380,"rotation":0,"scaleX":1,"scaleY":1,"width":264},"className":"Dec14"}],[{"params":{"height":18,"x":16391,"y":-891,"rotation":-139,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16434,"y":-847,"rotation":-130.00000000000006,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16470,"y":-795,"rotation":-120,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16496,"y":-737,"rotation":-109,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16511,"y":-676,"rotation":-98,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16515,"y":-613,"rotation":-89.99999999999994,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16509,"y":-551,"rotation":-79.99999999999991,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16492,"y":-491,"rotation":-68.99999999999994,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16464,"y":-434,"rotation":-59,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16427,"y":-384,"rotation":-49,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16382,"y":-340,"rotation":-39.999999999999986,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16330,"y":-305,"rotation":-30,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16274,"y":-280,"rotation":-18.999999999999993,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16219,"y":-265,"rotation":-10.000000000000009,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16285,"y":-957,"rotation":-157.99999999999994,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":16341,"y":-928,"rotation":-147.99999999999994,"safeId":4,"ttl":0.5,"width":66},"className":"GlassCrashed1"},{"params":{"stones":false,"safeId":-1,"physic":false,"impulse":4000,"rotation":33,"height":53.2,"x":204,"id":1,"count":40,"radius":64,"y":764,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":false,"impulse":3000,"rotation":33,"height":53.2,"x":89,"id":1,"count":40,"radius":64,"y":691,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":-1,"physic":false,"impulse":3000,"rotation":33,"height":53.2,"x":149,"id":1,"count":40,"radius":64,"y":731,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":3,"physic":true,"impulse":4970,"rotation":0,"height":53.2,"x":12444,"id":31,"count":25,"radius":64,"y":423,"width":53.2},"className":"Tnt1"},{"params":{"rate":1,"height":128,"x":13390,"id":-1,"rotation":54,"safeId":3,"speed":1000,"y":-600,"width":718},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":13500,"id":-1,"rotation":54,"safeId":3,"speed":1000,"y":-680,"width":718},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":13610,"id":-1,"rotation":54,"safeId":3,"speed":1000,"y":-760,"width":718},"className":"GeyserE"},{"params":{"height":99,"force":8000,"y":-320,"rotation":0,"safeId":4,"x":15810,"time":2,"width":100},"className":"BoostE"},{"params":{"height":99,"force":8000,"y":-550,"rotation":0,"safeId":4,"x":15250,"time":4,"width":100},"className":"BoostE"},{"params":{"type":0,"x":9682,"id":-1,"active":true,"safeId":-1,"height":72,"y":359,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":9682,"id":-1,"active":true,"safeId":-1,"height":72,"y":289,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":9682,"id":-1,"active":true,"safeId":-1,"height":72,"y":219,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":9682,"id":-1,"active":true,"safeId":-1,"height":72,"y":149,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":10862,"id":22,"active":true,"safeId":-1,"height":72,"y":221,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":10862,"id":22,"active":true,"safeId":-1,"height":72,"y":151,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":10862,"id":22,"active":true,"safeId":-1,"height":72,"y":361,"rotation":0,"width":12.3},"className":"Removed0"},{"params":{"type":0,"x":10862,"id":22,"active":true,"safeId":-1,"height":72,"y":291,"rotation":0,"width":12.3},"className":"Removed0"}],null,[{"params":{"height":32,"x":239,"y":582,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":2899,"x":4250,"y":230,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":1617,"x":8660,"y":261,"width":128,"id":2,"rotation":0},"className":"SafePointE"},{"params":{"height":1080,"x":11820,"y":270,"width":128,"id":3,"rotation":0},"className":"SafePointE"},{"params":{"height":1518,"x":14160,"y":-400,"width":128,"id":4,"rotation":0},"className":"SafePointE"}],[{"params":{"height":64,"hint":-1,"id":1,"rotation":0,"safeId":-1,"x":250,"off":false,"id_off":-1,"y":690,"width":393,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":2,"rotation":0,"safeId":-1,"x":380,"off":false,"id_off":-1,"y":460,"width":393,"sndId":-1},"className":"ToggleE"},{"params":{"height":1079,"hint":-1,"id":3,"rotation":0,"safeId":1,"x":4680,"off":false,"id_off":-1,"y":-70,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":7450,"id":3,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":10,"width":17},"className":"MotorJointE"},{"params":{"height":1138,"hint":-1,"id":31,"rotation":0,"safeId":3,"x":12555,"off":false,"id_off":-1,"y":265,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":1834,"hint":-1,"id":11,"rotation":0,"safeId":3,"x":11970,"off":false,"id_off":-1,"y":340,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":5852,"id":3,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":11,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":9650,"id":21,"rotation":0,"safeId":-1,"graphic":0,"y":100,"width":17},"className":"PivotJointE"},{"params":{"height":729,"hint":-1,"id":21,"rotation":0,"safeId":-1,"x":9720,"off":false,"id_off":-1,"y":240,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":729,"hint":-1,"id":22,"rotation":0,"safeId":-1,"x":10900,"off":false,"id_off":-1,"y":242,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":10830,"id":22,"rotation":0,"safeId":-1,"graphic":0,"y":102,"width":17},"className":"PivotJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map4.json b/assets/levels/map4.json new file mode 100644 index 0000000..0c84dec --- /dev/null +++ b/assets/levels/map4.json @@ -0,0 +1 @@ +{"settings":{"theme":3,"prizes":"30,39,47","countdown":0,"gravityY":500},"layers":[[{"params":{"wireframe":false,"type":1,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":272,"y":-329,"length":426.8782027698299}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":19,"rotation":0,"stretchTexture":false,"height":342,"x":5820,"isStatic":true,"repeatTexture":true,"id":-1,"width":286.6,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-280,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"type":0,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":155,"y":-245,"length":289.9137802864845},{"x":210,"y":-225,"length":307.77426793024785},{"x":150,"y":80,"length":170}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4941,"smoothing":true,"y":-592,"width":223.4,"height":338.8,"wireframe":false,"snapToGrid":true,"rotation":-24},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":0,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":155,"y":-245,"length":289.9137802864845},{"x":210,"y":-225,"length":307.77426793024785},{"x":150,"y":80,"length":170}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":3050,"smoothing":true,"y":-657,"width":223.4,"height":338.8,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"sf":true,"bg":true,"x":7570,"vertices":[{"x":0,"y":0,"length":0},{"x":1285,"y":0,"length":1285},{"x":1290,"y":380,"length":1344.804818551748},{"x":5,"y":380,"length":380.0328933131973}],"id":-1,"density":1.5,"viscosity":1.5,"y":510,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":4,"vertices":[{"x":0,"y":10,"length":10},{"x":13,"y":-2,"length":13.152946437965905},{"x":33,"y":-11,"length":34.785054261852174},{"x":51,"y":-13,"length":52.630789467763066},{"x":66,"y":-12,"length":67.08203932499369},{"x":84,"y":-5,"length":84.1486779456457},{"x":95,"y":4,"length":95.08417323613851},{"x":109,"y":18,"length":110.47624178980746},{"x":115,"y":35,"length":120.20815280171308},{"x":118,"y":52,"length":128.94960255851896},{"x":115,"y":68,"length":133.60014970051492},{"x":107,"y":87,"length":137.90576492663388},{"x":94,"y":100,"length":137.2443077143821},{"x":77,"y":112,"length":135.9154148726332},{"x":59,"y":117,"length":131.03434664239754},{"x":41,"y":116,"length":123.03251602726817},{"x":25,"y":112,"length":114.75626344561765},{"x":12,"y":104,"length":104.6900186264192},{"x":0,"y":91,"length":91},{"x":-9,"y":76,"length":76.53103945458993},{"x":-13,"y":58,"length":59.43904440685432},{"x":-14,"y":42,"length":44.27188724235731},{"x":-9,"y":25,"length":26.570660511172846}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":false,"x":5689,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":false,"y":-27},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"sf":true,"bg":true,"x":2820,"vertices":[{"x":0,"y":0,"length":0},{"x":2145,"y":-5,"length":2145.0058274979115},{"x":2125,"y":525,"length":2188.892413984753},{"x":-20,"y":530,"length":530.3772242470448}],"id":-1,"density":1.5,"viscosity":1.5,"y":-370,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"sf":true,"bg":true,"x":1090,"vertices":[{"x":0,"y":0,"length":0},{"x":1295,"y":0,"length":1295},{"x":1525,"y":115,"length":1529.3299186244935},{"x":1605,"y":560,"length":1699.8897023042407},{"x":-265,"y":575,"length":633.1271594237606}],"id":-1,"density":1.5,"viscosity":1.5,"y":-370,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":2,"vertices":[{"x":-1240,"y":320,"length":1280.6248474865697},{"x":-1300,"y":-515,"length":1398.293602931802},{"x":-2125,"y":-2340,"length":3160.889906339669},{"x":-1055,"y":-2945,"length":3128.2662930127926},{"x":1410,"y":-3700,"length":3959.5580561471756},{"x":4765,"y":-3700,"length":6032.845514348929},{"x":14115,"y":-3800,"length":14617.565631800666},{"x":12990,"y":-1985,"length":13140.788598862702},{"x":12850,"y":-1825,"length":12978.949302620764},{"x":12740,"y":-1685,"length":12850.946463198732},{"x":12600,"y":-1550,"length":12694.9793225511},{"x":12395,"y":-1370,"length":12470.482147856193},{"x":12260,"y":-1275,"length":12326.119624602059},{"x":12095,"y":-1180,"length":12152.42465518713},{"x":11980,"y":-1155,"length":12035.548388004594},{"x":11550,"y":-1150,"length":11607.109890063073},{"x":11290,"y":-1145,"length":11347.912803683328},{"x":10997,"y":-1162,"length":11058.221059465215},{"x":10744,"y":-1162,"length":10806.654431414006},{"x":10548,"y":-1146,"length":10610.071630295433},{"x":10328,"y":-1122,"length":10388.766433027551},{"x":10160,"y":-1095,"length":10218.836773331885},{"x":9960,"y":-1073,"length":10017.63090755494},{"x":9737,"y":-1075,"length":9796.16220772196},{"x":9488,"y":-1084,"length":9549.722509057528},{"x":9251,"y":-1104,"length":9316.641937951677},{"x":9022,"y":-1124,"length":9091.746806857305},{"x":8777,"y":-1133,"length":8849.825873993228},{"x":8575,"y":-1113,"length":8646.929744134619},{"x":8348,"y":-1086,"length":8418.34306737377},{"x":8095,"y":-1040,"length":8161.5332505602155},{"x":7824,"y":-982,"length":7885.38521570126},{"x":7593,"y":-906,"length":7646.861120747519},{"x":7437,"y":-816,"length":7481.632509018336},{"x":7308,"y":-740,"length":7345.370242540535},{"x":7155,"y":-682,"length":7187.429930093232},{"x":6930,"y":-623,"length":6957.947182898129},{"x":6690,"y":-553,"length":6712.816770924111},{"x":6570,"y":-495,"length":6588.6208723829295},{"x":6515,"y":-445,"length":6530.179936265156},{"x":6430,"y":-410,"length":6443.058280040621},{"x":6375,"y":-415,"length":6388.493562648397},{"x":6320,"y":-440,"length":6335.297940902227},{"x":6235,"y":-615,"length":6265.257376995777},{"x":6180,"y":-720,"length":6221.800382525946},{"x":6105,"y":-810,"length":6158.500223268649},{"x":6060,"y":-865,"length":6121.423445572116},{"x":6000,"y":-935,"length":6072.415087920127},{"x":5915,"y":-1010,"length":6000.610385619117},{"x":5825,"y":-1040,"length":5917.112893971181},{"x":5753,"y":-1024,"length":5843.42237049488},{"x":5673,"y":-1006,"length":5761.507181285119},{"x":5620,"y":-1016,"length":5711.099368773056},{"x":5594,"y":-1056,"length":5692.800014052838},{"x":5603,"y":-1079,"length":5705.948650312233},{"x":5633,"y":-1113,"length":5741.90369128567},{"x":5659,"y":-1158,"length":5776.265662173097},{"x":5674,"y":-1210,"length":5801.583921654499},{"x":5680,"y":-1254,"length":5816.778833684499},{"x":5680,"y":-1296,"length":5825.9776861913915},{"x":5676,"y":-1343,"length":5832.720205873071},{"x":5663,"y":-1388,"length":5830.618577818309},{"x":5641,"y":-1432,"length":5819.923109457719},{"x":5616,"y":-1466,"length":5804.189176792914},{"x":5585,"y":-1501,"length":5783.184762741028},{"x":5549,"y":-1529,"length":5755.800726223937},{"x":5511,"y":-1553,"length":5725.637955721615},{"x":5474,"y":-1569,"length":5694.421568517737},{"x":5430,"y":-1578,"length":5654.642694282284},{"x":5380,"y":-1580,"length":5607.209644734179},{"x":5327,"y":-1576,"length":5555.2412188850985},{"x":5280,"y":-1565,"length":5507.052296828132},{"x":5235,"y":-1545,"length":5458.227734347478},{"x":5194,"y":-1518,"length":5411.280809568101},{"x":5158,"y":-1487,"length":5368.066039087075},{"x":5128,"y":-1451,"length":5329.332509798953},{"x":5106,"y":-1417,"length":5298.973957286448},{"x":5093,"y":-1384,"length":5277.6988356669235},{"x":5051,"y":-1387,"length":5237.973844913699},{"x":4998,"y":-1402,"length":5190.915911474583},{"x":4965,"y":-1445,"length":5171.000870237792},{"x":4961,"y":-1529,"length":5191.277492101534},{"x":4976,"y":-1606,"length":5228.748607458576},{"x":4958,"y":-1672,"length":5232.336762862268},{"x":4940,"y":-1734,"length":5235.49004392139},{"x":4898,"y":-1836,"length":5230.802997628567},{"x":4798,"y":-1932,"length":5172.371603046324},{"x":4701,"y":-1950,"length":5089.391024474343},{"x":4614,"y":-1994,"length":5026.433327917521},{"x":4503,"y":-2060,"length":4951.828854069979},{"x":4394,"y":-2116,"length":4876.955197661754},{"x":4258,"y":-2138,"length":4764.620446583337},{"x":4131,"y":-2143,"length":4653.7737375166835},{"x":3978,"y":-2152,"length":4522.785424934506},{"x":3795,"y":-2145,"length":4359.248788495559},{"x":3623,"y":-2112,"length":4193.646742394977},{"x":3487,"y":-2056,"length":4048.0001235177847},{"x":3395,"y":-1977,"length":3928.6834945055066},{"x":3195,"y":-1926,"length":3730.616705050252},{"x":2993,"y":-1911,"length":3551.0519568150507},{"x":2784,"y":-1924,"length":3384.1442049652674},{"x":2422,"y":-1946,"length":3106.9277429641006},{"x":2233,"y":-1897,"length":2929.999658703052},{"x":2040,"y":-1826,"length":2737.8597480513863},{"x":1864,"y":-1751,"length":2557.439539852311},{"x":1708,"y":-1655,"length":2378.29539796889},{"x":1477,"y":-1491,"length":2098.716274297219},{"x":1264,"y":-1320,"length":1827.5929524924306},{"x":1082,"y":-1224,"length":1633.6768346279505},{"x":932,"y":-1210,"length":1527.3257674772597},{"x":764,"y":-1226,"length":1444.5663709224302},{"x":655,"y":-1220,"length":1384.7111612173853},{"x":558,"y":-1203,"length":1326.111986221375},{"x":478,"y":-1167,"length":1261.0999167393518},{"x":386,"y":-1133,"length":1196.9482027222398},{"x":310,"y":-1125,"length":1166.9297322461193},{"x":235,"y":-1120,"length":1144.388482989933},{"x":160,"y":-1140,"length":1151.1733144926527},{"x":120,"y":-1415,"length":1420.0792231421458},{"x":110,"y":-1465,"length":1469.1238885812184},{"x":95,"y":-1510,"length":1512.9854592824083},{"x":75,"y":-1550,"length":1551.8134552838494},{"x":45,"y":-1595,"length":1595.6346699667815},{"x":10,"y":-1625,"length":1625.0307689394683},{"x":-25,"y":-1655,"length":1655.188810981998},{"x":-75,"y":-1685,"length":1686.6683135696835},{"x":-130,"y":-1705,"length":1709.9488296437412},{"x":-190,"y":-1720,"length":1730.4623659588785},{"x":-255,"y":-1720,"length":1738.7998734759558},{"x":-315,"y":-1715,"length":1743.6886189913612},{"x":-390,"y":-1690,"length":1734.4163283364235},{"x":-445,"y":-1660,"length":1718.6113580446279},{"x":-485,"y":-1625,"length":1695.8331285831161},{"x":-530,"y":-1575,"length":1661.783680266478},{"x":-560,"y":-1525,"length":1624.5691736580502},{"x":-580,"y":-1475,"length":1584.936907261611},{"x":-590,"y":-1415,"length":1533.0769713227057},{"x":-595,"y":-1355,"length":1479.8817520329117},{"x":-595,"y":-1305,"length":1434.2419600611329},{"x":-575,"y":-1235,"length":1362.2958562661784},{"x":-545,"y":-1180,"length":1299.7788273394824},{"x":-510,"y":-1130,"length":1239.7580409095963},{"x":-465,"y":-1080,"length":1175.8507558359606},{"x":-410,"y":-1045,"length":1122.5528940767113},{"x":-345,"y":-1020,"length":1076.7659912905867},{"x":-285,"y":-1015,"length":1054.2532902486005},{"x":-295,"y":-240,"length":380.2959373961284},{"x":-290,"y":-185,"length":343.98401125633734},{"x":-280,"y":-130,"length":308.70698080866265},{"x":-255,"y":-85,"length":268.79360111431225},{"x":-225,"y":-50,"length":230.4886114323222},{"x":-175,"y":-20,"length":176.13914953808538},{"x":-120,"y":5,"length":120.10412149464314},{"x":-60,"y":5,"length":60.207972893961475},{"x":5,"y":-10,"length":11.180339887498949},{"x":60,"y":-35,"length":69.46221994724903},{"x":105,"y":-75,"length":129.0348790056394},{"x":130,"y":-120,"length":176.91806012954132},{"x":150,"y":-170,"length":226.71568097509268},{"x":155,"y":-225,"length":273.22152184628504},{"x":195,"y":-225,"length":297.7414986191881},{"x":195,"y":-875,"length":896.4652809785775},{"x":564,"y":-873,"length":1039.3387320792006},{"x":615,"y":-885,"length":1077.7058968011634},{"x":665,"y":-905,"length":1123.05387226081},{"x":705,"y":-895,"length":1139.3199726152438},{"x":710,"y":-860,"length":1115.212984142491},{"x":700,"y":-800,"length":1063.014581273465},{"x":670,"y":-640,"length":926.5527507918802},{"x":634,"y":-721,"length":960.1025986841198},{"x":604,"y":-672,"length":903.5485598461214},{"x":595,"y":-620,"length":859.3165889240123},{"x":585,"y":-350,"length":681.7074152449861},{"x":1930,"y":-310,"length":1954.7378340841515},{"x":1935,"y":-580,"length":2020.055692301576},{"x":1925,"y":-655,"length":2033.3838791531716},{"x":1895,"y":-705,"length":2021.8926776661515},{"x":1810,"y":-745,"length":1957.3259820479573},{"x":1775,"y":-660,"length":1893.7330857330448},{"x":1750,"y":-780,"length":1915.9592897553955},{"x":1720,"y":-820,"length":1905.465822312224},{"x":1735,"y":-855,"length":1934.23111338847},{"x":1780,"y":-870,"length":1981.2369873389705},{"x":2090,"y":-875,"length":2265.772495198933},{"x":2200,"y":-890,"length":2373.2045845227926},{"x":2260,"y":-900,"length":2432.6117651610584},{"x":2315,"y":-925,"length":2492.9600879276027},{"x":2370,"y":-955,"length":2555.176119174567},{"x":2415,"y":-990,"length":2610.043103092361},{"x":2460,"y":-1060,"length":2678.656379605268},{"x":2500,"y":-1080,"length":2723.306813416366},{"x":2565,"y":-1090,"length":2786.9921061962123},{"x":2625,"y":-1085,"length":2840.3960991382874},{"x":2700,"y":-1050,"length":2896.981187374195},{"x":2780,"y":-995,"length":2952.697918853197},{"x":2805,"y":-910,"length":2948.9192935717992},{"x":2795,"y":-868,"length":2926.6788344469915},{"x":2765,"y":-830,"length":2886.8884633805997},{"x":2715,"y":-725,"length":2810.133448788509},{"x":2688,"y":-824,"length":2811.462252992204},{"x":2600,"y":-848,"length":2734.7950563067793},{"x":2550,"y":-735,"length":2653.813294110948},{"x":2484,"y":-820,"length":2615.8470903323077},{"x":2448,"y":-775,"length":2567.747845875837},{"x":2453,"y":-700,"length":2550.9231662282577},{"x":2457,"y":-628,"length":2535.987578833934},{"x":2491,"y":-540,"length":2548.8587642315533},{"x":2582,"y":-462,"length":2623.0074342250728},{"x":2711,"y":-422,"length":2743.648118837399},{"x":4086,"y":-395,"length":4105.048233577773},{"x":4260,"y":-435,"length":4282.151912298302},{"x":4364,"y":-533,"length":4396.4286642683055},{"x":4426,"y":-651,"length":4473.620122451168},{"x":4461,"y":-753,"length":4524.10543643713},{"x":4475,"y":-836,"length":4552.419246949911},{"x":4475,"y":-903,"length":4565.198133706795},{"x":4435,"y":-955,"length":4536.656257641745},{"x":4375,"y":-1010,"length":4490.069598569715},{"x":4360,"y":-935,"length":4459.128278038209},{"x":4340,"y":-1020,"length":4458.250778051858},{"x":4315,"y":-1021,"length":4434.147719686389},{"x":4320,"y":-1050,"length":4445.773273571202},{"x":4338,"y":-1080,"length":4470.418772329948},{"x":4365,"y":-1090,"length":4499.036007857683},{"x":4700,"y":-1090,"length":4824.738334873717},{"x":4700,"y":-1065,"length":4819.151896340268},{"x":4730,"y":-1050,"length":4845.141896786925},{"x":4731,"y":-1015,"length":4838.6553917384945},{"x":4695,"y":-975,"length":4795.169444347092},{"x":4670,"y":-995,"length":4774.821986210585},{"x":4645,"y":-900,"length":4731.387217296847},{"x":4630,"y":-990,"length":4734.65943865026},{"x":4605,"y":-955,"length":4702.983095865857},{"x":4588,"y":-973,"length":4690.039765289843},{"x":4561,"y":-940,"length":4656.8574167564975},{"x":4546,"y":-886,"length":4631.534518925666},{"x":4541,"y":-846,"length":4619.133793256047},{"x":4528,"y":-748,"length":4589.366840861602},{"x":4525,"y":-656,"length":4572.303686327057},{"x":4551,"y":-586,"length":4588.572435954346},{"x":4610,"y":-493,"length":4636.286121455405},{"x":4720,"y":-440,"length":4740.4641122995545},{"x":7155,"y":90,"length":7155.566015347773},{"x":7230,"y":115,"length":7230.914534137435},{"x":7315,"y":155,"length":7316.6419893281645},{"x":7400,"y":205,"length":7402.838982444506},{"x":7490,"y":255,"length":7494.339530605749},{"x":7590,"y":290,"length":7595.538163948621},{"x":7710,"y":335,"length":7717.27445410619},{"x":7790,"y":380,"length":7799.262785674041},{"x":7880,"y":390,"length":7889.645112424259},{"x":7970,"y":410,"length":7980.538828926277},{"x":8085,"y":410,"length":8095.389119739705},{"x":8155,"y":390,"length":8164.32024114684},{"x":8215,"y":345,"length":8222.241178656826},{"x":8260,"y":295,"length":8265.266178411921},{"x":8300,"y":245,"length":8303.615176536061},{"x":8325,"y":205,"length":8327.523641515525},{"x":8315,"y":155,"length":8316.444552812218},{"x":8190,"y":85,"length":8190.441074813981},{"x":8170,"y":145,"length":8171.286618397375},{"x":8140,"y":20,"length":8140.024569987489},{"x":8135,"y":-25,"length":8135.038414168675},{"x":8160,"y":-65,"length":8160.258880697352},{"x":8200,"y":-95,"length":8200.55028641371},{"x":8260,"y":-120,"length":8260.871624713702},{"x":8650,"y":-210,"length":8652.548757447137},{"x":8715,"y":-230,"length":8718.034468846748},{"x":8775,"y":-255,"length":8778.704346314438},{"x":8835,"y":-290,"length":8839.758198050442},{"x":9015,"y":-280,"length":9019.347260195718},{"x":9135,"y":-245,"length":9138.284850014252},{"x":9188,"y":-195,"length":9190.069042178084},{"x":9225,"y":-140,"length":9226.062269462525},{"x":9290,"y":-35,"length":9290.065930874764},{"x":9280,"y":15,"length":9280.01212283691},{"x":9235,"y":10,"length":9235.005414183577},{"x":9205,"y":120,"length":9205.782150366149},{"x":9164,"y":33,"length":9164.059417092405},{"x":9135,"y":40,"length":9135.08757484021},{"x":9095,"y":-13,"length":9095.009290814385},{"x":9022,"y":-64,"length":9022.226997809355},{"x":8971,"y":-26,"length":8971.037676879972},{"x":8970,"y":130,"length":8970.941979524781},{"x":8940,"y":215,"length":8942.584917125472},{"x":8945,"y":300,"length":8950.02932956088},{"x":8975,"y":350,"length":8981.821919855682},{"x":9140,"y":340,"length":9146.321665019223},{"x":9210,"y":335,"length":9216.090548600312},{"x":9305,"y":345,"length":9311.39355843152},{"x":9388,"y":364,"length":9395.05401793944},{"x":9451,"y":370,"length":9458.239846821394},{"x":9520,"y":357,"length":9526.691398381707},{"x":9594,"y":349,"length":9600.345670859982},{"x":9661,"y":347,"length":9667.229696247006},{"x":9718,"y":352,"length":9724.372884664594},{"x":9773,"y":358,"length":9779.554846719762},{"x":9831,"y":353,"length":9837.33551323731},{"x":9908,"y":327,"length":9913.394625454996},{"x":10023,"y":294,"length":10027.310955585252},{"x":10097,"y":277,"length":10100.798879296628},{"x":10155,"y":280,"length":10158.859434011281},{"x":10214,"y":288,"length":10218.059502664877},{"x":10272,"y":301,"length":10276.409149114295},{"x":10371,"y":335,"length":10376.409109128263},{"x":10428,"y":351,"length":10433.905548738689},{"x":10487,"y":361,"length":10493.211615134805},{"x":10559,"y":363,"length":10565.237810858778},{"x":10635,"y":363,"length":10641.193260156495},{"x":10701,"y":362,"length":10707.121228416161},{"x":10770,"y":355,"length":10775.84915447502},{"x":10850,"y":341,"length":10855.35724884262},{"x":10941,"y":335,"length":10946.12744307319},{"x":11023,"y":329,"length":11027.908686600556},{"x":11111,"y":334,"length":11116.018936651737},{"x":11203,"y":338,"length":11208.097653036397},{"x":11284,"y":349,"length":11289.39577656838},{"x":11387,"y":362,"length":11392.752652454103},{"x":11451,"y":368,"length":11456.911669381065},{"x":11521,"y":375,"length":11527.101370249158},{"x":11576,"y":377,"length":11582.137324345624},{"x":11610,"y":370,"length":11615.894283265494},{"x":11670,"y":295,"length":11673.727982097236},{"x":11708,"y":214,"length":11709.955593425622},{"x":11714,"y":142,"length":11714.86064791212},{"x":11734,"y":42,"length":11734.07516594299},{"x":11737,"y":-62,"length":11737.163754502193},{"x":11732,"y":-156,"length":11733.037117473037},{"x":11720,"y":-232,"length":11722.296020831414},{"x":11640,"y":-300,"length":11643.865337593012},{"x":11589,"y":-312,"length":11593.199083945725},{"x":11545,"y":-314,"length":11549.269284244783},{"x":11534,"y":-278,"length":11537.349782337364},{"x":11518,"y":-310,"length":11522.170975992329},{"x":11485,"y":-209,"length":11486.901496922485},{"x":11473,"y":-300,"length":11476.921582027126},{"x":11472,"y":-356,"length":11477.522380723114},{"x":11492,"y":-428,"length":11499.967304301348},{"x":11530,"y":-465,"length":11539.372816578898},{"x":11985,"y":-470,"length":11994.212145864354},{"x":12028,"y":-445,"length":12036.229019090655},{"x":12047,"y":-385,"length":12053.150376561309},{"x":12034,"y":-340,"length":12038.80209987688},{"x":12016,"y":-369,"length":12021.664485419646},{"x":12005,"y":-327,"length":12009.452693607649},{"x":11983,"y":-347,"length":11988.023106417504},{"x":11958,"y":-212,"length":11959.87909637886},{"x":11945,"y":-330,"length":11949.557523188882},{"x":11871,"y":-305,"length":11874.917515503003},{"x":11848,"y":-258,"length":11850.808748773225},{"x":11833,"y":-201,"length":11834.70700947007},{"x":11853,"y":-125,"length":11853.659097510777},{"x":11871,"y":-40,"length":11871.067390929933},{"x":11860,"y":95,"length":11860.38047450418},{"x":11863,"y":240,"length":11865.427468068734},{"x":11886,"y":376,"length":11891.945677642494},{"x":11986,"y":458,"length":11994.747183663356},{"x":13401,"y":920,"length":13432.542611136583},{"x":11730,"y":2415,"length":11976.022920819749},{"x":10200,"y":2010,"length":10396.157944163795},{"x":2645,"y":890,"length":2790.7212329431973},{"x":1200,"y":605,"length":1343.8842956147676},{"x":-785,"y":565,"length":967.1866417605239}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":460,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":430},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":3,"y":12,"length":12.36931687685298},{"x":7,"y":-634,"length":634.0386423554955}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":659,"x":640,"isStatic":true,"repeatTexture":true,"id":-1,"width":68,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":190,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"vertices":[{"x":775,"y":-840,"length":1142.902008047934},{"x":1175,"y":-840,"length":1444.3770283412846},{"x":1375,"y":-650,"length":1520.896117425513},{"x":2325,"y":-660,"length":2416.8626357325315},{"x":5065,"y":-705,"length":5113.8292892899735},{"x":5205,"y":-295,"length":5213.35304770356},{"x":6495,"y":-95,"length":6495.694728048725},{"x":8185,"y":280,"length":8189.787848290089},{"x":9955,"y":425,"length":9964.067944368906},{"x":14235,"y":355,"length":14239.425901348692}],"lineId":-1,"physic":false,"directed":false,"width":13473,"shape":false,"height":1329,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":80,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":-150,"smoothing":true,"y":402,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":100,"y":-66,"length":119.81652640600127},{"x":550,"y":180,"length":578.7054518492115}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":0,"stretchTexture":false,"height":260,"x":3130,"isStatic":false,"repeatTexture":true,"id":-1,"width":463,"textureOffset":0,"safeId":1,"graphic":true,"smoothing":true,"y":-830,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":7,"straightSides":true,"snapToGrid":false,"vertices":[{"x":-21,"y":1,"length":21.02379604162864},{"x":432,"y":-240,"length":494.19024676737604}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":16,"rotation":0,"stretchTexture":false,"height":255.1,"x":4590,"isStatic":false,"repeatTexture":true,"id":-1,"width":466,"textureOffset":0,"safeId":1,"graphic":true,"smoothing":true,"y":-650,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":27,"y":64,"length":69.46221994724903},{"x":60,"y":119,"length":133.27040181525678},{"x":94,"y":163,"length":188.16216410320115},{"x":178,"y":197,"length":265.5051788572118},{"x":264,"y":219,"length":343.01166160933946},{"x":2616,"y":730,"length":2715.9447711615935}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":773.7,"x":4980,"isStatic":true,"repeatTexture":true,"id":-1,"width":2652.3,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-220,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"layer":6,"vertices":[{"x":-60,"y":-5,"length":60.207972893961475},{"x":510,"y":15,"length":510.22054055084845},{"x":630,"y":10,"length":630.0793600809345},{"x":678,"y":6,"length":678.0265481527991},{"x":745,"y":-5,"length":745.0167783345554},{"x":815,"y":-30,"length":815.5519603311612},{"x":907,"y":-82,"length":910.6991819475847},{"x":855,"y":10,"length":855.0584775323849},{"x":780,"y":80,"length":784.0918313565063},{"x":705,"y":125,"length":715.9958100436063},{"x":595,"y":145,"length":612.413259164104}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":5150,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-60},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":688,"x":12220,"y":-380,"rotation":0,"width":428},"className":"FinishZone"},{"params":{"height":21.75,"x":3530,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3600,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3670,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3740,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3810,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3880,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":3950,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4020,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4090,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4160,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4230,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4300,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4370,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4440,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4510,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4580,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4650,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":4720,"id":-1,"active":true,"safeId":1,"y":-650,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5876,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5736,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5272,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5552,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5482,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":6016,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5946,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5342,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5202,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5666,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5806,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"height":21.75,"x":5412,"id":-1,"active":true,"safeId":2,"y":-648,"rotation":0,"width":86},"className":"PlankCandy"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":107,"y":-6,"length":107.16809226630845},{"x":202,"y":-16,"length":202.63267258761604},{"x":277,"y":-15,"length":277.4058398808504},{"x":334,"y":-10,"length":334.1496670655232},{"x":406,"y":8,"length":406.07881008493905},{"x":466,"y":12,"length":466.1544808322666},{"x":506,"y":6,"length":506.0355718721758},{"x":620,"y":-8,"length":620.0516107551048},{"x":720,"y":-7,"length":720.0340269737258},{"x":770,"y":0,"length":770},{"x":850,"y":-1,"length":850.0005882350906},{"x":904,"y":-22,"length":904.267659490264},{"x":956,"y":-40,"length":956.8364541550452},{"x":1025,"y":-59,"length":1026.6966445839785},{"x":1087,"y":-73,"length":1089.4484843258997},{"x":1166,"y":-76,"length":1168.4742187998843},{"x":1282,"y":-62,"length":1283.4983443697931},{"x":1355,"y":-35,"length":1355.4519541466602},{"x":1433,"y":-10,"length":1433.0348914105336},{"x":1521,"y":0,"length":1521},{"x":1674,"y":9,"length":1674.0241933735606},{"x":1799,"y":-2,"length":1799.0011117283948},{"x":1900,"y":-17,"length":1900.0760511095339},{"x":2010,"y":-25,"length":2010.15546662441},{"x":2120,"y":-24,"length":2120.1358447042962},{"x":2218,"y":-17,"length":2218.0651478259156},{"x":2359,"y":-2,"length":2359.000847816719},{"x":2454,"y":10,"length":2454.0203748135427},{"x":2529,"y":18,"length":2529.0640561282744},{"x":2640,"y":23,"length":2640.1001874928916}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":163,"x":9432,"isStatic":true,"repeatTexture":true,"id":-1,"width":2653,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":771,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"height":95.35,"x":760,"y":-490,"rotation":0,"scaleX":1,"scaleY":0.7428905336969226,"width":9.3},"className":"SignPillar"},{"params":{"height":70.65,"x":5820,"y":-280,"rotation":0,"width":70.65},"className":"Sign2"},{"params":{"height":128.35,"x":7030,"y":10,"rotation":132,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":7100,"y":70,"rotation":147,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":9530,"y":110,"rotation":45,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":69.8,"x":9590,"y":50,"rotation":141,"width":68.8},"className":"Sign1"},{"params":{"height":128.35,"x":9030,"y":170,"rotation":-15,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":82.25,"x":730,"y":-460,"rotation":0,"width":63.15},"className":"Dec29"},{"params":{"height":213.45,"x":-20,"y":-860,"rotation":66,"scaleX":1,"scaleY":1,"width":171.75},"className":"Dec13"},{"params":{"height":234.2,"x":2680,"y":-580,"rotation":-12,"scaleX":1,"scaleY":1,"width":197},"className":"Dec15"},{"params":{"height":244.8,"x":2640,"y":-560,"rotation":0,"scaleX":1,"scaleY":1,"width":165.85},"className":"Dec14"},{"params":{"height":213.45,"x":2730,"y":-600,"rotation":0,"scaleX":1,"scaleY":1,"width":171.75},"className":"Dec13"},{"params":{"height":244.8,"x":5086,"y":-770,"rotation":0,"scaleX":-1,"scaleY":1,"width":165.85},"className":"Dec14"},{"params":{"height":82.25,"x":9010,"y":221,"rotation":-18,"width":63.15},"className":"Dec29"},{"params":{"height":234.2,"x":12220,"y":-150,"rotation":0,"scaleX":1,"scaleY":1,"width":197},"className":"Dec15"},{"params":{"height":244.8,"x":11970,"y":-130,"rotation":-21,"scaleX":1,"scaleY":1,"width":165.85},"className":"Dec14"},{"params":{"height":213.45,"x":12549,"y":-100,"rotation":18,"scaleX":-1,"scaleY":1,"width":171.75},"className":"Dec13"}],[{"params":{"height":18,"x":624,"y":140,"rotation":-90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":624,"y":10,"rotation":-90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":624,"y":-120,"rotation":-90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":624,"y":-250,"rotation":-90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":624,"y":-380,"rotation":-90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":624,"y":-510,"rotation":-90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":624,"y":-640,"rotation":-90,"safeId":-1,"ttl":0.5,"width":132},"className":"GlassCrashed0"},{"params":{"rate":1,"height":128,"x":383,"id":-1,"rotation":0,"safeId":-1,"speed":1000,"y":100,"width":417},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":383,"id":-1,"rotation":0,"safeId":-1,"speed":1000,"y":-60,"width":417},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":383,"id":-1,"rotation":0,"safeId":-1,"speed":1000,"y":-220,"width":417},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":383,"id":-1,"rotation":0,"safeId":-1,"speed":1000,"y":-370,"width":417},"className":"GeyserE"},{"params":{"rate":1,"height":128,"x":383,"id":-1,"rotation":0,"safeId":-1,"speed":1000,"y":-520,"width":417},"className":"GeyserE"},{"params":{"height":99,"force":5000,"y":-690,"rotation":0,"safeId":-1,"x":560,"time":1,"width":100},"className":"BoostE"},{"params":{"height":99,"force":3500,"y":-560,"rotation":0,"safeId":1,"x":1340,"time":1,"width":100},"className":"BoostE"},{"params":{"stones":false,"safeId":2,"physic":true,"impulse":3000,"rotation":0,"height":53.2,"x":5609,"id":7,"count":12,"radius":64,"y":-630,"width":53.2},"className":"Tnt1"},{"params":{"height":99,"force":10000,"y":70,"rotation":0,"safeId":3,"x":9370,"time":2,"width":100},"className":"BoostE"}],null,[{"params":{"height":32,"x":380,"y":360,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":381,"x":760,"y":-540,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":1745,"x":4960,"y":-770,"width":128,"id":2,"rotation":0},"className":"SafePointE"},{"params":{"height":2139,"x":9000,"y":90,"width":128,"id":3,"rotation":0},"className":"SafePointE"}],[{"params":{"height":17,"x":3566,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3636,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3706,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3776,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3846,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3916,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3986,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4056,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4126,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4196,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4266,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4336,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4406,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4476,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4546,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4616,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4686,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3676,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":3240,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-890,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5010,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-880,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":4576,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":-650,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5308,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5772,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5632,"id":6,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6052,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5518,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5238,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5982,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5378,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5448,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5842,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5702,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5912,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5588,"id":6,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5168,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-648,"width":17},"className":"PivotJointE"},{"params":{"height":64,"hint":-1,"id":6,"rotation":18,"safeId":2,"x":5640,"off":false,"id_off":-1,"y":-1010,"width":171,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":7,"rotation":18,"safeId":2,"x":5640,"off":false,"id_off":-1,"y":-1006,"width":171,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":5740,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":24,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":5348,"id":9,"rotation":0,"safeId":2,"graphic":0,"y":-28,"width":17},"className":"PivotJointE"},{"params":{"height":64,"hint":-1,"id":9,"rotation":0,"safeId":2,"x":5540,"off":false,"id_off":-1,"y":-60,"width":864,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map5.json b/assets/levels/map5.json new file mode 100644 index 0000000..a0dc37c --- /dev/null +++ b/assets/levels/map5.json @@ -0,0 +1 @@ +{"settings":{"theme":3,"prizes":"30,38,44","countdown":0,"gravityY":500},"layers":[[{"params":{"height":494,"x":11050,"y":1039,"rotation":0,"width":571},"className":"FinishZone"},{"params":{"sf":true,"bg":true,"x":5140,"vertices":[{"x":0,"y":0,"length":0},{"x":760,"y":0,"length":760},{"x":765,"y":325,"length":831.17386869415},{"x":5,"y":325,"length":325.0384592629002}],"id":-1,"density":1.5,"viscosity":1.5,"y":990,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"layer":6,"vertices":[{"x":0,"y":0,"length":0},{"x":20,"y":-70,"length":72.80109889280519},{"x":51,"y":-137,"length":146.18481453283715},{"x":88,"y":-191,"length":210.2974084481309},{"x":133,"y":-236,"length":270.8966592632696},{"x":194,"y":-281,"length":341.4630287454265},{"x":273,"y":-316,"length":417.5943007273926},{"x":355,"y":-332,"length":486.0545236905012},{"x":444,"y":-330,"length":553.2052060492562},{"x":527,"y":-309,"length":610.9091585497798},{"x":600,"y":-273,"length":659.1881370291793},{"x":660,"y":-226,"length":697.6216739752285},{"x":717,"y":-160,"length":734.6352836612192},{"x":752,"y":-103,"length":759.0210800761729},{"x":768,"y":-52,"length":769.7584036566278},{"x":779,"y":-1,"length":779.0006418482593},{"x":785,"y":50,"length":786.5907449239407},{"x":782,"y":100,"length":788.3679344062643},{"x":535,"y":100,"length":544.2655601817921},{"x":525,"y":130,"length":540.8558033339385},{"x":508,"y":157,"length":531.7076264264036},{"x":479,"y":184,"length":513.1247411692405},{"x":444,"y":202,"length":487.79093882523074},{"x":401,"y":211,"length":453.1247068964569},{"x":362,"y":210,"length":418.5020907952552},{"x":324,"y":197,"length":379.18992602652304},{"x":297,"y":179,"length":346.77081768799405},{"x":275,"y":159,"length":317.6570477732235},{"x":258,"y":132,"length":289.8068322175997},{"x":245,"y":100,"length":264.62237244798484},{"x":0,"y":100,"length":100},{"x":-5,"y":53,"length":53.23532661682466}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":84,"plr":true,"line":true,"x":3251,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":241},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"x":0,"y":2,"length":2},{"x":31,"y":-15,"length":34.438350715445125},{"x":72,"y":-22,"length":75.28612089887484},{"x":111,"y":-18,"length":112.44998888394787},{"x":146,"y":-2,"length":146.01369798755184},{"x":177,"y":22,"length":178.36199146679206},{"x":198,"y":57,"length":206.0412580043133},{"x":207,"y":95,"length":227.75864418282788},{"x":206,"y":131,"length":244.12496799794977},{"x":191,"y":172,"length":257.0311265197272},{"x":161,"y":208,"length":263.0304164920856},{"x":124,"y":228,"length":259.53805116013336},{"x":71,"y":239,"length":249.32308356828895},{"x":28,"y":231,"length":232.69078194032525},{"x":-5,"y":210,"length":210.05951537600004},{"x":-30,"y":185,"length":187.41664813991312},{"x":-48,"y":149,"length":156.54072952429985},{"x":-54,"y":110,"length":122.53978945632312},{"x":-48,"y":72,"length":86.53323061113575},{"x":-30,"y":34,"length":45.34313619501854}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":1555,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":733},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":3,"vertices":[{"x":0,"y":2,"length":2},{"x":31,"y":-15,"length":34.438350715445125},{"x":72,"y":-22,"length":75.28612089887484},{"x":111,"y":-18,"length":112.44998888394787},{"x":146,"y":-2,"length":146.01369798755184},{"x":177,"y":22,"length":178.36199146679206},{"x":198,"y":57,"length":206.0412580043133},{"x":207,"y":95,"length":227.75864418282788},{"x":206,"y":131,"length":244.12496799794977},{"x":191,"y":172,"length":257.0311265197272},{"x":161,"y":208,"length":263.0304164920856},{"x":124,"y":228,"length":259.53805116013336},{"x":71,"y":239,"length":249.32308356828895},{"x":28,"y":231,"length":232.69078194032525},{"x":-5,"y":210,"length":210.05951537600004},{"x":-30,"y":185,"length":187.41664813991312},{"x":-48,"y":149,"length":156.54072952429985},{"x":-54,"y":110,"length":122.53978945632312},{"x":-48,"y":72,"length":86.53323061113575},{"x":-30,"y":34,"length":45.34313619501854}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":1135,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":483},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"layer":2,"vertices":[{"x":210,"y":25,"length":211.482859825566},{"x":800,"y":25,"length":800.3905296791061},{"x":890,"y":15,"length":890.1263955191981},{"x":970,"y":0,"length":970},{"x":1006,"y":2,"length":1006.0019880696061},{"x":1043,"y":10,"length":1043.047937536909},{"x":1078,"y":23,"length":1078.245333864237},{"x":1105,"y":41,"length":1105.7603718708679},{"x":1139,"y":70,"length":1141.1489823857357},{"x":1161,"y":94,"length":1164.7991243128577},{"x":1180,"y":124,"length":1186.497366200195},{"x":1196,"y":159,"length":1206.522689384663},{"x":1206,"y":197,"length":1221.9840424490003},{"x":1208,"y":225,"length":1228.7754066549346},{"x":1211,"y":255,"length":1237.556463358339},{"x":1241,"y":234,"length":1262.868560064744},{"x":1273,"y":214,"length":1290.8621150223598},{"x":1315,"y":195,"length":1329.3795545291043},{"x":1358,"y":187,"length":1370.8147212515628},{"x":1400,"y":187,"length":1412.433715258879},{"x":1445,"y":195,"length":1458.0980762623617},{"x":1481,"y":209,"length":1495.6744298141891},{"x":1513,"y":228,"length":1530.0826775047158},{"x":1544,"y":254,"length":1564.7530156545474},{"x":1568,"y":281,"length":1592.9799119888487},{"x":1588,"y":313,"length":1618.55274859981},{"x":1605,"y":350,"length":1642.7187829936079},{"x":1614,"y":396,"length":1661.8700310192733},{"x":1616,"y":436,"length":1673.7837375240565},{"x":1611,"y":477,"length":1680.1339232335022},{"x":1602,"y":517,"length":1683.3576565899475},{"x":1638,"y":496,"length":1711.4496779046704},{"x":1672,"y":478,"length":1738.984761290334},{"x":1715,"y":469,"length":1777.9724407312954},{"x":1760,"y":468,"length":1821.1600698455916},{"x":1799,"y":473,"length":1860.1424676620875},{"x":1845,"y":487,"length":1908.1912902012732},{"x":1879,"y":507,"length":1946.198859315255},{"x":1912,"y":532,"length":1984.6329635476682},{"x":1934,"y":557,"length":2012.6114875951594},{"x":1956,"y":588,"length":2042.4690940134199},{"x":1980,"y":623,"length":2075.699641084904},{"x":2021,"y":658,"length":2125.4187822638623},{"x":2073,"y":684,"length":2182.9303699385373},{"x":2143,"y":701,"length":2254.739452797152},{"x":2247,"y":707,"length":2355.601409406948},{"x":2364,"y":704,"length":2466.599278358769},{"x":2455,"y":692,"length":2550.664423243481},{"x":2543,"y":663,"length":2628.0064687896033},{"x":2627,"y":622,"length":2699.6320119601487},{"x":2691,"y":570,"length":2750.705545855463},{"x":2735,"y":525,"length":2784.9326742311023},{"x":2785,"y":450,"length":2821.121231000185},{"x":2825,"y":352,"length":2846.8454471572563},{"x":2845,"y":265,"length":2857.315173375174},{"x":2900,"y":215,"length":2907.9589061745696},{"x":2909,"y":159,"length":2913.3420671112412},{"x":2933,"y":95,"length":2934.53812379393},{"x":2959,"y":45,"length":2959.342156628733},{"x":2987,"y":12,"length":2987.02410435537},{"x":3021,"y":-23,"length":3021.0875525214424},{"x":3060,"y":-52,"length":3060.4417981722836},{"x":3103,"y":-75,"length":3103.9062485841932},{"x":3145,"y":-91,"length":3146.3162587381453},{"x":3189,"y":-100,"length":3190.567504379119},{"x":3237,"y":-106,"length":3238.735092594021},{"x":3283,"y":-106,"length":3284.7107939664947},{"x":3341,"y":-97,"length":3342.407814734761},{"x":3400,"y":-77,"length":3400.871799994819},{"x":3442,"y":-55,"length":3442.439396706934},{"x":3482,"y":-25,"length":3482.089746115111},{"x":3530,"y":20,"length":3530.0566567691235},{"x":3560,"y":65,"length":3560.593349429277},{"x":3585,"y":115,"length":3586.8440166809596},{"x":3605,"y":190,"length":3610.0034626022175},{"x":3620,"y":230,"length":3627.2992708074144},{"x":3660,"y":265,"length":3669.581038756332},{"x":3715,"y":300,"length":3727.0933715162005},{"x":3780,"y":330,"length":3794.377419287649},{"x":3875,"y":345,"length":3890.327749688964},{"x":3983,"y":353,"length":3998.612009185187},{"x":4094,"y":358,"length":4109.6228537421775},{"x":4176,"y":354,"length":4190.977451621518},{"x":4239,"y":342,"length":4252.773800709368},{"x":4332,"y":316,"length":4343.510101289048},{"x":4409,"y":292,"length":4418.658733145161},{"x":4472,"y":259,"length":4479.4938330128325},{"x":4537,"y":215,"length":4542.091368521774},{"x":4608,"y":153,"length":4610.539339383192},{"x":4674,"y":135,"length":4675.949208449553},{"x":4735,"y":128,"length":4736.729779077544},{"x":4799,"y":124,"length":4800.601733116381},{"x":4855,"y":130,"length":4856.74016187813},{"x":4923,"y":145,"length":4925.134922009752},{"x":4982,"y":168,"length":4984.83179254827},{"x":5032,"y":192,"length":5035.661624851296},{"x":5078,"y":236,"length":5083.48109074874},{"x":5118,"y":288,"length":5126.096760694242},{"x":5148,"y":342,"length":5159.347633179994},{"x":5176,"y":410,"length":5192.213015661048},{"x":5192,"y":478,"length":5213.957038564856},{"x":5200,"y":548,"length":5228.795654832956},{"x":5202,"y":632,"length":5240.25075735885},{"x":5215,"y":695,"length":5261.107297898418},{"x":5245,"y":736,"length":5296.387542467035},{"x":5282,"y":776,"length":5338.698343229368},{"x":5328,"y":815,"length":5389.973005498265},{"x":5376,"y":844,"length":5441.848215450335},{"x":5432,"y":868,"length":5500.913378703577},{"x":5491,"y":878,"length":5560.752197320071},{"x":5552,"y":880,"length":5621.308032833639},{"x":5601,"y":872,"length":5668.472898409235},{"x":5649,"y":860,"length":5714.087941220366},{"x":5696,"y":838,"length":5757.313609662062},{"x":5734,"y":812,"length":5791.208854807432},{"x":5773,"y":783,"length":5825.857705093732},{"x":5813,"y":736,"length":5859.408246572345},{"x":5843,"y":688,"length":5883.36578839018},{"x":5864,"y":637,"length":5898.496842416718},{"x":5876,"y":591,"length":5905.646196649441},{"x":5900,"y":566,"length":5927.086636788769},{"x":6801,"y":569,"length":6824.760948194449},{"x":7087,"y":570,"length":7109.88530146584},{"x":7148,"y":562,"length":7170.059135042054},{"x":7191,"y":547,"length":7211.774400242981},{"x":7229,"y":531,"length":7248.475839788665},{"x":7271,"y":502,"length":7288.3087887383035},{"x":7305,"y":469,"length":7320.040027212966},{"x":7335,"y":431,"length":7347.651733717378},{"x":7355,"y":395,"length":7365.599093081295},{"x":7369,"y":360,"length":7377.7883542427535},{"x":7380,"y":319,"length":7386.891159344369},{"x":7380,"y":272,"length":7385.010765056473},{"x":7398,"y":275,"length":7403.109414293429},{"x":7415,"y":284,"length":7420.436712215798},{"x":7954,"y":285,"length":7959.104283774651},{"x":8220,"y":410,"length":8230.218709123106},{"x":10805,"y":415,"length":10812.966752931408},{"x":10805,"y":1405,"length":10895.964849429352},{"x":10080,"y":1615,"length":10208.556460146558},{"x":7633,"y":1426,"length":7765.060527774397},{"x":3626,"y":2606,"length":4465.323280569952},{"x":-856,"y":1584,"length":1800.497708968273},{"x":-476,"y":-1156,"length":1250.1647891378161},{"x":8460,"y":-2000,"length":8693.192739149408},{"x":13225,"y":-1930,"length":13365.086045364616},{"x":12610,"y":1685,"length":12722.080215122054},{"x":11345,"y":1545,"length":11449.71833714699},{"x":11345,"y":-5,"length":11345.00110180691},{"x":10925,"y":-415,"length":10932.879309678672},{"x":8895,"y":-415,"length":8904.675738060314},{"x":8500,"y":15,"length":8500.013235283814},{"x":7980,"y":15,"length":7980.014097731908},{"x":7982,"y":-1008,"length":8045.395453301224},{"x":6502,"y":-1017,"length":6581.055614413238},{"x":6500,"y":-321,"length":6507.921403950727},{"x":6508,"y":-268,"length":6513.515794100756},{"x":6520,"y":-224,"length":6523.846718003114},{"x":6535,"y":-185,"length":6537.618067767496},{"x":6558,"y":-143,"length":6559.5589028531485},{"x":6584,"y":-113,"length":6584.96962787225},{"x":6614,"y":-82,"length":6614.508296162308},{"x":6646,"y":-59,"length":6646.2618816895865},{"x":6685,"y":-37,"length":6685.102392633938},{"x":6737,"y":-21,"length":6737.032729622144},{"x":6804,"y":-13,"length":6804.0124191538625},{"x":6935,"y":-5,"length":6935.001802451099},{"x":6937,"y":397,"length":6948.35073956403},{"x":6368,"y":388,"length":6379.809401541711},{"x":6365,"y":340,"length":6374.074442615179},{"x":6350,"y":270,"length":6355.737565381378},{"x":6295,"y":120,"length":6296.143661003933},{"x":6185,"y":-75,"length":6185.454712468599},{"x":6050,"y":-300,"length":6057.43344990269},{"x":5815,"y":-540,"length":5840.019263666859},{"x":5280,"y":-1515,"length":5493.0524301157},{"x":2095,"y":-1210,"length":2419.3232524819828},{"x":240,"y":-1000,"length":1028.3968105745953},{"x":440,"y":-365,"length":571.6861026822324},{"x":460,"y":-325,"length":563.2273075766125},{"x":465,"y":-310,"length":558.8604476969183},{"x":460,"y":-290,"length":543.7830449729009},{"x":445,"y":-275,"length":523.1156659860227},{"x":425,"y":-260,"length":498.2218381404011},{"x":410,"y":-235,"length":472.5727457228146},{"x":385,"y":-220,"length":443.42417615642023},{"x":350,"y":-205,"length":405.6168142471414},{"x":320,"y":-190,"length":372.1558813185679},{"x":280,"y":-170,"length":327.566787083184},{"x":260,"y":-145,"length":297.6995129320839},{"x":250,"y":-120,"length":277.308492477241},{"x":232,"y":-98,"length":251.8491612056709},{"x":220,"y":-70,"length":230.8679276123039},{"x":210,"y":-35,"length":212.8966885604377},{"x":210,"y":-5,"length":210.05951537600004}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-30,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":390},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":960,"y":-20,"length":960.2083107326243},{"x":1480,"y":410,"length":1535.7408635573906},{"x":2220,"y":655,"length":2314.611198452129},{"x":4555,"y":470,"length":4579.183879251847},{"x":5460,"y":795,"length":5517.574195241963},{"x":5735,"y":795,"length":5789.840239592108},{"x":7235,"y":500,"length":7252.256545379514},{"x":7685,"y":330,"length":7692.081967841997},{"x":10995,"y":375,"length":11001.3930936041},{"x":12390,"y":685,"length":12408.921185985508}],"lineId":-1,"physic":false,"directed":false,"width":12403.45,"shape":false,"height":879.25,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-100,"smoothing":true,"y":470,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":8,"y":-51,"length":51.62363799656123},{"x":19,"y":-97,"length":98.84331034521254},{"x":40,"y":-141,"length":146.5639792036229},{"x":63,"y":-181,"length":191.65072397463047},{"x":93,"y":-217,"length":236.08896628178115},{"x":130,"y":-252,"length":283.55599094358774},{"x":173,"y":-285,"length":333.3976604596979},{"x":224,"y":-310,"length":382.4604554721965},{"x":276,"y":-326,"length":427.1440038207256},{"x":331,"y":-333,"length":469.52103254273925},{"x":384,"y":-333,"length":508.2764995551142},{"x":446,"y":-326,"length":552.4418521437346},{"x":494,"y":-313,"length":584.8119355827137},{"x":541,"y":-292,"length":614.772315577076},{"x":580,"y":-263,"length":636.8429947797181},{"x":618,"y":-229,"length":659.0637298471219},{"x":643,"y":-201,"length":673.6839021380873},{"x":672,"y":-163,"length":691.4860808432807},{"x":694,"y":-129,"length":705.8873847859869},{"x":711,"y":-84,"length":715.944830276747},{"x":723,"y":-25,"length":723.4320977120105}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":371.5,"x":2862,"isStatic":true,"repeatTexture":true,"id":-1,"width":785.95,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":610,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":0,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":-15,"length":15},{"x":0,"y":-500,"length":500}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":20,"rotation":0,"stretchTexture":false,"height":498,"x":7363,"isStatic":false,"repeatTexture":true,"id":-1,"width":20,"textureOffset":0,"safeId":1,"graphic":true,"smoothing":true,"y":667,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":561,"y":0,"length":561},{"x":836,"y":126,"length":845.4418962885622},{"x":3419,"y":121,"length":3421.1404531237827}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":190,"x":7354,"isStatic":true,"repeatTexture":true,"id":-1,"width":3432,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":676,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":0,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":-15,"length":15},{"x":0,"y":-500,"length":500}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":20,"rotation":0,"stretchTexture":false,"height":498,"x":7433,"isStatic":false,"repeatTexture":true,"id":-1,"width":20,"textureOffset":0,"safeId":1,"graphic":true,"smoothing":true,"y":667,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-395,"length":395}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":408,"x":11312,"isStatic":true,"repeatTexture":true,"id":-1,"width":64,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":782,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-425,"y":-413,"length":592.6162333247378}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":458.9,"x":11322,"isStatic":true,"repeatTexture":true,"id":-1,"width":469.6,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":392,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-2027,"y":-3,"length":2027.0022200283847}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":67,"x":10902,"isStatic":true,"repeatTexture":true,"id":-1,"width":2040,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-18,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-391,"y":419,"length":573.0985953568548}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":462.7,"x":8872,"isStatic":true,"repeatTexture":true,"id":-1,"width":437.8,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-18,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":-527,"y":3,"length":527.0085388302547}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":67,"x":8482,"isStatic":true,"repeatTexture":true,"id":-1,"width":540,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":402,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":7,"y":-1024,"length":1024.0239255017434}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":1037,"x":7946,"isStatic":true,"repeatTexture":true,"id":-1,"width":71,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":400,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"}],[{"params":{"height":128.35,"x":6140,"y":894,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":7855,"y":620,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":7860,"y":580,"rotation":15,"width":110.7},"className":"Sign15"},{"params":{"height":128.35,"x":1000,"y":330,"rotation":12,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":1010,"y":300,"rotation":24,"width":110.7},"className":"Sign15"},{"params":{"height":132.25,"x":960,"y":280,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":331.2,"x":2360,"y":980,"rotation":0,"scaleX":1,"scaleY":1,"width":264},"className":"Dec14"},{"params":{"height":238.5,"x":4100,"y":630,"rotation":0,"scaleX":1,"scaleY":1,"width":118.55},"className":"Dec16"},{"params":{"height":132.25,"x":4030,"y":630,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":132.25,"x":6110,"y":840,"rotation":0,"scaleX":1,"scaleY":1,"width":87.85},"className":"Dec15"},{"params":{"height":240.35,"x":6670,"y":260,"rotation":0,"scaleX":1,"scaleY":1,"width":139.45},"className":"Dec13"}],[{"params":{"height":18,"x":10472,"y":762,"rotation":-15.000000000000002,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10532,"y":743,"rotation":-18.999999999999996,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10975,"y":413,"rotation":-57.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10639,"y":693,"rotation":-28.000000000000007,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10693,"y":663,"rotation":-30.999999999999982,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10799,"y":591,"rotation":-36.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10937,"y":462,"rotation":-47.999999999999986,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10848,"y":550,"rotation":-41.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10894,"y":507,"rotation":-44,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":11004,"y":359,"rotation":-67,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10585,"y":721,"rotation":-27,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10746,"y":629,"rotation":-35.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":11021,"y":299,"rotation":-82,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9958,"y":17,"rotation":-164.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10526,"y":334,"rotation":72.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9734,"y":58,"rotation":143,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10065,"y":76,"rotation":-137.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9710,"y":433,"rotation":39.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9659,"y":153,"rotation":115,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9646,"y":334,"rotation":72.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9923,"y":631,"rotation":31.000000000000057,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10104,"y":123,"rotation":-122.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9689,"y":103,"rotation":128,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9671,"y":389,"rotation":58.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9635,"y":274,"rotation":87.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10124,"y":359,"rotation":-67,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10095,"y":413,"rotation":-57.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10015,"y":40,"rotation":-151.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10515,"y":274,"rotation":87.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9640,"y":211,"rotation":100.00000000000009,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10014,"y":507,"rotation":-44,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10945,"y":76,"rotation":-137.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10134,"y":745,"rotation":20.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10589,"y":435,"rotation":42.00000000000004,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10142,"y":240,"rotation":-95,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9785,"y":28,"rotation":155.99999999999997,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10984,"y":123,"rotation":-122.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9866,"y":629,"rotation":-35.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10130,"y":180,"rotation":-107.99999999999996,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10350,"y":779,"rotation":-2,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10057,"y":462,"rotation":-47.999999999999986,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10141,"y":299,"rotation":-82,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9968,"y":550,"rotation":-41.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9813,"y":663,"rotation":-30.999999999999982,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10895,"y":40,"rotation":-151.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10190,"y":763,"rotation":14.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10665,"y":28,"rotation":155.99999999999997,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10297,"y":778,"rotation":3,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10413,"y":774,"rotation":-8,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9759,"y":693,"rotation":-28.000000000000007,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9652,"y":743,"rotation":-18.999999999999996,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10243,"y":774,"rotation":8.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9705,"y":721,"rotation":-27,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9919,"y":591,"rotation":-36.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9533,"y":774,"rotation":-8,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10718,"y":12,"rotation":169.00000000000003,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10569,"y":103,"rotation":128,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10551,"y":389,"rotation":58.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10520,"y":211,"rotation":100.00000000000009,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9592,"y":762,"rotation":-15.000000000000002,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10076,"y":720,"rotation":26.000000000000004,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9838,"y":12,"rotation":169.00000000000003,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9898,"y":8,"rotation":-177.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10021,"y":690,"rotation":31.000000000000057,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":11022,"y":240,"rotation":-95,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10838,"y":17,"rotation":-164.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10778,"y":8,"rotation":-177.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9968,"y":659,"rotation":31.000000000000004,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10614,"y":58,"rotation":143,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":10539,"y":153,"rotation":115,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":11010,"y":180,"rotation":-107.99999999999996,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8200,"y":780,"rotation":0,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8265,"y":780,"rotation":0,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8330,"y":780,"rotation":0,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8525,"y":780,"rotation":0,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8460,"y":780,"rotation":0,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8395,"y":780,"rotation":0,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8653,"y":774,"rotation":-8,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8590,"y":779,"rotation":-2,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8712,"y":762,"rotation":-15.000000000000002,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8772,"y":743,"rotation":-18.999999999999996,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8825,"y":721,"rotation":-27,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8879,"y":693,"rotation":-28.000000000000007,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8933,"y":663,"rotation":-30.999999999999982,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8986,"y":629,"rotation":-35.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9039,"y":591,"rotation":-36.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9088,"y":550,"rotation":-41.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9134,"y":507,"rotation":-44,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9177,"y":462,"rotation":-47.999999999999986,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9215,"y":413,"rotation":-57.99999999999999,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9244,"y":359,"rotation":-67,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9261,"y":299,"rotation":-82,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9262,"y":240,"rotation":-95,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9250,"y":180,"rotation":-107.99999999999996,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9417,"y":778,"rotation":3,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9043,"y":631,"rotation":31.000000000000057,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9224,"y":123,"rotation":-122.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9185,"y":76,"rotation":-137.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9135,"y":40,"rotation":-151.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9078,"y":17,"rotation":-164.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9018,"y":8,"rotation":-177.99999999999994,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8958,"y":12,"rotation":169.00000000000003,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8905,"y":28,"rotation":155.99999999999997,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8854,"y":58,"rotation":143,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8809,"y":103,"rotation":128,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8779,"y":153,"rotation":115,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8760,"y":211,"rotation":100.00000000000009,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8755,"y":274,"rotation":87.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8766,"y":334,"rotation":72.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8791,"y":389,"rotation":58.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":8830,"y":433,"rotation":39.00000000000006,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9470,"y":779,"rotation":-2,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9088,"y":659,"rotation":31.000000000000004,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9196,"y":720,"rotation":26.000000000000004,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9141,"y":690,"rotation":31.000000000000057,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9254,"y":745,"rotation":20.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9310,"y":763,"rotation":14.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"height":18,"x":9363,"y":774,"rotation":8.00000000000001,"safeId":1,"ttl":0.3,"width":66},"className":"GlassCrashed1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":11,"count":1,"radius":1,"y":645,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":12,"count":1,"radius":1,"y":595,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":13,"count":1,"radius":1,"y":545,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":14,"count":1,"radius":1,"y":495,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":15,"count":1,"radius":1,"y":445,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":17,"count":1,"radius":1,"y":345,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":18,"count":1,"radius":1,"y":295,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":16,"count":1,"radius":1,"y":395,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":1,"rotation":0,"height":53.2,"x":7397,"id":19,"count":1,"radius":1,"y":245,"width":53.2},"className":"Tnt1"},{"params":{"stones":false,"safeId":1,"physic":true,"impulse":700,"rotation":0,"height":53.2,"x":7397,"id":20,"count":40,"radius":50,"y":195,"width":53.2},"className":"Tnt1"}],null,[{"params":{"height":32,"x":340,"y":300,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1808,"x":6140,"y":824,"width":128,"id":1,"rotation":0},"className":"SafePointE"}],[{"params":{"height":64,"hint":-1,"id":11,"rotation":0,"safeId":1,"x":7179,"off":false,"id_off":-1,"y":643,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":1,"rotation":0,"rate":180,"height":17,"x":1633,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":841,"width":17},"className":"MotorJointE"},{"params":{"safeId":1,"rotation":0,"rate":100,"height":17,"x":1213,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":591,"width":17},"className":"MotorJointE"},{"params":{"height":936,"hint":-1,"id":1,"rotation":0,"safeId":-1,"x":830,"off":false,"id_off":-1,"y":280,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":-1,"rotation":0,"rate":90,"height":17,"x":3230,"id":2,"useWeld":false,"snd":false,"graphic":0,"time":0,"y":638,"width":17},"className":"MotorJointE"},{"params":{"height":1169,"hint":-1,"id":2,"rotation":0,"safeId":-1,"x":2590,"off":false,"id_off":-1,"y":830,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":18,"rotation":0,"safeId":1,"x":7215,"off":false,"id_off":-1,"y":293,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":16,"rotation":0,"safeId":1,"x":7215,"off":false,"id_off":-1,"y":393,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":7363,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":645,"width":17},"className":"PivotJointE"},{"params":{"height":64,"hint":-1,"id":20,"rotation":0,"safeId":1,"x":7177,"off":false,"id_off":-1,"y":221,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":7433,"id":-1,"rotation":0,"safeId":1,"graphic":0,"y":646,"width":17},"className":"PivotJointE"},{"params":{"height":64,"hint":-1,"id":19,"rotation":0,"safeId":1,"x":7177,"off":false,"id_off":-1,"y":253,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":13,"rotation":0,"safeId":1,"x":7215,"off":false,"id_off":-1,"y":543,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":12,"rotation":0,"safeId":1,"x":7215,"off":false,"id_off":-1,"y":593,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":14,"rotation":0,"safeId":1,"x":7215,"off":false,"id_off":-1,"y":493,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":17,"rotation":0,"safeId":1,"x":7215,"off":false,"id_off":-1,"y":343,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":64,"hint":-1,"id":15,"rotation":0,"safeId":1,"x":7215,"off":false,"id_off":-1,"y":443,"width":349,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":7433,"id":19,"rotation":0,"safeId":1,"graphic":0,"y":246,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7363,"id":19,"rotation":0,"safeId":1,"graphic":0,"y":245,"width":17},"className":"PivotJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map6.json b/assets/levels/map6.json new file mode 100644 index 0000000..5d8b5bf --- /dev/null +++ b/assets/levels/map6.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"31,37,44","countdown":0,"gravityY":500},"layers":[[{"params":{"height":333,"x":3390,"directed":true,"isPillar":true,"y":390,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":-5,"y":0,"length":5},{"x":12,"y":-72,"length":72.99315036357864},{"x":36,"y":-130,"length":134.892549831338},{"x":71,"y":-185,"length":198.15650380444242},{"x":116,"y":-230,"length":257.59658382827985},{"x":173,"y":-270,"length":320.6696119060863},{"x":231,"y":-300,"length":378.6304266695956},{"x":296,"y":-314,"length":431.522884677047},{"x":357,"y":-320,"length":479.4256981013846},{"x":425,"y":-314,"length":528.413663714329},{"x":488,"y":-298,"length":571.7936690800275},{"x":541,"y":-275,"length":606.8821961468304},{"x":591,"y":-238,"length":637.1224372128171},{"x":635,"y":-199,"length":665.4517262732136},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933},{"x":708,"y":-65,"length":710.9774961276904},{"x":725,"y":0,"length":725}],"rotation":0,"width":743},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":386,"x":2940,"directed":true,"isPillar":true,"y":390,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":6,"y":-67,"length":67.26812023536856},{"x":29,"y":-135,"length":138.07968713753664},{"x":60,"y":-196,"length":204.9780476051033},{"x":105,"y":-249,"length":270.23323259732507},{"x":166,"y":-303,"length":345.4924022319449},{"x":238,"y":-344,"length":418.3061080118243},{"x":316,"y":-367,"length":484.298461694852},{"x":383,"y":-373,"length":534.6194908530739},{"x":455,"y":-370,"length":586.4511914899654},{"x":519,"y":-355,"length":628.7972646250936},{"x":580,"y":-330,"length":667.3080248281149},{"x":633,"y":-296,"length":698.7882368786699},{"x":688,"y":-248,"length":731.3330294742608},{"x":730,"y":-195,"length":755.5957914123132},{"x":757,"y":-140,"length":769.8369957335124},{"x":777,"y":-73,"length":780.4216808879671},{"x":785,"y":0,"length":785}],"rotation":0,"width":798},"className":"frg.game.editor.objects::BonesPather"},{"params":{"wireframe":false,"vertices":[{"x":0,"y":0,"length":0},{"x":1770,"y":0,"length":1770},{"x":5005,"y":5,"length":5005.002497501874},{"x":10590,"y":25,"length":10590.029508929614}],"lineId":0,"physic":true,"directed":true,"width":10603,"shape":true,"height":89,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":100,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":-200,"smoothing":true,"y":390,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":true},"className":"frg.game.editor.objects::GroundPather"},{"params":{"height":347,"x":1780,"directed":true,"isPillar":true,"y":150,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":-5,"y":10,"length":11.180339887498949},{"x":17,"y":-31,"length":35.35533905932738},{"x":44,"y":-60,"length":74.4043009509531},{"x":78,"y":-81,"length":112.44998888394787},{"x":123,"y":-92,"length":153.60013020827813},{"x":165,"y":-91,"length":188.43035848822237},{"x":208,"y":-77,"length":221.79495034828903},{"x":245,"y":-52,"length":250.45758123881976},{"x":271,"y":-20,"length":271.7370052090808},{"x":293,"y":24,"length":293.981291921782},{"x":298,"y":64,"length":304.7950130825634},{"x":295,"y":103,"length":312.464397971993},{"x":289,"y":138,"length":320.2577087284551},{"x":291,"y":176,"length":340.08381319904066},{"x":306,"y":209,"length":370.563085047607},{"x":347,"y":237,"length":420.2118513321584},{"x":394,"y":242,"length":462.3851208678757},{"x":440,"y":223,"length":493.28389391911026},{"x":461,"y":198,"length":501.72203459684727},{"x":469,"y":165,"length":497.17803652212956},{"x":470,"y":126,"length":486.59634195090285},{"x":446,"y":85,"length":454.0275322048212},{"x":406,"y":60,"length":410.40955154576994},{"x":371,"y":56,"length":375.2026119312071},{"x":334,"y":69,"length":341.0527818388233},{"x":308,"y":93,"length":321.7343624793597}],"rotation":0,"width":488},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":294,"x":1290,"directed":true,"isPillar":false,"y":390,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":-5,"y":5,"length":7.0710678118654755},{"x":46,"y":-9,"length":46.87216658103186},{"x":93,"y":-30,"length":97.71898484941399},{"x":133,"y":-61,"length":146.32156368765337},{"x":163,"y":-102,"length":192.28364465029262},{"x":189,"y":-151,"length":241.91320757660174},{"x":215,"y":-196,"length":290.93126335957777},{"x":242,"y":-233,"length":335.93600581063055},{"x":283,"y":-262,"length":385.6591759572174},{"x":325,"y":-273,"length":424.4455206501772},{"x":376,"y":-276,"length":466.42469917447556},{"x":419,"y":-266,"length":496.303334665404},{"x":464,"y":-244,"length":524.2442178984905},{"x":503,"y":-210,"length":545.0770587724271},{"x":524,"y":-180,"length":554.0541489782385},{"x":538,"y":-142,"length":556.4242985348501},{"x":545,"y":-106,"length":555.2125719037709},{"x":540,"y":-52,"length":542.4979262633176},{"x":525,"y":-5,"length":525.0238089839355}],"rotation":0,"width":563},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":942,"x":1690,"directed":false,"isPillar":false,"y":115,"thick":16,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-45,"length":51.478150704935004},{"x":65,"y":-88,"length":109.40292500660117},{"x":110,"y":-120,"length":162.78820596099706},{"x":159,"y":-141,"length":212.51352898109803},{"x":215,"y":-149,"length":261.5836386320826},{"x":265,"y":-148,"length":303.52759347380595},{"x":312,"y":-136,"length":340.3527581789224},{"x":354,"y":-117,"length":372.83374310810444},{"x":394,"y":-88,"length":403.7078151336682},{"x":429,"y":-52,"length":432.1400236034612},{"x":456,"y":-15,"length":456.2466438232724},{"x":480,"y":32,"length":481.06548410793306},{"x":506,"y":75,"length":511.5281028447997},{"x":540,"y":115,"length":552.1095905705678},{"x":584,"y":156,"length":604.4766331298506},{"x":637,"y":193,"length":665.5959735455135},{"x":687,"y":225,"length":722.9066329755178},{"x":736,"y":248,"length":776.659513557904},{"x":820,"y":270,"length":863.3075929238663},{"x":895,"y":279,"length":937.4785330875583},{"x":977,"y":276,"length":1015.2364256664553},{"x":1036,"y":264,"length":1069.1080394422258},{"x":1097,"y":244,"length":1123.8082576667605},{"x":1160,"y":212,"length":1179.2132970756393},{"x":1229,"y":160,"length":1239.371211542369},{"x":1292,"y":103,"length":1296.0991474420466},{"x":1344,"y":33,"length":1344.4050728854008},{"x":1381,"y":-40,"length":1381.579168922288},{"x":1402,"y":-104,"length":1405.8520548051988},{"x":1420,"y":-163,"length":1429.3246657075501},{"x":1445,"y":-202,"length":1459.0507187894464},{"x":1479,"y":-235,"length":1497.553337948268},{"x":1519,"y":-257,"length":1540.5875502547722},{"x":1568,"y":-270,"length":1591.07636523204},{"x":1611,"y":-269,"length":1633.3040133422803},{"x":1654,"y":-260,"length":1674.3106043981206},{"x":1696,"y":-240,"length":1712.896961291017},{"x":1727,"y":-211,"length":1739.8419468445977},{"x":1751,"y":-174,"length":1759.6241075866176},{"x":1770,"y":-133,"length":1774.9898591259614},{"x":1781,"y":-101,"length":1783.8615417122485},{"x":1805,"y":-75,"length":1806.5574997768547},{"x":1845,"y":-55,"length":1845.819601152832},{"x":1935,"y":-55,"length":1935.7814959338773},{"x":2030,"y":-55,"length":2030.7449372090036},{"x":2120,"y":-55,"length":2120.7133233890904},{"x":2210,"y":-55,"length":2210.684283202828},{"x":2290,"y":-55,"length":2290.6603851291443},{"x":2385,"y":-55,"length":2385.634087616959},{"x":2495,"y":-55,"length":2495.606138796745},{"x":2524,"y":-81,"length":2525.299388191428},{"x":2559,"y":-93,"length":2560.6893603090557},{"x":2593,"y":-92,"length":2594.631573075453},{"x":2622,"y":-75,"length":2623.07243514166},{"x":2641,"y":-48,"length":2641.436162393481},{"x":2660,"y":5,"length":2660.0046992439693},{"x":2695,"y":65,"length":2695.7837450359402},{"x":2740,"y":115,"length":2742.412259307488},{"x":2795,"y":170,"length":2800.16517369958},{"x":2860,"y":215,"length":2868.069908492469},{"x":2930,"y":250,"length":2940.6461874900897},{"x":3016,"y":269,"length":3027.972423916704},{"x":3087,"y":277,"length":3099.402845710767},{"x":3169,"y":272,"length":3180.651662788618},{"x":3236,"y":257,"length":3246.189304399853},{"x":3310,"y":230,"length":3317.981313991988},{"x":3384,"y":187,"length":3389.162875991651},{"x":3453,"y":125,"length":3455.2617845830437},{"x":3513,"y":38,"length":3513.20551633405},{"x":3552,"y":-39,"length":3552.2140982772985},{"x":3578,"y":-116,"length":3579.8798862531685},{"x":3583,"y":-199,"length":3588.521979868592},{"x":3576,"y":-288,"length":3587.5785705681765},{"x":3549,"y":-384,"length":3569.713854078503},{"x":3555,"y":-451,"length":3583.4935468059657},{"x":3582,"y":-513,"length":3618.5484658907085},{"x":3623,"y":-571,"length":3667.7200002181194},{"x":3678,"y":-615,"length":3729.0627508799043},{"x":3749,"y":-643,"length":3803.741579024527},{"x":3830,"y":-650,"length":3884.7651151646223},{"x":3940,"y":-650,"length":3993.256816184003},{"x":4060,"y":-650,"length":4111.702810272162},{"x":4180,"y":-650,"length":4230.236400013598},{"x":4285,"y":-650,"length":4334.019496956607},{"x":4405,"y":-650,"length":4452.698619938251},{"x":4535,"y":-650,"length":4581.345326429781},{"x":4635,"y":-650,"length":4680.355221561714},{"x":4735,"y":-650,"length":4779.406343888329},{"x":4820,"y":-650,"length":4863.630331347151},{"x":4878,"y":-643,"length":4920.196439167851},{"x":4935,"y":-611,"length":4972.6799615499085},{"x":4980,"y":-559,"length":5011.27538656578}],"rotation":0,"width":4993},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":333,"x":3750,"directed":true,"isPillar":true,"y":390,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":-5,"y":0,"length":5},{"x":12,"y":-72,"length":72.99315036357864},{"x":36,"y":-130,"length":134.892549831338},{"x":71,"y":-185,"length":198.15650380444242},{"x":116,"y":-230,"length":257.59658382827985},{"x":173,"y":-270,"length":320.6696119060863},{"x":231,"y":-300,"length":378.6304266695956},{"x":296,"y":-314,"length":431.522884677047},{"x":357,"y":-320,"length":479.4256981013846},{"x":425,"y":-314,"length":528.413663714329},{"x":488,"y":-298,"length":571.7936690800275},{"x":541,"y":-275,"length":606.8821961468304},{"x":591,"y":-238,"length":637.1224372128171},{"x":635,"y":-199,"length":665.4517262732136},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933},{"x":708,"y":-65,"length":710.9774961276904},{"x":725,"y":0,"length":725}],"rotation":0,"width":743},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":0,"vertices":[{"x":135,"y":10,"length":135.36986370680884},{"x":775,"y":5,"length":775.0161288644256},{"x":650,"y":45,"length":651.5558303015944},{"x":310,"y":50,"length":314.00636936215164}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":-12,"plr":false,"line":true,"x":3790,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":68},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":844,"x":4620,"directed":false,"isPillar":false,"y":80,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-7,"y":-129,"length":129.18978287774928},{"x":8,"y":-162,"length":162.19741058352318},{"x":36,"y":-200,"length":203.2141727340886},{"x":80,"y":-235,"length":248.2438317461282},{"x":132,"y":-254,"length":286.2516375499012},{"x":189,"y":-256,"length":318.20905078265764},{"x":240,"y":-243,"length":341.5391632009424},{"x":283,"y":-219,"length":357.8407467016578},{"x":320,"y":-179,"length":366.6619696668854},{"x":342,"y":-138,"length":368.79262465510345},{"x":355,"y":-89,"length":365.9863385428478},{"x":352,"y":-46,"length":354.9929576766277},{"x":340,"y":2,"length":340.00588230205665},{"x":319,"y":40,"length":321.49805598168086},{"x":287,"y":74,"length":296.3865718955567},{"x":252,"y":97,"length":270.0240730009086},{"x":205,"y":112,"length":233.60008561642266},{"x":146,"y":115,"length":185.85209172887994},{"x":91,"y":99,"length":134.46932735757994},{"x":52,"y":76,"length":92.0869154657707},{"x":20,"y":37,"length":42.05948168962618},{"x":0,"y":-7,"length":7},{"x":-13,"y":-60,"length":61.39218191268331},{"x":-28,"y":-121,"length":124.19742348374221},{"x":-62,"y":-183,"length":193.2174940319846},{"x":-106,"y":-238,"length":260.5379051117131},{"x":-150,"y":-279,"length":316.76647549890754},{"x":-204,"y":-312,"length":372.7733896082176},{"x":-269,"y":-339,"length":432.7609039643022},{"x":-326,"y":-348,"length":476.84378993544624},{"x":-402,"y":-348,"length":531.7029245734877},{"x":-460,"y":-347,"length":576.202221446603},{"x":-511,"y":-363,"length":626.8093809125705},{"x":-556,"y":-393,"length":680.870766004827},{"x":-591,"y":-435,"length":733.8296805117657},{"x":-611,"y":-482,"length":778.2319705589073},{"x":-615,"y":-536,"length":815.7947045672704},{"x":-608,"y":-580,"length":840.2761450856498},{"x":-590,"y":-624,"length":858.7642284119664},{"x":-562,"y":-663,"length":869.1449821519998},{"x":-519,"y":-694,"length":866.6008308327428},{"x":-473,"y":-713,"length":855.6272552928641},{"x":-418,"y":-716,"length":829.0838317082296},{"x":-369,"y":-706,"length":796.6159677033846},{"x":-319,"y":-683,"length":753.8235867893761},{"x":-283,"y":-645,"length":704.3536043778012},{"x":-256,"y":-601,"length":653.2511002669647},{"x":-245,"y":-558,"length":609.4169344545653},{"x":-243,"y":-504,"length":559.5221175253039},{"x":-238,"y":-454,"length":512.6012095186667},{"x":-223,"y":-410,"length":466.7215443923711},{"x":-198,"y":-366,"length":416.1249812255929},{"x":-166,"y":-326,"length":365.83056187256966},{"x":-120,"y":-293,"length":316.62122480970856},{"x":-68,"y":-269,"length":277.46170906991836},{"x":-6,"y":-257,"length":257.07002936943076},{"x":58,"y":-261,"length":267.36678926149375},{"x":109,"y":-279,"length":299.5363083167047},{"x":158,"y":-307,"length":345.2723562638631},{"x":200,"y":-345,"length":398.7793876318083},{"x":238,"y":-386,"length":453.4754679141971},{"x":279,"y":-411,"length":496.7514469027745},{"x":323,"y":-409,"length":521.1621628629615},{"x":362,"y":-391,"length":532.8461316365166},{"x":386,"y":-347,"length":519.042387479096},{"x":391,"y":-307,"length":497.1217154782116},{"x":371,"y":-265,"length":455.9232391532592},{"x":335,"y":-239,"length":411.5167068297471},{"x":281,"y":-235,"length":366.31407289373965}],"rotation":0,"width":1019},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":436,"x":5140,"directed":true,"isPillar":false,"y":350,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":3,"y":45,"length":45.09988913511872},{"x":1,"y":-11,"length":11.045361017187261},{"x":6,"y":-67,"length":67.26812023536856},{"x":29,"y":-135,"length":138.07968713753664},{"x":60,"y":-196,"length":204.9780476051033},{"x":105,"y":-249,"length":270.23323259732507},{"x":166,"y":-303,"length":345.4924022319449},{"x":238,"y":-344,"length":418.3061080118243},{"x":316,"y":-367,"length":484.298461694852},{"x":383,"y":-373,"length":534.6194908530739},{"x":455,"y":-370,"length":586.4511914899654},{"x":519,"y":-355,"length":628.7972646250936},{"x":580,"y":-330,"length":667.3080248281149},{"x":633,"y":-296,"length":698.7882368786699},{"x":688,"y":-248,"length":731.3330294742608},{"x":730,"y":-195,"length":755.5957914123132},{"x":757,"y":-140,"length":769.8369957335124},{"x":777,"y":-73,"length":780.4216808879671},{"x":781,"y":-12,"length":781.0921840602426},{"x":783,"y":50,"length":784.5947998808048}],"rotation":0,"width":795},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":480,"x":6259,"directed":false,"isPillar":false,"y":-496,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-36,"y":-27,"length":45},{"x":0,"y":2,"length":2},{"x":37,"y":42,"length":55.97320787662612},{"x":72,"y":87,"length":112.92918134831227},{"x":102,"y":159,"length":188.904737897174},{"x":120,"y":245,"length":272.8094573140748},{"x":141,"y":291,"length":323.3604799600594},{"x":168,"y":334,"length":373.87163572541846},{"x":204,"y":377,"length":428.65487282894617},{"x":243,"y":404,"length":471.4498912928075},{"x":292,"y":426,"length":516.468779308101},{"x":341,"y":437,"length":554.3013620766235},{"x":390,"y":440,"length":587.962583843564},{"x":445,"y":435,"length":622.294142668883}],"rotation":0,"width":494},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":555,"x":6899,"directed":false,"isPillar":false,"y":-336,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-197,"y":91,"length":217.00230413523263},{"x":-133,"y":99,"length":165.8010856418015},{"x":-49,"y":85,"length":98.11218069128827},{"x":6,"y":61,"length":61.29437168288782},{"x":53,"y":28,"length":59.941638282582836},{"x":97,"y":-24,"length":99.92497185388645},{"x":117,"y":-72,"length":137.37903770226373},{"x":134,"y":-133,"length":188.79883474216678},{"x":134,"y":-201,"length":241.5719354560873},{"x":126,"y":-253,"length":282.63934616397626},{"x":99,"y":-310,"length":325.4243383645421},{"x":69,"y":-352,"length":358.69903819218695},{"x":24,"y":-392,"length":392.7340066762745},{"x":-40,"y":-428,"length":429.8650951170611},{"x":-95,"y":-443,"length":453.0717382490327}],"rotation":0,"width":344},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":467,"x":6919,"directed":false,"isPillar":false,"y":34,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-197,"y":91,"length":217.00230413523263},{"x":-133,"y":99,"length":165.8010856418015},{"x":-49,"y":85,"length":98.11218069128827},{"x":6,"y":61,"length":61.29437168288782},{"x":53,"y":28,"length":59.941638282582836},{"x":97,"y":-24,"length":99.92497185388645},{"x":117,"y":-72,"length":137.37903770226373},{"x":130,"y":-137,"length":188.86238376129853},{"x":130,"y":-199,"length":237.69938998659632},{"x":115,"y":-264,"length":287.9600666759195},{"x":87,"y":-318,"length":329.6862144524699},{"x":53,"y":-355,"length":358.9345344209721}],"rotation":0,"width":340},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":563,"x":5850,"directed":false,"isPillar":false,"y":125,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-45,"length":51.478150704935004},{"x":65,"y":-88,"length":109.40292500660117},{"x":110,"y":-120,"length":162.78820596099706},{"x":159,"y":-141,"length":212.51352898109803},{"x":215,"y":-149,"length":261.5836386320826},{"x":265,"y":-148,"length":303.52759347380595},{"x":312,"y":-136,"length":340.3527581789224},{"x":354,"y":-117,"length":372.83374310810444},{"x":394,"y":-88,"length":403.7078151336682},{"x":429,"y":-52,"length":432.1400236034612},{"x":456,"y":-15,"length":456.2466438232724},{"x":480,"y":32,"length":481.06548410793306},{"x":506,"y":75,"length":511.5281028447997},{"x":540,"y":115,"length":552.1095905705678},{"x":584,"y":156,"length":604.4766331298506},{"x":637,"y":193,"length":665.5959735455135},{"x":687,"y":225,"length":722.9066329755178},{"x":736,"y":248,"length":776.659513557904},{"x":820,"y":270,"length":863.3075929238663},{"x":895,"y":279,"length":937.4785330875583},{"x":977,"y":276,"length":1015.2364256664553},{"x":1036,"y":264,"length":1069.1080394422258},{"x":1097,"y":244,"length":1123.8082576667605},{"x":1160,"y":212,"length":1179.2132970756393},{"x":1229,"y":160,"length":1239.371211542369},{"x":1292,"y":103,"length":1296.0991474420466},{"x":1344,"y":33,"length":1344.4050728854008},{"x":1381,"y":-40,"length":1381.579168922288},{"x":1402,"y":-104,"length":1405.8520548051988},{"x":1420,"y":-163,"length":1429.3246657075501},{"x":1445,"y":-202,"length":1459.0507187894464},{"x":1479,"y":-235,"length":1497.553337948268},{"x":1519,"y":-257,"length":1540.5875502547722},{"x":1568,"y":-270,"length":1591.07636523204},{"x":1642,"y":-271,"length":1664.2130272293869}],"rotation":0,"width":1655},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":568,"x":8265,"directed":true,"isPillar":false,"y":-146,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":65,"y":0,"length":65},{"x":118,"y":15,"length":118.94956914591998},{"x":163,"y":35,"length":166.715326230074},{"x":197,"y":76,"length":211.15160430363773},{"x":224,"y":123,"length":255.54842985234717},{"x":244,"y":194,"length":311.7242371070944},{"x":263,"y":247,"length":360.8018846957427},{"x":292,"y":299,"length":417.92941987852447},{"x":323,"y":345,"length":472.60342783352723},{"x":359,"y":390,"length":530.0764095863916},{"x":409,"y":433,"length":595.6257214056492},{"x":454,"y":466,"length":650.5935751296657},{"x":500,"y":496,"length":704.28403361144},{"x":554,"y":520,"length":759.8131349220017},{"x":604,"y":534,"length":806.2084097800023},{"x":659,"y":548,"length":857.079342884893},{"x":740,"y":555,"length":925}],"rotation":0,"width":753},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":361,"x":7900,"y":220,"rotation":0,"width":1177},"className":"FinishZone"},{"params":{"layer":-1,"vertices":[{"x":0,"y":-570,"length":570},{"x":100,"y":-570,"length":578.7054518492115},{"x":100,"y":100,"length":141.4213562373095},{"x":0,"y":100,"length":100}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-50,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":false,"y":300},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"height":72.35,"x":5530,"y":370,"rotation":0,"width":71.6},"className":"Dec28"},{"params":{"height":79.6,"x":1950,"y":350,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":17.05,"x":7537,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7607,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7677,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7747,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7817,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":7937,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8007,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8077,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8147,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":17.05,"x":8217,"id":-1,"active":true,"safeId":2,"y":-145,"rotation":0,"width":85.95},"className":"PlankBone"},{"params":{"height":95.5,"x":3200,"y":340,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":164,"x":7871,"partY":13,"y":240,"count":32,"rotation":0,"width":1496},"className":"FenceHallowen"},{"params":{"height":128.35,"x":3660,"y":-8,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":6190,"y":-604,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":79.6,"x":5470,"y":360,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":5591,"y":352,"rotation":0,"scaleX":-1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":95.5,"x":550,"y":343,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":580,"y":325,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":580,"y":290,"rotation":18,"width":110.7},"className":"Sign15"},{"params":{"height":72.35,"x":610,"y":360,"rotation":0,"width":71.6},"className":"Dec28"},{"params":{"height":72.35,"x":150,"y":360,"rotation":30,"width":71.6},"className":"Dec28"},{"params":{"height":72.35,"x":90,"y":360,"rotation":0,"width":95},"className":"Dec26"},{"params":{"height":72.35,"x":210,"y":360,"rotation":0,"width":95},"className":"Dec26"},{"params":{"height":79.6,"x":6160,"y":-580,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":85.5,"x":6980,"y":370,"rotation":0,"width":92.7},"className":"Dec27"},{"params":{"height":72.35,"x":6590,"y":390,"rotation":0,"width":95},"className":"Dec26"},{"params":{"height":72.35,"x":7050,"y":380,"rotation":0,"width":71.6},"className":"Dec28"},{"params":{"height":72.35,"x":5660,"y":380,"rotation":15,"width":71.6},"className":"Dec28"},{"params":{"height":72.35,"x":5380,"y":370,"rotation":12,"width":95},"className":"Dec26"},{"params":{"height":72.35,"x":4990,"y":370,"rotation":0,"width":71.6},"className":"Dec28"},{"params":{"height":85.5,"x":4620,"y":370,"rotation":0,"width":92.7},"className":"Dec27"},{"params":{"height":79.6,"x":3628,"y":18,"rotation":0,"scaleX":1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":128.35,"x":3898,"y":-9,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":90.05,"x":3900,"y":-70,"rotation":0,"width":102},"className":"Sign21"}],[{"params":{"stones":false,"safeId":2,"physic":true,"impulse":3000,"rotation":45.00000000000006,"height":53.2,"x":7880,"id":5,"count":12,"radius":64,"y":-146,"width":53.2},"className":"Tnt1"}],null,[{"params":{"height":32,"x":310,"y":310,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1116,"x":3660,"y":-80,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":1200,"x":6190,"y":-680,"width":128,"id":2,"rotation":0},"className":"SafePointE"}],[{"params":{"height":994,"hint":-1,"id":5,"rotation":0,"safeId":2,"x":7730,"off":false,"id_off":-1,"y":-450,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":994,"hint":-1,"id":4,"rotation":0,"safeId":2,"x":7727,"off":false,"id_off":-1,"y":-451,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"height":17,"x":7502,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7572,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7642,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7712,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7782,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7972,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8042,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8112,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8182,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":8252,"id":-1,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7902,"id":4,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":7852,"id":4,"rotation":0,"safeId":2,"graphic":0,"y":-146,"width":17},"className":"PivotJointE"}]]} \ No newline at end of file diff --git a/assets/levels/map7.json b/assets/levels/map7.json new file mode 100644 index 0000000..a7613df --- /dev/null +++ b/assets/levels/map7.json @@ -0,0 +1 @@ +{"layers":[[{"className":"frg.game.editor.objects::LandscapeShaper","params":{"isWheel":false,"x":8267,"vertices":[{"y":0,"x":0},{"y":-17,"x":28},{"y":-32,"x":59},{"y":-46,"x":92},{"y":-56,"x":136},{"y":-62,"x":188},{"y":-60,"x":238},{"y":-49,"x":288},{"y":-32,"x":329},{"y":-4,"x":377},{"y":26,"x":415},{"y":58,"x":446},{"y":102,"x":473},{"y":146,"x":494},{"y":191,"x":507},{"y":241,"x":514},{"y":302,"x":513},{"y":355,"x":500},{"y":406,"x":478},{"y":451,"x":451},{"y":485,"x":422},{"y":512,"x":391},{"y":540,"x":348},{"y":561,"x":309},{"y":577,"x":260},{"y":581,"x":212},{"y":580,"x":160},{"y":573,"x":112},{"y":556,"x":65},{"y":536,"x":27},{"y":511,"x":-5},{"y":480,"x":-38},{"y":444,"x":-70},{"y":404,"x":-94},{"y":357,"x":-115},{"y":316,"x":-125},{"y":250,"x":-128},{"y":204,"x":-124},{"y":155,"x":-111},{"y":111,"x":-96},{"y":74,"x":-70},{"y":37,"x":-38}],"y":-60,"isStatic":false,"rotation":0,"graphic":true,"plr":false,"density":1,"layer":6,"rem":true,"line":true,"ignore":false,"id":-1,"physic":true,"safeId":3}},{"className":"FinishZone","params":{"rotation":0,"x":8290,"height":248,"y":-640,"width":1148}},{"className":"frg.game.editor.objects::WaterShaper","params":{"bg":true,"x":5280,"id":-1,"vertices":[{"y":0,"x":0},{"y":0,"x":1590},{"y":280,"x":1585},{"y":280,"x":-5}],"y":-1050,"rotation":0,"density":1.5,"sf":true,"viscosity":1.5}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":260,"vertices":[{"y":0,"x":-400},{"y":-1,"x":664},{"y":7,"x":836},{"y":31,"x":976},{"y":94,"x":1150},{"y":318,"x":1628},{"y":357,"x":1719},{"y":371,"x":1791},{"y":376,"x":1876},{"y":367,"x":1962},{"y":353,"x":2026},{"y":329,"x":2089},{"y":289,"x":2154},{"y":242,"x":2217},{"y":187,"x":2269},{"y":112,"x":2321},{"y":27,"x":2360},{"y":-57,"x":2381},{"y":-141,"x":2387},{"y":-241,"x":2378},{"y":-326,"x":2351},{"y":-409,"x":2309},{"y":-478,"x":2264},{"y":-510,"x":2264},{"y":-534,"x":2289},{"y":-543,"x":2334},{"y":-527,"x":2430},{"y":-493,"x":2532},{"y":-162,"x":3228},{"y":-149,"x":3310},{"y":-145,"x":3387},{"y":-149,"x":3457},{"y":-166,"x":3525},{"y":-189,"x":3599},{"y":-228,"x":3661},{"y":-282,"x":3732},{"y":-343,"x":3786},{"y":-406,"x":3831},{"y":-494,"x":3867},{"y":-576,"x":3890},{"y":-666,"x":3894},{"y":-760,"x":3887},{"y":-875,"x":3885},{"y":-942,"x":3903},{"y":-1009,"x":3961},{"y":-1069,"x":4053},{"y":-1106,"x":4162},{"y":-1158,"x":4265},{"y":-1258,"x":4398},{"y":-1370,"x":4510},{"y":-1443,"x":4574},{"y":-1507,"x":4642},{"y":-1543,"x":4721},{"y":-1542,"x":5009},{"y":-1524,"x":5055},{"y":-1486,"x":5080},{"y":-1478,"x":5115},{"y":-1456,"x":5156},{"y":-1428,"x":5201},{"y":-1373,"x":5286},{"y":-1325,"x":5402},{"y":-1293,"x":5509},{"y":-1263,"x":5657},{"y":-1256,"x":5828}],"y":400,"cameraOffsetY":120,"snapToGrid":false,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"physic":true,"stretchTexture":false,"directed":true,"repeatTexture":true,"thick":16,"rotation":0,"textureOffset":0,"camera":false,"width":6241,"wireframe":false,"height":1983.1,"isRoad":true,"smoothing":true,"shape":true,"lineId":0,"line":true,"direction":90}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"isWheel":false,"x":-120,"vertices":[{"y":-465,"x":0},{"y":-2385,"x":545},{"y":-4160,"x":8220},{"y":-2900,"x":9567},{"y":-565,"x":10405},{"y":1530,"x":11355},{"y":1160,"x":7418},{"y":758,"x":5618},{"y":76,"x":6209},{"y":-1158,"x":6212},{"y":-1169,"x":6327},{"y":-1184,"x":6394},{"y":-1205,"x":6462},{"y":-1228,"x":6534},{"y":-1258,"x":6600},{"y":-1306,"x":6672},{"y":-1348,"x":6734},{"y":-1401,"x":6796},{"y":-1445,"x":6838},{"y":-1493,"x":6885},{"y":-1545,"x":6933},{"y":-1577,"x":6951},{"y":-1585,"x":6991},{"y":-1579,"x":7027},{"y":-1565,"x":7065},{"y":-1548,"x":7112},{"y":-1523,"x":7150},{"y":-1494,"x":7187},{"y":-1455,"x":7203},{"y":-1411,"x":7216},{"y":-1364,"x":7228},{"y":-1314,"x":7230},{"y":-1273,"x":7231},{"y":-1197,"x":7217},{"y":-1094,"x":7197},{"y":-1031,"x":7186},{"y":-971,"x":7173},{"y":-899,"x":7157},{"y":-825,"x":7147},{"y":-760,"x":7143},{"y":-708,"x":7143},{"y":-643,"x":7163},{"y":-582,"x":7194},{"y":-517,"x":7237},{"y":-475,"x":7281},{"y":-446,"x":7342},{"y":-408,"x":7474},{"y":-405,"x":7574},{"y":-402,"x":7630},{"y":-411,"x":7724},{"y":-430,"x":7828},{"y":-438,"x":7901},{"y":-440,"x":7945},{"y":-430,"x":7978},{"y":-389,"x":8008},{"y":-329,"x":8030},{"y":-267,"x":8029},{"y":-204,"x":8015},{"y":-120,"x":8004},{"y":-54,"x":8004},{"y":29,"x":8018},{"y":124,"x":8048},{"y":190,"x":8083},{"y":269,"x":8143},{"y":326,"x":8198},{"y":384,"x":8273},{"y":417,"x":8331},{"y":443,"x":8394},{"y":462,"x":8475},{"y":471,"x":8543},{"y":467,"x":8612},{"y":461,"x":8691},{"y":439,"x":8771},{"y":406,"x":8845},{"y":368,"x":8906},{"y":326,"x":8960},{"y":279,"x":9006},{"y":230,"x":9049},{"y":186,"x":9074},{"y":100,"x":9120},{"y":-10,"x":9145},{"y":-90,"x":9150},{"y":-180,"x":9150},{"y":-260,"x":9130},{"y":-330,"x":9110},{"y":-525,"x":8980},{"y":-610,"x":8970},{"y":-660,"x":8960},{"y":-780,"x":8895},{"y":-875,"x":8820},{"y":-975,"x":8640},{"y":-1020,"x":8490},{"y":-1030,"x":8360},{"y":-1020,"x":8255},{"y":-1000,"x":8170},{"y":-960,"x":8090},{"y":-915,"x":8015},{"y":-825,"x":7900},{"y":-775,"x":7790},{"y":-760,"x":7695},{"y":-800,"x":7605},{"y":-855,"x":7545},{"y":-945,"x":7520},{"y":-1035,"x":7525},{"y":-1105,"x":7545},{"y":-1440,"x":7655},{"y":-1550,"x":7680},{"y":-1633,"x":7682},{"y":-1742,"x":7668},{"y":-1851,"x":7628},{"y":-1940,"x":7560},{"y":-2008,"x":7477},{"y":-2037,"x":7380},{"y":-2048,"x":7280},{"y":-2012,"x":7158},{"y":-1970,"x":7071},{"y":-1916,"x":7003},{"y":-1807,"x":6889},{"y":-1729,"x":6800},{"y":-1658,"x":6685},{"y":-1585,"x":6460},{"y":-1570,"x":6300},{"y":-1600,"x":6200},{"y":-1660,"x":6050},{"y":-1735,"x":5900},{"y":-1810,"x":5820},{"y":-1870,"x":5755},{"y":-1915,"x":5680},{"y":-1960,"x":5580},{"y":-1960,"x":5480},{"y":-1930,"x":5400},{"y":-1920,"x":5285},{"y":-1935,"x":5160},{"y":-1940,"x":5055},{"y":-1960,"x":4855},{"y":-1975,"x":4705},{"y":-1950,"x":4470},{"y":-1920,"x":4285},{"y":-1890,"x":4155},{"y":-1835,"x":4060},{"y":-1745,"x":3995},{"y":-1605,"x":3950},{"y":-1465,"x":3965},{"y":-1335,"x":3990},{"y":-1205,"x":4000},{"y":-1095,"x":3975},{"y":-1015,"x":3950},{"y":-855,"x":3925},{"y":-675,"x":3950},{"y":-495,"x":3955},{"y":-405,"x":3915},{"y":-350,"x":3885},{"y":-325,"x":3810},{"y":-330,"x":3735},{"y":-440,"x":3625},{"y":-605,"x":3525},{"y":-760,"x":3400},{"y":-870,"x":3315},{"y":-970,"x":3210},{"y":-1025,"x":3100},{"y":-1070,"x":2975},{"y":-1095,"x":2805},{"y":-1094,"x":2591},{"y":-1070,"x":2445},{"y":-1004,"x":2312},{"y":-982,"x":2180},{"y":-970,"x":2105},{"y":-990,"x":1995},{"y":-1016,"x":1912},{"y":-1025,"x":1836},{"y":-1025,"x":1754},{"y":-1005,"x":1683},{"y":-974,"x":1613},{"y":-937,"x":1562},{"y":-895,"x":1513},{"y":-845,"x":1470},{"y":-797,"x":1445},{"y":-747,"x":1426},{"y":-678,"x":1409},{"y":-614,"x":1402},{"y":-564,"x":1404},{"y":-512,"x":1412},{"y":-453,"x":1431},{"y":-400,"x":1460},{"y":-337,"x":1509},{"y":-280,"x":1572},{"y":-244,"x":1620},{"y":-223,"x":1667},{"y":-204,"x":1720},{"y":-195,"x":1773},{"y":-194,"x":1822},{"y":-201,"x":1883},{"y":-211,"x":1934},{"y":-225,"x":1982},{"y":-245,"x":2020},{"y":-270,"x":2060},{"y":-300,"x":2095},{"y":-350,"x":2141},{"y":-387,"x":2167},{"y":-402,"x":2188},{"y":-394,"x":2210},{"y":-363,"x":2218},{"y":-333,"x":2194},{"y":-271,"x":2213},{"y":-220,"x":2204},{"y":-166,"x":2180},{"y":-95,"x":2140},{"y":-53,"x":2093},{"y":-6,"x":2070},{"y":26,"x":2009},{"y":50,"x":1940},{"y":71,"x":1887},{"y":88,"x":1844},{"y":85,"x":1798},{"y":58,"x":1761},{"y":7,"x":1719},{"y":-70,"x":1647},{"y":-118,"x":1564},{"y":-142,"x":1470},{"y":-143,"x":1415},{"y":-128,"x":1380},{"y":-110,"x":1320},{"y":-126,"x":1244},{"y":-148,"x":1163},{"y":-170,"x":1051},{"y":-166,"x":950},{"y":-172,"x":855},{"y":-171,"x":761},{"y":-171,"x":670},{"y":-176,"x":592},{"y":-162,"x":500},{"y":-125,"x":440},{"y":-86,"x":410},{"y":-9,"x":406},{"y":135,"x":435},{"y":135,"x":0}],"y":300,"isStatic":true,"rotation":0,"graphic":true,"plr":false,"density":1,"layer":2,"rem":true,"line":true,"ignore":false,"id":-1,"physic":true,"safeId":-1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"isWheel":false,"x":1302,"vertices":[{"y":0,"x":0},{"y":0,"x":790},{"y":55,"x":790},{"y":55,"x":0}],"y":-337,"isStatic":false,"rotation":0,"graphic":true,"plr":false,"density":1,"layer":6,"rem":true,"line":true,"ignore":false,"id":-1,"physic":true,"safeId":-1}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":260,"vertices":[{"y":0,"x":-400},{"y":-1,"x":664},{"y":7,"x":836},{"y":31,"x":976},{"y":94,"x":1150},{"y":318,"x":1628},{"y":357,"x":1719},{"y":371,"x":1791},{"y":376,"x":1876},{"y":367,"x":1962},{"y":353,"x":2026},{"y":329,"x":2089},{"y":289,"x":2154},{"y":242,"x":2217},{"y":187,"x":2269},{"y":112,"x":2321},{"y":-229,"x":2559},{"y":-260,"x":2710},{"y":-162,"x":3228},{"y":-149,"x":3310},{"y":-145,"x":3387},{"y":-149,"x":3457},{"y":-166,"x":3525},{"y":-189,"x":3599},{"y":-228,"x":3661},{"y":-282,"x":3732},{"y":-343,"x":3786},{"y":-406,"x":3831},{"y":-494,"x":3867},{"y":-576,"x":3890},{"y":-680,"x":3919},{"y":-806,"x":3979},{"y":-942,"x":4068},{"y":-1076,"x":4203},{"y":-1258,"x":4398},{"y":-1340,"x":4536},{"y":-1386,"x":5182},{"y":-1373,"x":5286},{"y":-1325,"x":5402},{"y":-1293,"x":5509},{"y":-1263,"x":5657},{"y":-1257,"x":5809},{"y":-1272,"x":5962},{"y":-1307,"x":6109},{"y":-1313,"x":6253},{"y":-1170,"x":6433},{"y":-553,"x":6857},{"y":-480,"x":7134},{"y":-431,"x":7552},{"y":99,"x":7893},{"y":242,"x":8129},{"y":216,"x":8496},{"y":-57,"x":9686}],"y":400,"cameraOffsetY":80,"snapToGrid":false,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"physic":false,"stretchTexture":false,"directed":false,"repeatTexture":true,"thick":16,"rotation":0,"textureOffset":0,"camera":true,"width":10099,"wireframe":false,"height":1775,"isRoad":false,"smoothing":true,"shape":false,"lineId":0,"line":false,"direction":90}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"isWheel":false,"x":4315,"vertices":[{"y":0,"x":0},{"y":-11,"x":31},{"y":-18,"x":72},{"y":-14,"x":111},{"y":0,"x":146},{"y":18,"x":177},{"y":47,"x":198},{"y":81,"x":207},{"y":112,"x":206},{"y":147,"x":191},{"y":178,"x":161},{"y":195,"x":124},{"y":204,"x":71},{"y":198,"x":28},{"y":179,"x":-5},{"y":158,"x":-30},{"y":127,"x":-48},{"y":94,"x":-54},{"y":60,"x":-48},{"y":28,"x":-30}],"y":-918,"isStatic":false,"rotation":0,"graphic":true,"plr":false,"density":1,"layer":3,"rem":true,"line":true,"ignore":false,"id":-1,"physic":true,"safeId":1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"isWheel":false,"x":4655,"vertices":[{"y":2,"x":0},{"y":-16,"x":21},{"y":-23,"x":53},{"y":-19,"x":83},{"y":-2,"x":110},{"y":23,"x":134},{"y":61,"x":149},{"y":103,"x":156},{"y":143,"x":156},{"y":187,"x":145},{"y":227,"x":121},{"y":249,"x":93},{"y":261,"x":52},{"y":252,"x":19},{"y":229,"x":-1},{"y":201,"x":-20},{"y":162,"x":-35},{"y":119,"x":-40},{"y":78,"x":-35},{"y":36,"x":-20}],"y":-1208,"isStatic":false,"rotation":0,"graphic":true,"plr":false,"density":1,"layer":3,"rem":true,"line":true,"ignore":false,"id":-1,"physic":true,"safeId":1}},{"className":"PlankCandy","params":{"x":5378,"id":-1,"y":-1106,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5448,"id":-1,"y":-1114,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5517,"id":-1,"y":-1122,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5587,"id":-1,"y":-1128,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5657,"id":-1,"y":-1136,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5725,"id":-1,"y":-1144,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5795,"id":-1,"y":-1150,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5865,"id":-1,"y":-1158,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":5935,"id":-1,"y":-1166,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6004,"id":-1,"y":-1172,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6074,"id":-1,"y":-1180,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6144,"id":-1,"y":-1188,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6213,"id":-1,"y":-1194,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6283,"id":-1,"y":-1202,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6353,"id":-1,"y":-1210,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6423,"id":-1,"y":-1216,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6491,"id":-1,"y":-1224,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6561,"id":-1,"y":-1232,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6631,"id":-1,"y":-1238,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6700,"id":-1,"y":-1246,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}},{"className":"PlankCandy","params":{"x":6770,"id":-1,"y":-1253,"width":86,"rotation":-6,"active":true,"height":21.75,"safeId":-1}}],[{"className":"SignPillar","params":{"x":3970,"y":-800,"scaleX":1,"width":9.3,"rotation":90.00000000000006,"scaleY":1.794701986754967,"height":230.4}},{"className":"Sign1","params":{"rotation":180,"x":3930,"height":69.8,"y":-800,"width":68.8}},{"className":"Sign1","params":{"rotation":180,"x":4020,"height":69.8,"y":-800,"width":68.8}},{"className":"Sign1","params":{"rotation":180,"x":4110,"height":69.8,"y":-800,"width":68.8}},{"className":"SignPillar","params":{"x":3660,"y":190,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"SignPillar","params":{"x":5160,"y":-1210,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"SignPillar","params":{"x":7460,"y":-170,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"Dec15","params":{"x":440,"y":280,"scaleX":1,"width":197,"rotation":0,"scaleY":1,"height":234.2}},{"className":"Dec14","params":{"x":806,"y":290,"scaleX":-1,"width":165.85,"rotation":0,"scaleY":1,"height":244.8}},{"className":"Dec14","params":{"x":2890,"y":-170,"scaleX":1,"width":165.85,"rotation":27,"scaleY":1,"height":244.8}},{"className":"Dec29","params":{"rotation":0,"x":3630,"height":82.25,"y":234,"width":63.15}},{"className":"Dec29","params":{"rotation":0,"x":5130,"height":82.25,"y":-1160,"width":63.15}},{"className":"Dec13","params":{"x":4930,"y":-1250,"scaleX":1,"width":171.75,"rotation":6,"scaleY":1,"height":213.45}},{"className":"Dec29","params":{"rotation":0,"x":7430,"height":82.25,"y":-125,"width":63.15}},{"className":"Dec13","params":{"x":7907,"y":-230,"scaleX":-1,"width":171.75,"rotation":0,"scaleY":1,"height":213.45}},{"className":"Dec15","params":{"x":7020,"y":-1360,"scaleX":1,"width":197,"rotation":24,"scaleY":1,"height":234.2}}],[{"className":"BoostE","params":{"x":2600,"y":310,"width":100,"rotation":0,"height":99,"time":1.3,"force":5000,"safeId":-1}},{"className":"BoostE","params":{"x":4080,"y":-420,"width":100,"rotation":0,"height":99,"time":2,"force":3500,"safeId":1}},{"className":"BoostE","params":{"x":8080,"y":390,"width":100,"rotation":0,"height":99,"time":2,"force":10000,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8010,"id":-1,"y":220,"rate":1,"width":245,"rotation":0,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8058,"id":-1,"y":405,"rate":1,"width":245,"rotation":-30,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8177,"id":-1,"y":544,"rate":1,"width":245,"rotation":-51,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8345,"id":-1,"y":630,"rate":1,"width":245,"rotation":-78,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8899,"id":-1,"y":265,"rate":1,"width":245,"rotation":-174,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8831,"id":-1,"y":441,"rate":1,"width":245,"rotation":-147,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8706,"id":-1,"y":574,"rate":1,"width":245,"rotation":-126,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8527,"id":-1,"y":641,"rate":1,"width":245,"rotation":-96,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8889,"id":-1,"y":65,"rate":1,"width":245,"rotation":162,"height":128,"safeId":3}},{"className":"GeyserE","params":{"speed":1000,"x":8799,"id":-1,"y":-95,"rate":1,"width":245,"rotation":141,"height":128,"safeId":3}}],null,[{"className":"PlayerWP","params":{"rotation":0,"x":580,"height":32,"y":320,"width":64}},{"className":"SafePointE","params":{"x":3660,"id":1,"y":120,"width":128,"rotation":0,"height":578}},{"className":"SafePointE","params":{"x":5160,"id":2,"y":-1280,"width":128,"rotation":0,"height":889}},{"className":"SafePointE","params":{"x":7460,"id":3,"y":-240,"width":128,"rotation":0,"height":622}}],[{"className":"MotorJointE","params":{"x":1700,"y":-310,"safeId":-1,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":1,"useWeld":false,"snd":false,"rate":-110}},{"className":"ToggleE","params":{"sndId":-1,"x":2960,"id":1,"hint":-1,"y":320,"id_off":-1,"width":916,"rotation":0,"off":false,"height":184,"safeId":-1}},{"className":"PivotJointE","params":{"x":5415,"id":-1,"y":-1109,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5484,"id":-1,"y":-1117,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5554,"id":-1,"y":-1125,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5624,"id":-1,"y":-1131,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5694,"id":-1,"y":-1139,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5762,"id":-1,"y":-1147,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5832,"id":-1,"y":-1153,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5902,"id":-1,"y":-1161,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5971,"id":-1,"y":-1169,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6041,"id":-1,"y":-1175,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6111,"id":-1,"y":-1183,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6181,"id":-1,"y":-1191,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6250,"id":-1,"y":-1197,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6320,"id":-1,"y":-1205,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6390,"id":-1,"y":-1213,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6459,"id":-1,"y":-1219,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6528,"id":-1,"y":-1227,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6598,"id":-1,"y":-1234,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6668,"id":-1,"y":-1241,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6737,"id":-1,"y":-1249,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":6808,"id":-1,"y":-1258,"width":17,"rotation":0,"graphic":0,"height":17,"safeId":2}},{"className":"PivotJointE","params":{"x":5345,"id":-1,"y":-1103,"width":17,"rotation":-6,"graphic":0,"height":17,"safeId":2}},{"className":"MotorJointE","params":{"x":8460,"y":200,"safeId":3,"width":17,"rotation":0,"graphic":0,"height":17,"time":0,"id":7,"useWeld":false,"snd":false,"rate":-50}},{"className":"ToggleE","params":{"sndId":-1,"x":7640,"id":7,"hint":-1,"y":-330,"id_off":-1,"width":64,"rotation":0,"off":false,"height":1347,"safeId":3}},{"className":"PivotJointE","params":{"x":4480,"id":5,"y":-880,"width":17,"rotation":0,"graphic":0,"height":17,"safeId":1}},{"className":"ToggleE","params":{"sndId":-1,"x":4050,"id":5,"hint":-1,"y":-480,"id_off":-1,"width":916,"rotation":0,"off":false,"height":78,"safeId":1}},{"className":"PivotJointE","params":{"x":4730,"id":5,"y":-1200,"width":17,"rotation":0,"graphic":0,"height":17,"safeId":1}}]],"settings":{"prizes":"30,38,45","gravityY":500,"countdown":0,"theme":3}} \ No newline at end of file diff --git a/assets/levels/map8.json b/assets/levels/map8.json new file mode 100644 index 0000000..bfed759 --- /dev/null +++ b/assets/levels/map8.json @@ -0,0 +1 @@ +{"settings":{"theme":6,"prizes":"33,39,48","countdown":0,"gravityY":500},"layers":[[{"params":{"layer":0,"vertices":[{"x":-215,"y":0,"length":215},{"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":197,"y":-132,"length":237.1349826575573},{"x":204,"y":-168,"length":264.27258654654287},{"x":202,"y":-209,"length":290.66303514551004},{"x":196,"y":-251,"length":318.4603586005643},{"x":168,"y":-293,"length":337.7469466923424},{"x":202,"y":-291,"length":354.2386201418473},{"x":231,"y":-274,"length":358.381082090001},{"x":254,"y":-254,"length":359.21024484276614},{"x":277,"y":-224,"length":356.23728047468586},{"x":296,"y":-186,"length":349.5883293246501},{"x":304,"y":-151,"length":339.43629741086914},{"x":306,"y":-110,"length":325.17072438951203},{"x":297,"y":-66,"length":304.2449670906653},{"x":283,"y":-38,"length":285.53983960211224},{"x":263,"y":-7,"length":263.0931394012394},{"x":490,"y":-10,"length":490.10203019371386},{"x":365,"y":85,"length":374.7665940288702},{"x":-150,"y":85,"length":172.40939649566667}],"density":1,"safeId":3,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":7089,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":534},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"sf":true,"bg":true,"x":5980,"vertices":[{"x":0,"y":0,"length":0},{"x":1655,"y":-5,"length":1655.0075528528564},{"x":1655,"y":365,"length":1694.7713710114413},{"x":0,"y":370,"length":370}],"id":-1,"density":1.5,"viscosity":1.5,"y":570,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"sf":true,"bg":true,"x":4730,"vertices":[{"x":0,"y":0,"length":0},{"x":260,"y":0,"length":260},{"x":260,"y":365,"length":448.13502429513363},{"x":0,"y":365,"length":365}],"id":-1,"density":1.5,"viscosity":1.5,"y":450,"rotation":0},"className":"frg.game.editor.objects::WaterShaper"},{"params":{"height":166,"x":1740,"directed":true,"isPillar":true,"y":139,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":609,"y":-227,"length":649.9307655435308},{"x":635,"y":-199,"length":665.4517262732136},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933},{"x":704,"y":-74,"length":707.8785206516723}],"rotation":0,"width":108},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":261,"x":1380,"directed":true,"isPillar":true,"y":289,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":369,"y":-322,"length":489.73972679373276},{"x":425,"y":-314,"length":528.413663714329},{"x":488,"y":-298,"length":571.7936690800275},{"x":541,"y":-275,"length":606.8821961468304},{"x":591,"y":-238,"length":637.1224372128171},{"x":635,"y":-199,"length":665.4517262732136},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933},{"x":704,"y":-74,"length":707.8785206516723}],"rotation":0,"width":348},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":210,"x":1870,"directed":true,"isPillar":true,"y":89,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":546,"y":-271,"length":609.5547555388277},{"x":591,"y":-238,"length":637.1224372128171},{"x":635,"y":-199,"length":665.4517262732136},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933},{"x":704,"y":-74,"length":707.8785206516723}],"rotation":0,"width":171},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":211,"x":1490,"directed":true,"isPillar":true,"y":239,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":541,"y":-272,"length":605.528694613228},{"x":591,"y":-238,"length":637.1224372128171},{"x":635,"y":-199,"length":665.4517262732136},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933},{"x":704,"y":-74,"length":707.8785206516723}],"rotation":0,"width":176},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":161,"x":1610,"directed":true,"isPillar":true,"y":189,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":597,"y":-222,"length":636.9403425753467},{"x":636,"y":-197,"length":665.8115348955739},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933},{"x":704,"y":-74,"length":707.8785206516723}],"rotation":0,"width":120},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":3,"vertices":[{"x":0,"y":2,"length":2},{"x":31,"y":-15,"length":34.438350715445125},{"x":72,"y":-22,"length":75.28612089887484},{"x":111,"y":-18,"length":112.44998888394787},{"x":146,"y":-2,"length":146.01369798755184},{"x":177,"y":22,"length":178.36199146679206},{"x":198,"y":57,"length":206.0412580043133},{"x":207,"y":95,"length":227.75864418282788},{"x":206,"y":131,"length":244.12496799794977},{"x":191,"y":172,"length":257.0311265197272},{"x":161,"y":208,"length":263.0304164920856},{"x":124,"y":228,"length":259.53805116013336},{"x":71,"y":239,"length":249.32308356828895},{"x":28,"y":231,"length":232.69078194032525},{"x":-5,"y":210,"length":210.05951537600004},{"x":-30,"y":185,"length":187.41664813991312},{"x":-48,"y":149,"length":156.54072952429985},{"x":-54,"y":110,"length":122.53978945632312},{"x":-48,"y":72,"length":86.53323061113575},{"x":-30,"y":34,"length":45.34313619501854}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":1425,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":10},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"wireframe":false,"vertices":[{"x":-525,"y":0,"length":525},{"x":1490,"y":0,"length":1490},{"x":2655,"y":-435,"length":2690.399598572673},{"x":3445,"y":5,"length":3445.003628445114},{"x":3695,"y":5,"length":3695.0033829483837},{"x":3700,"y":45,"length":3700.273638529994},{"x":3710,"y":78,"length":3710.8198555036324},{"x":3721,"y":109,"length":3722.596137106468},{"x":3734,"y":134,"length":3736.403618454516},{"x":3751,"y":160,"length":3754.410872560434},{"x":3777,"y":189,"length":3781.7257965114286},{"x":3808,"y":215,"length":3814.0646297617977},{"x":3837,"y":237,"length":3844.3124222674724},{"x":3866,"y":252,"length":3874.2044344613514},{"x":3898,"y":263,"length":3906.86229601198},{"x":3942,"y":272,"length":3951.3729259587735},{"x":3984,"y":275,"length":3993.479810891749},{"x":4362,"y":242,"length":4368.707818108233},{"x":4423,"y":232,"length":4429.080378588766},{"x":4468,"y":208,"length":4472.838919523036},{"x":4508,"y":181,"length":4511.632188022423},{"x":4542,"y":149,"length":4544.443310241641},{"x":4571,"y":107,"length":4572.252180271775},{"x":4597,"y":54,"length":4597.317152427055},{"x":4637,"y":52,"length":4637.29155865792},{"x":4635,"y":388,"length":4651.211562593127},{"x":4878,"y":389,"length":4893.485976274991},{"x":4881,"y":53,"length":4881.287739930929},{"x":4914,"y":50,"length":4914.254368670796},{"x":4938,"y":109,"length":4939.202870909435},{"x":4969,"y":149,"length":4971.233448551778},{"x":5000,"y":178,"length":5003.167396759776},{"x":5033,"y":203,"length":5037.092216745689},{"x":5069,"y":222,"length":5073.85898503299},{"x":5110,"y":235,"length":5115.400766313427},{"x":5157,"y":243,"length":5162.721956487682},{"x":5704,"y":240,"length":5709.046855649373},{"x":5761,"y":222,"length":5765.275795658002},{"x":5810,"y":194,"length":5813.237996160144},{"x":5844,"y":167,"length":5846.38563558717},{"x":5890,"y":164,"length":5892.282749495309},{"x":5893,"y":414,"length":5907.524439221559},{"x":7519,"y":416,"length":7530.499120244288},{"x":7539,"y":-2720,"length":8014.6691135691935},{"x":11629,"y":-2985,"length":12005.992920204477}],"lineId":0,"physic":true,"directed":true,"width":12167,"shape":true,"height":3465,"isRoad":true,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":80,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":true,"x":100,"smoothing":true,"y":390,"direction":90,"textureOffset":0,"camera":false,"snapToGrid":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"height":165,"x":1488,"directed":false,"isPillar":false,"y":116,"thick":16,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-45,"length":51.478150704935004},{"x":65,"y":-88,"length":109.40292500660117},{"x":110,"y":-120,"length":162.78820596099706},{"x":159,"y":-141,"length":212.51352898109803},{"x":215,"y":-149,"length":261.5836386320826},{"x":290,"y":-150,"length":326.49655434629017},{"x":375,"y":-150,"length":403.8873605350878},{"x":460,"y":-150,"length":483.83881613611777},{"x":545,"y":-150,"length":565.2654243804409},{"x":640,"y":-150,"length":657.3431371817918},{"x":695,"y":-150,"length":711.0028129339573},{"x":740,"y":-152,"length":755.4495350451941}],"rotation":0,"width":753},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":3,"vertices":[{"x":0,"y":2,"length":2},{"x":31,"y":-15,"length":34.438350715445125},{"x":72,"y":-22,"length":75.28612089887484},{"x":111,"y":-18,"length":112.44998888394787},{"x":146,"y":-2,"length":146.01369798755184},{"x":177,"y":22,"length":178.36199146679206},{"x":198,"y":57,"length":206.0412580043133},{"x":207,"y":95,"length":227.75864418282788},{"x":206,"y":131,"length":244.12496799794977},{"x":191,"y":172,"length":257.0311265197272},{"x":161,"y":208,"length":263.0304164920856},{"x":124,"y":228,"length":259.53805116013336},{"x":71,"y":239,"length":249.32308356828895},{"x":28,"y":231,"length":232.69078194032525},{"x":-5,"y":210,"length":210.05951537600004},{"x":-30,"y":185,"length":187.41664813991312},{"x":-48,"y":149,"length":156.54072952429985},{"x":-54,"y":110,"length":122.53978945632312},{"x":-48,"y":72,"length":86.53323061113575},{"x":-30,"y":34,"length":45.34313619501854}],"density":1,"safeId":1,"physic":true,"rem":true,"rotation":0,"plr":true,"line":true,"x":2595,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":-420},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":220,"x":1260,"directed":true,"isPillar":true,"y":371,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":252,"y":-240,"length":348},{"x":268,"y":-271,"length":381.13645850272576},{"x":292,"y":-298,"length":417.21457309159274},{"x":329,"y":-315,"length":455.4843575799283},{"x":374,"y":-319,"length":491.5658653730952},{"x":425,"y":-314,"length":528.413663714329},{"x":488,"y":-298,"length":571.7936690800275},{"x":541,"y":-275,"length":606.8821961468304},{"x":591,"y":-238,"length":637.1224372128171},{"x":635,"y":-199,"length":665.4517262732136},{"x":666,"y":-159,"length":684.7167297503399},{"x":691,"y":-112,"length":700.0178569150933}],"rotation":0,"width":452},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":294,"x":2234,"directed":true,"isPillar":false,"y":-42,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":-5,"y":5,"length":7.0710678118654755},{"x":46,"y":-9,"length":46.87216658103186},{"x":93,"y":-30,"length":97.71898484941399},{"x":133,"y":-61,"length":146.32156368765337},{"x":163,"y":-102,"length":192.28364465029262},{"x":189,"y":-151,"length":241.91320757660174},{"x":215,"y":-196,"length":290.93126335957777},{"x":242,"y":-233,"length":335.93600581063055},{"x":283,"y":-262,"length":385.6591759572174},{"x":325,"y":-273,"length":424.4455206501772},{"x":376,"y":-276,"length":466.42469917447556},{"x":419,"y":-266,"length":496.303334665404},{"x":464,"y":-244,"length":524.2442178984905},{"x":503,"y":-210,"length":545.0770587724271},{"x":524,"y":-180,"length":554.0541489782385},{"x":538,"y":-142,"length":556.4242985348501},{"x":545,"y":-106,"length":555.2125719037709},{"x":540,"y":-52,"length":542.4979262633176},{"x":525,"y":-5,"length":525.0238089839355}],"rotation":0,"width":563},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":868,"x":2658,"directed":false,"isPillar":false,"y":-313,"thick":16,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":25,"y":-45,"length":51.478150704935004},{"x":65,"y":-88,"length":109.40292500660117},{"x":110,"y":-120,"length":162.78820596099706},{"x":159,"y":-141,"length":212.51352898109803},{"x":215,"y":-149,"length":261.5836386320826},{"x":290,"y":-150,"length":326.49655434629017},{"x":375,"y":-150,"length":403.8873605350878},{"x":460,"y":-150,"length":483.83881613611777},{"x":545,"y":-150,"length":565.2654243804409},{"x":640,"y":-150,"length":657.3431371817918},{"x":730,"y":-150,"length":745.2516353554684},{"x":800,"y":-150,"length":813.9410298049853},{"x":875,"y":-150,"length":887.7640452282352},{"x":945,"y":-150,"length":956.8307060290238},{"x":1015,"y":-150,"length":1026.023878864425},{"x":1080,"y":-150,"length":1090.366910723175},{"x":1140,"y":-150,"length":1149.826073804208},{"x":1170,"y":-130,"length":1177.2000679578641},{"x":1170,"y":-50,"length":1171.067888723792},{"x":1170,"y":20,"length":1170.1709276853533},{"x":1140,"y":20,"length":1140.175425099138},{"x":1140,"y":70,"length":1142.1471008587291},{"x":1140,"y":130,"length":1147.3883387938017},{"x":1140,"y":200,"length":1157.410903698423},{"x":1140,"y":270,"length":1171.537451385998},{"x":1140,"y":335,"length":1188.202423831899},{"x":1140,"y":420,"length":1214.9074038789952},{"x":1095,"y":470,"length":1191.6060590648237},{"x":1050,"y":520,"length":1171.7081547894084},{"x":1000,"y":575,"length":1153.5271995059327},{"x":955,"y":625,"length":1141.3369353525716},{"x":920,"y":665,"length":1135.1761977772437},{"x":885,"y":705,"length":1131.4813299387665}],"rotation":0,"width":1183},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":294,"x":1064,"directed":true,"isPillar":false,"y":388,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":-5,"y":5,"length":7.0710678118654755},{"x":46,"y":-9,"length":46.87216658103186},{"x":93,"y":-30,"length":97.71898484941399},{"x":133,"y":-61,"length":146.32156368765337},{"x":163,"y":-102,"length":192.28364465029262},{"x":189,"y":-151,"length":241.91320757660174},{"x":215,"y":-196,"length":290.93126335957777},{"x":242,"y":-233,"length":335.93600581063055},{"x":283,"y":-262,"length":385.6591759572174},{"x":325,"y":-273,"length":424.4455206501772},{"x":376,"y":-276,"length":466.42469917447556},{"x":419,"y":-266,"length":496.303334665404},{"x":464,"y":-244,"length":524.2442178984905},{"x":503,"y":-210,"length":545.0770587724271},{"x":524,"y":-180,"length":554.0541489782385},{"x":538,"y":-142,"length":556.4242985348501},{"x":545,"y":-106,"length":555.2125719037709},{"x":540,"y":-52,"length":542.4979262633176},{"x":525,"y":-5,"length":525.0238089839355}],"rotation":0,"width":563},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":1443,"x":4000,"directed":false,"isPillar":false,"y":50,"thick":16,"direction":90,"snapToGrid":true,"vertices":[{"x":205,"y":-1360,"length":1375.3635882922015},{"x":205,"y":-1295,"length":1311.1254707311577},{"x":205,"y":-1220,"length":1237.1034718244064},{"x":205,"y":-1130,"length":1148.444600318187},{"x":205,"y":-1040,"length":1060.0117923872356},{"x":205,"y":-955,"length":976.7548310604867},{"x":205,"y":-865,"length":888.9600665946699},{"x":205,"y":-775,"length":801.6545390628061},{"x":205,"y":-690,"length":719.8090024443984},{"x":205,"y":-605,"length":638.7879147260066},{"x":205,"y":-545,"length":582.2800013739095},{"x":205,"y":-470,"length":512.7621280866987},{"x":205,"y":-360,"length":414.2764777295472},{"x":205,"y":-290,"length":355.1408171415953},{"x":205,"y":-210,"length":293.47061181658376},{"x":205,"y":-130,"length":242.7447218787671},{"x":205,"y":-50,"length":211.00947846009194},{"x":205,"y":40,"length":208.86598574205422},{"x":180,"y":70,"length":193.13207915827965},{"x":100,"y":70,"length":122.06555615733703},{"x":30,"y":70,"length":76.15773105863909},{"x":5,"y":45,"length":45.27692569068709},{"x":5,"y":-15,"length":15.811388300841896},{"x":5,"y":-85,"length":85.14693182963201},{"x":5,"y":-165,"length":165.07574019219177},{"x":5,"y":-225,"length":225.055548698538},{"x":5,"y":-280,"length":280.04463929880893},{"x":5,"y":-345,"length":345.03622998172233},{"x":-30,"y":-345,"length":346.30189141845585},{"x":-30,"y":-400,"length":401.1234224026316},{"x":-30,"y":-445,"length":446.0100895719737},{"x":-30,"y":-495,"length":495.9082576444962},{"x":0,"y":-525,"length":525},{"x":0,"y":-580,"length":580},{"x":0,"y":-625,"length":625},{"x":0,"y":-675,"length":675},{"x":-35,"y":-705,"length":705.868259663232},{"x":-80,"y":-705,"length":709.5244886541972},{"x":-125,"y":-705,"length":715.9958100436063},{"x":-195,"y":-705,"length":731.4711204141965},{"x":-265,"y":-705,"length":753.1600095597216},{"x":-320,"y":-705,"length":774.2254193708703},{"x":-375,"y":-705,"length":798.5298992523699},{"x":-435,"y":-705,"length":828.4020762890445},{"x":-435,"y":-800,"length":910.6179220726989},{"x":-435,"y":-880,"length":981.6440291673963},{"x":-435,"y":-940,"length":1035.7726584535817},{"x":-435,"y":-1000,"length":1090.5159329418345},{"x":-435,"y":-1070,"length":1155.043289232053},{"x":-435,"y":-1145,"length":1224.846929211973},{"x":-435,"y":-1205,"length":1281.1127975318957},{"x":-435,"y":-1280,"length":1351.896815589119},{"x":-435,"y":-1340,"length":1408.8381738155736}],"rotation":0,"width":653},"className":"frg.game.editor.objects::BonesPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":400,"length":400}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":413,"x":3813,"isStatic":true,"repeatTexture":true,"id":-1,"width":64,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":-294,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"wireframe":false,"type":5,"straightSides":true,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":-390,"length":390}],"originOffsetRatio":0,"density":"1","action":0,"physic":true,"shapeH":64,"rotation":0,"stretchTexture":false,"height":403,"x":3988,"isStatic":true,"repeatTexture":true,"id":-1,"width":64,"textureOffset":0,"safeId":-1,"graphic":true,"smoothing":true,"y":96,"textureMode":true},"className":"frg.game.editor.objects::DynamicPather"},{"params":{"height":138,"x":3110,"directed":false,"isPillar":false,"y":-380,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3200,"directed":false,"isPillar":false,"y":-380,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3260,"directed":false,"isPillar":false,"y":-380,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":13,"x":3256,"directed":true,"isPillar":false,"y":-380,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":5,"y":0,"length":5},{"x":45,"y":0,"length":45},{"x":80,"y":0,"length":80}],"rotation":0,"width":88},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3340,"directed":false,"isPillar":false,"y":-380,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3400,"directed":false,"isPillar":false,"y":-380,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125},{"x":75,"y":125,"length":145.7737973711325}],"rotation":0,"width":88},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":13,"x":3107,"directed":true,"isPillar":false,"y":-318,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":90,"y":0,"length":90}],"rotation":0,"width":103},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":13,"x":3256,"directed":true,"isPillar":false,"y":-258,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":5,"y":0,"length":5},{"x":45,"y":0,"length":45},{"x":80,"y":0,"length":80}],"rotation":0,"width":88},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3510,"directed":false,"isPillar":false,"y":-380,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125},{"x":60,"y":125,"length":138.6542462386205},{"x":85,"y":105,"length":135.09256086106296},{"x":85,"y":20,"length":87.32124598286491},{"x":60,"y":0,"length":60},{"x":0,"y":0,"length":0},{"x":0,"y":55,"length":55}],"rotation":0,"width":98},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":73,"x":3110,"directed":false,"isPillar":false,"y":-190,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":60,"length":60},{"x":0,"y":120,"length":120},{"x":50,"y":120,"length":130},{"x":65,"y":105,"length":123.4908903522847},{"x":65,"y":70,"length":95.524865872714},{"x":50,"y":60,"length":78.10249675906654}],"rotation":0,"width":78},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":73,"x":3110,"directed":false,"isPillar":false,"y":-250,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":50,"y":120,"length":130},{"x":65,"y":105,"length":123.4908903522847},{"x":65,"y":70,"length":95.524865872714},{"x":52,"y":60,"length":79.39773296511683},{"x":0,"y":60,"length":60},{"x":0,"y":120,"length":120}],"rotation":0,"width":78},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":14,"x":3069,"directed":true,"isPillar":false,"y":-133,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":35,"y":0,"length":35},{"x":56,"y":-1,"length":56.00892785976178},{"x":90,"y":0,"length":90}],"rotation":0,"width":68},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":143,"x":3230,"directed":false,"isPillar":false,"y":-250,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":50,"y":120,"length":130},{"x":65,"y":105,"length":123.4908903522847},{"x":65,"y":70,"length":95.524865872714},{"x":52,"y":60,"length":79.39773296511683},{"x":0,"y":60,"length":60},{"x":0,"y":115,"length":115},{"x":0,"y":190,"length":190}],"rotation":0,"width":78},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":0,"x":3220,"directed":false,"isPillar":false,"y":-190,"thick":1,"direction":90,"snapToGrid":true,"vertices":[],"rotation":0,"width":0},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":78,"x":3189,"directed":true,"isPillar":false,"y":-133,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":35,"y":0,"length":35},{"x":60,"y":0,"length":60},{"x":85,"y":0,"length":85},{"x":115,"y":65,"length":132.09844813622905}],"rotation":0,"width":93},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3430,"directed":false,"isPillar":false,"y":-190,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":-20,"y":0,"length":20},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":33},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3340,"directed":false,"isPillar":false,"y":-190,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":70,"y":0,"length":70},{"x":25,"y":0,"length":25},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":83},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":13,"x":3337,"directed":true,"isPillar":false,"y":-128,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":90,"y":0,"length":90}],"rotation":0,"width":103},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":148,"x":3460,"directed":false,"isPillar":false,"y":-190,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":-10,"length":10},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":148,"x":3530,"directed":false,"isPillar":false,"y":-190,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":-10,"length":10},{"x":-35,"y":25,"length":43.01162633521314},{"x":-65,"y":60,"length":88.45903006477066},{"x":-30,"y":60,"length":67.08203932499369},{"x":0,"y":125,"length":125}],"rotation":0,"width":78},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":138,"x":3560,"directed":false,"isPillar":false,"y":-190,"thick":1,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":60,"length":60},{"x":0,"y":125,"length":125}],"rotation":0,"width":13},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":3,"vertices":[{"x":5,"y":0,"length":5},{"x":21,"y":-20,"length":29},{"x":41,"y":-33,"length":52.630789467763066},{"x":68,"y":-40,"length":78.89233169326408},{"x":93,"y":-41,"length":101.6366075781753},{"x":119,"y":-33,"length":123.4908903522847},{"x":140,"y":-19,"length":141.2834031300209},{"x":156,"y":1,"length":156.00320509528},{"x":166,"y":22,"length":167.45148551147582},{"x":170,"y":48,"length":176.64653973401235},{"x":167,"y":72,"length":181.8598361376145},{"x":159,"y":96,"length":185.73368030596927},{"x":140,"y":116,"length":181.8130908378162},{"x":121,"y":132,"length":179.06702655709677},{"x":96,"y":142,"length":171.40595088852663},{"x":69,"y":142,"length":157.87653403846943},{"x":42,"y":133,"length":139.47401191619892},{"x":20,"y":119,"length":120.66896867049125},{"x":0,"y":100,"length":100},{"x":-8,"y":74,"length":74.43117626371358},{"x":-11,"y":48,"length":49.24428900898052},{"x":-7,"y":21,"length":22.135943621178654}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":4780,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":431},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":13,"x":3557,"directed":true,"isPillar":false,"y":-128,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45}],"rotation":0,"width":58},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":13,"x":3553,"directed":true,"isPillar":false,"y":-193,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":80,"y":0,"length":80}],"rotation":0,"width":93},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":13,"x":3554,"directed":true,"isPillar":false,"y":-69,"thick":128,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":0,"length":0},{"x":45,"y":0,"length":45},{"x":75,"y":0,"length":75}],"rotation":0,"width":88},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":3,"vertices":[{"x":0,"y":0,"length":0},{"x":15,"y":-11,"length":18.601075237738275},{"x":35,"y":-18,"length":39.35733730830886},{"x":58,"y":-20,"length":61.35144660071187},{"x":81,"y":-14,"length":82.20097323024831},{"x":100,"y":0,"length":100},{"x":110,"y":13,"length":110.76551810017412},{"x":119,"y":33,"length":123.4908903522847},{"x":122,"y":55,"length":133.82451195502264},{"x":116,"y":78,"length":139.7855500400524},{"x":100,"y":100,"length":141.4213562373095},{"x":84,"y":112,"length":140},{"x":63,"y":121,"length":136.41847382227965},{"x":36,"y":120,"length":125.2836781069266},{"x":16,"y":114,"length":115.11733144926528},{"x":0,"y":100,"length":100},{"x":-12,"y":86,"length":86.83317338436964},{"x":-19,"y":66,"length":68.6804193347711},{"x":-21,"y":42,"length":46.95742752749558},{"x":-15,"y":18,"length":23.430749027719962}],"density":1,"safeId":2,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":4807,"isStatic":false,"id":-1,"isWheel":false,"ignore":false,"graphic":true,"y":260},"className":"frg.game.editor.objects::LandscapeShaper"},{"params":{"height":385,"x":4910,"directed":false,"isPillar":false,"y":440,"thick":9,"direction":90,"snapToGrid":false,"vertices":[{"x":474,"y":-372,"length":602.5446041580657},{"x":423,"y":-372,"length":563.3054233717264},{"x":376,"y":-372,"length":528.9234349128426},{"x":326,"y":-368,"length":491.62994213127416},{"x":276,"y":-358,"length":452.0398212547209},{"x":231,"y":-337,"length":408.57067931999234},{"x":194,"y":-310,"length":365.6993300513415},{"x":164,"y":-282,"length":326.2207841324645},{"x":131,"y":-242,"length":275.1817581163403},{"x":108,"y":-198,"length":225.53935355055003},{"x":93,"y":-153,"length":179.0474797365213},{"x":87,"y":-100,"length":132.5481044753187},{"x":90,"y":-50,"length":102.95630140987001},{"x":100,"y":0,"length":100}],"rotation":0,"width":400},"className":"frg.game.editor.objects::BonesPather"},{"params":{"wireframe":false,"vertices":[{"x":-525,"y":0,"length":525},{"x":1490,"y":0,"length":1490},{"x":2655,"y":-435,"length":2690.399598572673},{"x":3274,"y":-260,"length":3284.307537366134},{"x":3842,"y":252,"length":3850.25557593259},{"x":3984,"y":275,"length":3993.479810891749},{"x":5704,"y":240,"length":5709.046855649373},{"x":5761,"y":222,"length":5765.275795658002},{"x":5810,"y":194,"length":5813.237996160144},{"x":5844,"y":167,"length":5846.38563558717},{"x":5890,"y":164,"length":5892.282749495309},{"x":6202,"y":279,"length":6208.272303950593},{"x":8625,"y":379,"length":8633.322998706813}],"lineId":0,"physic":false,"directed":false,"width":9163,"shape":false,"height":879.6,"isRoad":false,"rotation":0,"textureMode":true,"straightSides":true,"originOffsetRatio":0,"cameraOffsetY":80,"stretchTexture":false,"thick":128,"repeatTexture":true,"line":false,"x":100,"smoothing":true,"y":390,"direction":90,"textureOffset":0,"camera":true,"snapToGrid":false},"className":"frg.game.editor.objects::GroundPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":155,"length":155}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4795,"smoothing":true,"y":320,"width":13,"height":168,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":0,"y":0,"length":0},{"x":0,"y":155,"length":155}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4915,"smoothing":true,"y":310,"width":13,"height":168,"wireframe":false,"snapToGrid":true,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"height":1503,"x":5310,"directed":false,"isPillar":false,"y":306,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":0,"y":0,"length":0},{"x":70,"y":0,"length":70},{"x":145,"y":0,"length":145},{"x":225,"y":0,"length":225},{"x":310,"y":0,"length":310},{"x":390,"y":0,"length":390},{"x":445,"y":-10,"length":445.1123453691214},{"x":493,"y":-25,"length":493.63346726088173},{"x":538,"y":-50,"length":540.3184246349554},{"x":584,"y":-84,"length":590.0101694038841},{"x":618,"y":-123,"length":630.1214168713836},{"x":644,"y":-166,"length":665.0503740319225},{"x":669,"y":-224,"length":705.5047838250283},{"x":680,"y":-275,"length":733.501874571565},{"x":680,"y":-335,"length":758.0402363990977},{"x":680,"y":-400,"length":788.9233169326408},{"x":680,"y":-455,"length":818.1839646436491},{"x":680,"y":-520,"length":856.0373823613079},{"x":680,"y":-590,"length":900.2777349240622},{"x":680,"y":-655,"length":944.1530596253978},{"x":680,"y":-720,"length":990.3534722511957},{"x":680,"y":-780,"length":1034.7946656221222},{"x":680,"y":-850,"length":1088.5311203635843},{"x":680,"y":-910,"length":1136.001760562016},{"x":680,"y":-975,"length":1188.7072810410475},{"x":680,"y":-1040,"length":1242.5779653607253},{"x":680,"y":-1105,"length":1297.4686894102686},{"x":680,"y":-1175,"length":1357.5805685114972},{"x":680,"y":-1230,"length":1405.4536634126364},{"x":680,"y":-1285,"length":1453.83114562868},{"x":680,"y":-1325,"length":1489.3035284991438},{"x":674,"y":-1356,"length":1514.2694608292145},{"x":663,"y":-1383,"length":1533.707273243496},{"x":651,"y":-1407,"length":1550.306421324507},{"x":632,"y":-1430,"length":1563.4334012039017},{"x":609,"y":-1451,"length":1573.6206658531146},{"x":585,"y":-1468,"length":1580.2686480469072},{"x":555,"y":-1480,"length":1580.6406928837432},{"x":510,"y":-1490,"length":1574.8650735856706},{"x":435,"y":-1490,"length":1552.2000515397492},{"x":360,"y":-1490,"length":1532.8731193415847},{"x":280,"y":-1490,"length":1516.0804727981954},{"x":190,"y":-1490,"length":1502.0652449211386},{"x":105,"y":-1490,"length":1493.6950826724978},{"x":25,"y":-1490,"length":1490.2097167848558},{"x":-55,"y":-1490,"length":1491.0147551248444},{"x":-170,"y":-1490,"length":1499.6666296213969},{"x":-295,"y":-1490,"length":1518.9223153275482},{"x":-410,"y":-1490,"length":1545.3802121160993},{"x":-525,"y":-1490,"length":1579.7863779638055},{"x":-630,"y":-1490,"length":1617.7144370994529},{"x":-735,"y":-1490,"length":1661.422583209943},{"x":-840,"y":-1490,"length":1710.4677722775136},{"x":-930,"y":-1490,"length":1756.4168070250296},{"x":-1010,"y":-1490,"length":1800.0555546982432},{"x":-1103,"y":-1489,"length":1853.032649469512}],"rotation":0,"width":1796},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":178,"x":5380,"directed":false,"isPillar":false,"y":68,"thick":16,"direction":90,"snapToGrid":false,"vertices":[{"x":-1,"y":-3,"length":3.1622776601683795},{"x":47,"y":-2,"length":47.042533945356304},{"x":105,"y":-1,"length":105.00476179678711},{"x":165,"y":0,"length":165},{"x":195,"y":-5,"length":195.0640920313116},{"x":228,"y":-17,"length":228.63289352147035},{"x":255,"y":-34,"length":257.25668115716644},{"x":277,"y":-53,"length":282.0248216026384},{"x":297,"y":-78,"length":307.0716528760022},{"x":313,"y":-104,"length":329.82571155081285},{"x":324,"y":-133,"length":350.2356349659469},{"x":330,"y":-165,"length":368.9512162874653}],"rotation":0,"width":344},"className":"frg.game.editor.objects::BonesPather"},{"params":{"height":139,"x":4705,"directed":false,"isPillar":true,"y":440,"thick":128,"direction":90,"snapToGrid":false,"vertices":[{"x":-3,"y":1,"length":3.1622776601683795},{"x":3,"y":-24,"length":24.186773244895647},{"x":12,"y":-44,"length":45.60701700396552},{"x":26,"y":-65,"length":70.00714249274856},{"x":41,"y":-81,"length":90.78546139112804},{"x":59,"y":-98,"length":114.38968484964018},{"x":82,"y":-111,"length":138.00362314084367},{"x":107,"y":-120,"length":160.77624202599088},{"x":132,"y":-125,"length":181.79383927955314},{"x":165,"y":-125,"length":207.0024154448445},{"x":194,"y":-119,"length":227.58954281776656},{"x":219,"y":-110,"length":245.073458375239},{"x":248,"y":-92,"length":264.51464987784703},{"x":272,"y":-68,"length":280.3711825420009},{"x":289,"y":-43,"length":292.18145047213386},{"x":296,"y":-22,"length":296.8164415931166},{"x":302,"y":-2,"length":302.00662244394573}],"rotation":0,"width":318},"className":"frg.game.editor.objects::BonesPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4792,"smoothing":true,"y":321,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"type":2,"straightSides":true,"vertices":[{"x":3,"y":-3,"length":4.242640687119285},{"x":4,"y":-19,"length":19.4164878389476},{"x":8,"y":-33,"length":33.95585369269929},{"x":16,"y":-47,"length":49.64876634922564},{"x":27,"y":-58,"length":63.97655820689325},{"x":40,"y":-66,"length":77.17512552629896},{"x":55,"y":-69,"length":88.23831367382311},{"x":71,"y":-70,"length":99.70456358662827},{"x":87,"y":-66,"length":109.20164833920778},{"x":101,"y":-58,"length":116.46887996370532},{"x":112,"y":-47,"length":121.46192819151193},{"x":120,"y":-33,"length":124.45481107614924},{"x":124,"y":-20,"length":125.60254774486066},{"x":124,"y":-5,"length":124.10076550932311},{"x":122,"y":10,"length":122.40914998479485},{"x":115,"y":24,"length":117.47765745025733},{"x":103,"y":37,"length":109.4440496326776},{"x":93,"y":44,"length":102.88342918079665},{"x":82,"y":49,"length":95.524865872714},{"x":67,"y":52,"length":84.81155581640984},{"x":52,"y":51,"length":72.83543093852057},{"x":40,"y":47,"length":61.71709649683789},{"x":26,"y":39,"length":46.87216658103186},{"x":14,"y":28,"length":31.304951684997057},{"x":6,"y":13,"length":14.317821063276353},{"x":3,"y":-8,"length":8.54400374531753}],"originOffsetRatio":0,"textureMode":true,"stretchTexture":false,"repeatTexture":true,"textureOffset":0,"x":4791,"smoothing":true,"y":490,"width":134,"height":135,"wireframe":false,"snapToGrid":false,"rotation":0},"className":"frg.game.editor.objects::PillarPather"},{"params":{"height":1301,"x":6186,"y":-530,"rotation":0,"width":386},"className":"FinishZone"},{"params":{"height":13,"x":7650,"directed":false,"isPillar":false,"y":-1170,"thick":16,"direction":90,"snapToGrid":true,"vertices":[{"x":0,"y":-15,"length":15},{"x":-105,"y":-15,"length":106.06601717798213},{"x":-205,"y":-15,"length":205.54804791094466},{"x":-310,"y":-15,"length":310.3626910567699},{"x":-430,"y":-15,"length":430.2615483633182},{"x":-535,"y":-15,"length":535.2102390649865},{"x":-650,"y":-15,"length":650.1730538864249},{"x":-775,"y":-15,"length":775.1451476981586},{"x":-880,"y":-15,"length":880.1278316244749},{"x":-995,"y":-15,"length":995.1130589033589},{"x":-1100,"y":-15,"length":1100.1022679733007},{"x":-1205,"y":-15,"length":1205.0933573794189},{"x":-1315,"y":-15,"length":1315.0855485480783},{"x":-1420,"y":-15,"length":1420.0792231421458},{"x":-1500,"y":-15,"length":1500.0749981250938},{"x":-1575,"y":-15,"length":1575.0714269518064},{"x":-1660,"y":-15,"length":1660.0677697009842},{"x":-1735,"y":-15,"length":1735.064840286956},{"x":-1825,"y":-15,"length":1825.061642794566}],"rotation":0,"width":1838},"className":"frg.game.editor.objects::BonesPather"},{"params":{"layer":0,"vertices":[{"x":0,"y":-400,"length":400},{"x":100,"y":-400,"length":412.31056256176606},{"x":100,"y":100,"length":141.4213562373095},{"x":0,"y":100,"length":100}],"density":1,"safeId":-1,"physic":true,"rem":true,"rotation":0,"plr":false,"line":true,"x":-100,"isStatic":true,"id":-1,"isWheel":false,"ignore":false,"graphic":false,"y":290},"className":"frg.game.editor.objects::LandscapeShaper"}],[{"params":{"height":128.35,"x":3280,"y":-530,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":3990,"y":585,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":128.35,"x":5302,"y":566,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":95.5,"x":630,"y":342,"rotation":0,"scaleX":1,"scaleY":1,"width":80.2},"className":"Dec24"},{"params":{"height":128.35,"x":660,"y":331,"rotation":0,"scaleX":1,"scaleY":1,"width":9.3},"className":"SignPillar"},{"params":{"height":35.15,"x":663,"y":280,"rotation":0,"width":110.7},"className":"Sign15"},{"params":{"height":79.6,"x":4023,"y":615,"rotation":0,"scaleX":-1,"scaleY":1,"width":77.3},"className":"Dec23"},{"params":{"height":95.5,"x":5340,"y":584,"rotation":0,"scaleX":-1,"scaleY":1,"width":80.2},"className":"Dec24"}],[{"params":{"height":18,"x":3900,"y":-416,"rotation":0,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3900,"y":-290,"rotation":0,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3900,"y":-161,"rotation":0,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3827,"y":-226,"rotation":90.00000000000006,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3827,"y":-96,"rotation":90.00000000000006,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3827,"y":34,"rotation":90.00000000000006,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3900,"y":-31,"rotation":0,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3900,"y":89,"rotation":0,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3973,"y":-226,"rotation":90.00000000000006,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3973,"y":-96,"rotation":90.00000000000006,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":18,"x":3973,"y":34,"rotation":90.00000000000006,"safeId":1,"ttl":1,"width":132},"className":"GlassCrashed0"},{"params":{"height":99,"force":5000,"y":460,"rotation":0,"safeId":3,"x":7010,"time":6,"width":100},"className":"BoostE"}],null,[{"params":{"height":32,"x":370,"y":300,"rotation":0,"width":64},"className":"PlayerWP"},{"params":{"height":1454,"x":3280,"y":-600,"width":128,"id":1,"rotation":0},"className":"SafePointE"},{"params":{"height":843,"x":3990,"y":540,"width":128,"id":2,"rotation":0},"className":"SafePointE"},{"params":{"height":393,"x":5302,"y":500,"width":128,"id":3,"rotation":0},"className":"SafePointE"}],[{"params":{"safeId":2,"rotation":0,"rate":-50,"height":17,"x":4857,"id":5,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":311,"width":17},"className":"MotorJointE"},{"params":{"safeId":1,"rotation":0,"rate":-150,"height":17,"x":1503,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":118,"width":17},"className":"MotorJointE"},{"params":{"height":636,"hint":-1,"id":1,"rotation":0,"safeId":-1,"x":750,"off":false,"id_off":-1,"y":170,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":1,"rotation":0,"rate":-150,"height":17,"x":2673,"id":1,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":-312,"width":17},"className":"MotorJointE"},{"params":{"height":604,"hint":-1,"id":5,"rotation":0,"safeId":-1,"x":4110,"off":false,"id_off":-1,"y":410,"width":64,"sndId":-1},"className":"ToggleE"},{"params":{"safeId":2,"rotation":0,"rate":-50,"height":17,"x":4860,"id":5,"useWeld":false,"snd":false,"graphic":1,"time":0,"y":481,"width":17},"className":"MotorJointE"},{"params":{"height":17,"x":7530,"id":-1,"rotation":0,"safeId":3,"graphic":0,"y":540,"width":17},"className":"PivotJointE"},{"params":{"height":17,"x":6910,"id":-1,"rotation":0,"safeId":3,"graphic":0,"y":550,"width":17},"className":"PivotJointE"},{"params":{"height":604,"hint":-1,"id":5,"rotation":0,"safeId":-1,"x":3420,"off":false,"id_off":-1,"y":-580,"width":64,"sndId":-1},"className":"ToggleE"}]]} \ No newline at end of file diff --git a/assets/levels/map9.json b/assets/levels/map9.json new file mode 100644 index 0000000..101cf92 --- /dev/null +++ b/assets/levels/map9.json @@ -0,0 +1 @@ +{"layers":[[{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":3528,"vertices":[{"y":0,"x":0},{"y":-19,"x":20},{"y":-30,"x":45},{"y":-36,"x":70},{"y":-33,"x":99},{"y":-21,"x":125},{"y":-4,"x":145},{"y":15,"x":159},{"y":38,"x":166},{"y":65,"x":168},{"y":87,"x":165},{"y":111,"x":154},{"y":130,"x":136},{"y":144,"x":115},{"y":152,"x":87},{"y":151,"x":59},{"y":142,"x":30},{"y":125,"x":8},{"y":106,"x":-6},{"y":81,"x":-17},{"y":55,"x":-20},{"y":27,"x":-14}],"y":-496,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":true,"layer":3,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":2}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":3915,"vertices":[{"y":0,"x":0},{"y":-10,"x":25},{"y":-16,"x":53},{"y":-20,"x":86},{"y":-20,"x":118},{"y":-16,"x":150},{"y":-6,"x":183},{"y":9,"x":215},{"y":31,"x":246},{"y":56,"x":271},{"y":89,"x":297},{"y":115,"x":308},{"y":136,"x":316},{"y":174,"x":324},{"y":200,"x":326},{"y":229,"x":326},{"y":264,"x":320},{"y":296,"x":309},{"y":324,"x":293},{"y":352,"x":272},{"y":371,"x":255},{"y":390,"x":233},{"y":407,"x":209},{"y":418,"x":186},{"y":426,"x":161},{"y":431,"x":136},{"y":434,"x":107},{"y":433,"x":73},{"y":426,"x":42},{"y":417,"x":12},{"y":404,"x":-15},{"y":388,"x":-38},{"y":368,"x":-59},{"y":351,"x":-76},{"y":329,"x":-92},{"y":304,"x":-107},{"y":279,"x":-117},{"y":252,"x":-123},{"y":222,"x":-126},{"y":191,"x":-127},{"y":161,"x":-124},{"y":134,"x":-116},{"y":104,"x":-103},{"y":80,"x":-90},{"y":56,"x":-73},{"y":35,"x":-50},{"y":16,"x":-26}],"y":-319,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":true,"layer":3,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":2}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":3485,"vertices":[{"y":0,"x":0},{"y":-10,"x":25},{"y":-16,"x":53},{"y":-20,"x":86},{"y":-20,"x":118},{"y":-16,"x":150},{"y":-6,"x":183},{"y":9,"x":215},{"y":31,"x":246},{"y":56,"x":271},{"y":89,"x":297},{"y":115,"x":308},{"y":136,"x":316},{"y":174,"x":324},{"y":200,"x":326},{"y":229,"x":326},{"y":264,"x":320},{"y":296,"x":309},{"y":324,"x":293},{"y":352,"x":272},{"y":371,"x":255},{"y":390,"x":233},{"y":407,"x":209},{"y":418,"x":186},{"y":426,"x":161},{"y":431,"x":136},{"y":434,"x":107},{"y":433,"x":73},{"y":426,"x":42},{"y":417,"x":12},{"y":404,"x":-15},{"y":388,"x":-38},{"y":368,"x":-59},{"y":351,"x":-76},{"y":329,"x":-92},{"y":304,"x":-107},{"y":279,"x":-117},{"y":252,"x":-123},{"y":222,"x":-126},{"y":191,"x":-127},{"y":161,"x":-124},{"y":134,"x":-116},{"y":104,"x":-103},{"y":80,"x":-90},{"y":56,"x":-73},{"y":35,"x":-50},{"y":16,"x":-26}],"y":151,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":true,"layer":3,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":2}},{"className":"FinishZone","params":{"rotation":0,"x":4618,"height":364,"y":-443,"width":587}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":3335,"vertices":[{"y":-195,"x":0},{"y":-195,"x":-155},{"y":-595,"x":275},{"y":-595,"x":745},{"y":-215,"x":1105},{"y":-215,"x":970},{"y":350,"x":970},{"y":350,"x":990},{"y":820,"x":990},{"y":820,"x":780},{"y":-125,"x":780},{"y":-125,"x":0}],"y":-601,"isStatic":true,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":6,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":-1}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":300,"vertices":[{"y":-66,"x":13},{"y":-118,"x":24},{"y":-148,"x":40},{"y":-172,"x":61},{"y":-192,"x":81},{"y":-213,"x":107},{"y":-227,"x":134},{"y":-236,"x":165},{"y":-242,"x":200},{"y":-243,"x":235},{"y":-239,"x":267}],"y":20,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":193,"physic":true,"textureOffset":0,"id":-1,"width":269.8,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":590,"vertices":[{"y":0,"x":0},{"y":192,"x":235}],"y":203,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":206.7,"physic":true,"textureOffset":0,"id":-1,"width":248,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::PillarPather","params":{"stretchTexture":false,"x":380,"vertices":[{"y":0,"x":0},{"y":185,"x":220}],"y":206,"repeatTexture":true,"width":233,"rotation":0,"height":198,"textureOffset":0,"snapToGrid":true,"wireframe":false,"type":1,"smoothing":true,"textureMode":true,"straightSides":true,"originOffsetRatio":0}},{"className":"frg.game.editor.objects::PillarPather","params":{"stretchTexture":false,"x":160,"vertices":[{"y":0,"x":0},{"y":185,"x":220}],"y":206,"repeatTexture":true,"width":233,"rotation":0,"height":198,"textureOffset":0,"snapToGrid":true,"wireframe":false,"type":1,"smoothing":true,"textureMode":true,"straightSides":true,"originOffsetRatio":0}},{"className":"frg.game.editor.objects::GroundPather","params":{"x":-50,"physic":true,"y":390,"vertices":[{"y":0,"x":0},{"y":0,"x":6150},{"y":10,"x":10145}],"snapToGrid":true,"shape":true,"cameraOffsetY":170,"lineId":0,"textureMode":true,"straightSides":true,"direction":90,"originOffsetRatio":0,"stretchTexture":false,"directed":true,"repeatTexture":true,"width":10158,"rotation":0,"thick":128,"height":74,"textureOffset":0,"camera":true,"wireframe":false,"smoothing":true,"isRoad":true,"line":true}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":150,"vertices":[{"y":0,"x":0},{"y":0,"x":480}],"y":200,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":19,"physic":true,"textureOffset":0,"id":-1,"width":493,"snapToGrid":true,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":140,"vertices":[{"y":18,"x":14},{"y":-21,"x":9},{"y":-53,"x":8},{"y":-82,"x":12},{"y":-118,"x":24},{"y":-148,"x":40},{"y":-172,"x":61},{"y":-192,"x":81},{"y":-213,"x":107},{"y":-227,"x":134},{"y":-236,"x":165},{"y":-242,"x":200},{"y":-243,"x":235},{"y":-239,"x":267},{"y":-228,"x":301},{"y":-214,"x":329},{"y":-197,"x":353},{"y":-180,"x":374},{"y":-154,"x":393},{"y":-123,"x":412}],"y":190,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":277,"physic":true,"textureOffset":0,"id":-1,"width":421.6,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":1880,"vertices":[{"y":0,"x":0},{"y":38,"x":14},{"y":76,"x":32},{"y":104,"x":50},{"y":126,"x":75},{"y":145,"x":103},{"y":158,"x":130},{"y":165,"x":162},{"y":167,"x":204},{"y":162,"x":236},{"y":152,"x":265},{"y":134,"x":294},{"y":111,"x":317},{"y":82,"x":343},{"y":58,"x":370},{"y":36,"x":398},{"y":18,"x":430},{"y":5,"x":465},{"y":-3,"x":499},{"y":-8,"x":529},{"y":-9,"x":559},{"y":-8,"x":589},{"y":-3,"x":624},{"y":10,"x":668},{"y":29,"x":704},{"y":51,"x":744},{"y":86,"x":788},{"y":128,"x":848},{"y":162,"x":902},{"y":192,"x":964},{"y":217,"x":1025},{"y":239,"x":1096},{"y":252,"x":1160},{"y":262,"x":1225},{"y":267,"x":1296},{"y":266,"x":1398},{"y":258,"x":1465}],"y":-30,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":295,"physic":true,"textureOffset":0,"id":-1,"width":1480.4,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":825,"vertices":[{"y":0,"x":0},{"y":-6,"x":30},{"y":-17,"x":64},{"y":-35,"x":97},{"y":-60,"x":129},{"y":-83,"x":153},{"y":-114,"x":177},{"y":-152,"x":201},{"y":-197,"x":220},{"y":-240,"x":227},{"y":-278,"x":230},{"y":-318,"x":225},{"y":-363,"x":214},{"y":-398,"x":198},{"y":-435,"x":173},{"y":-471,"x":140},{"y":-497,"x":108},{"y":-514,"x":75},{"y":-526,"x":36},{"y":-535,"x":-5},{"y":-537,"x":-51},{"y":-531,"x":-90},{"y":-516,"x":-136},{"y":-494,"x":-176},{"y":-470,"x":-208},{"y":-437,"x":-240},{"y":-406,"x":-264},{"y":-365,"x":-284},{"y":-321,"x":-296},{"y":-274,"x":-299},{"y":-224,"x":-294},{"y":-182,"x":-285},{"y":-139,"x":-264}],"y":201,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":555.85,"physic":true,"textureOffset":0,"id":-1,"width":548.1,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":3335,"vertices":[{"y":-195,"x":-155},{"y":-595,"x":275},{"y":-595,"x":745},{"y":-200,"x":1120}],"y":-601,"isStatic":true,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":0,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":-1}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":3171,"vertices":[{"y":0,"x":0},{"y":-411,"x":437},{"y":-413,"x":911},{"y":-19,"x":1277}],"y":-792,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":429.4,"physic":false,"textureOffset":0,"id":-1,"width":1290.45,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":2565,"vertices":[{"y":-125,"x":965},{"y":820,"x":965},{"y":820,"x":780},{"y":-125,"x":780}],"y":-431,"isStatic":true,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":6,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":-1}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":1690,"vertices":[{"y":0,"x":0},{"y":-25,"x":38},{"y":-68,"x":71},{"y":-116,"x":97},{"y":-166,"x":117},{"y":-530,"x":220},{"y":-559,"x":234},{"y":-582,"x":251},{"y":-603,"x":272},{"y":-619,"x":297},{"y":-629,"x":337},{"y":-629,"x":369},{"y":-624,"x":409},{"y":-608,"x":449},{"y":-580,"x":484},{"y":-541,"x":528},{"y":-522,"x":568},{"y":-506,"x":608},{"y":-496,"x":656},{"y":-492,"x":704},{"y":-492,"x":756},{"y":-498,"x":797},{"y":-512,"x":843},{"y":-530,"x":886},{"y":-554,"x":929},{"y":-590,"x":974},{"y":-624,"x":1013},{"y":-657,"x":1055},{"y":-687,"x":1102},{"y":-713,"x":1148},{"y":-737,"x":1201},{"y":-756,"x":1251},{"y":-771,"x":1297},{"y":-785,"x":1349},{"y":-797,"x":1409},{"y":-803,"x":1458},{"y":-807,"x":1517},{"y":-809,"x":1579},{"y":-808,"x":1658}],"y":400,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":826.45,"physic":true,"textureOffset":0,"id":-1,"width":1671,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":1891,"vertices":[{"y":22,"x":-17},{"y":-5,"x":5},{"y":-31,"x":35},{"y":-50,"x":67},{"y":-62,"x":97},{"y":-75,"x":139},{"y":-76,"x":179},{"y":-73,"x":215},{"y":-65,"x":256},{"y":-49,"x":291},{"y":-32,"x":319},{"y":-8,"x":346},{"y":18,"x":371},{"y":48,"x":391},{"y":80,"x":405},{"y":121,"x":415},{"y":159,"x":419},{"y":194,"x":418},{"y":240,"x":408},{"y":272,"x":396},{"y":307,"x":374},{"y":329,"x":354},{"y":354,"x":329},{"y":376,"x":297},{"y":393,"x":258},{"y":403,"x":216},{"y":405,"x":174},{"y":401,"x":135},{"y":391,"x":96},{"y":374,"x":60},{"y":352,"x":29},{"y":325,"x":0},{"y":300,"x":-20},{"y":264,"x":-42},{"y":222,"x":-55},{"y":184,"x":-61},{"y":142,"x":-60},{"y":102,"x":-55},{"y":64,"x":-41}],"y":-210,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":true,"layer":3,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":2}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":2720,"vertices":[{"y":0,"x":0},{"y":-30,"x":30},{"y":-57,"x":61},{"y":-82,"x":96},{"y":-102,"x":138},{"y":-118,"x":180},{"y":-126,"x":222},{"y":-128,"x":274},{"y":-125,"x":325},{"y":-116,"x":368},{"y":-99,"x":412},{"y":-75,"x":455},{"y":-43,"x":495},{"y":-12,"x":528},{"y":26,"x":557},{"y":82,"x":588},{"y":121,"x":600},{"y":162,"x":608},{"y":212,"x":610},{"y":267,"x":608},{"y":315,"x":598},{"y":368,"x":577},{"y":408,"x":552},{"y":445,"x":520},{"y":477,"x":491},{"y":508,"x":450},{"y":532,"x":408},{"y":547,"x":361},{"y":556,"x":307},{"y":557,"x":257},{"y":551,"x":210},{"y":540,"x":158},{"y":521,"x":114},{"y":497,"x":76},{"y":470,"x":42},{"y":438,"x":9},{"y":408,"x":-16},{"y":377,"x":-35},{"y":345,"x":-50},{"y":307,"x":-62},{"y":256,"x":-71},{"y":211,"x":-73},{"y":163,"x":-71},{"y":121,"x":-61},{"y":81,"x":-46},{"y":43,"x":-28}],"y":-310,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":true,"layer":3,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":1,"safeId":2}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":4301,"vertices":[{"y":-445,"x":5},{"y":-585,"x":5},{"y":-590,"x":600},{"y":-445,"x":665}],"y":-52,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":0,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":0.2,"safeId":1}},{"className":"frg.game.editor.objects::DynamicPather","params":{"stretchTexture":false,"x":6100,"vertices":[{"y":0,"x":0},{"y":-28,"x":136},{"y":-58,"x":221},{"y":-100,"x":308},{"y":-145,"x":374},{"y":-205,"x":441},{"y":-267,"x":493},{"y":-346,"x":542},{"y":-405,"x":577},{"y":-481,"x":604},{"y":-569,"x":621},{"y":-641,"x":626},{"y":-715,"x":625},{"y":-775,"x":618},{"y":-836,"x":603},{"y":-900,"x":583},{"y":-972,"x":546},{"y":-1029,"x":510},{"y":-1083,"x":467},{"y":-1135,"x":416},{"y":-1180,"x":365},{"y":-1225,"x":299},{"y":-1260,"x":228},{"y":-1286,"x":152},{"y":-1299,"x":71},{"y":-1307,"x":-9},{"y":-1310,"x":-93},{"y":-1306,"x":-160}],"y":400,"originOffsetRatio":0,"repeatTexture":true,"isStatic":true,"rotation":0,"action":0,"height":1328.8,"physic":true,"textureOffset":0,"id":-1,"width":802,"snapToGrid":false,"graphic":true,"wireframe":false,"type":1,"shapeH":19,"safeId":-1,"textureMode":true,"straightSides":true,"smoothing":true,"density":"1"}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":4301,"vertices":[{"y":-315,"x":5},{"y":-445,"x":5},{"y":-445,"x":665},{"y":-315,"x":723}],"y":-52,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":0,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":0.2,"safeId":1}},{"className":"frg.game.editor.objects::LandscapeShaper","params":{"x":4301,"vertices":[{"y":-200,"x":5},{"y":-315,"x":5},{"y":-313,"x":724},{"y":-200,"x":775}],"y":-52,"isStatic":false,"rotation":0,"graphic":true,"physic":true,"plr":false,"layer":0,"isWheel":false,"line":true,"rem":true,"ignore":false,"id":-1,"density":0.2,"safeId":1}}],[{"className":"SignPillar","params":{"x":4540,"y":325,"scaleX":1,"width":9.3,"rotation":0,"scaleY":1,"height":128.35}},{"className":"SignPillar","params":{"x":3436,"y":-599,"scaleX":1,"width":9.3,"rotation":0,"scaleY":0.7039345539540319,"height":90.35}},{"className":"Dec14","params":{"x":120,"y":280,"scaleX":1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec14","params":{"x":1216,"y":280,"scaleX":-1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec15","params":{"x":1130,"y":270,"scaleX":1,"width":87.85,"rotation":0,"scaleY":1,"height":132.25}},{"className":"Dec14","params":{"x":2480,"y":280,"scaleX":1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec15","params":{"x":2540,"y":270,"scaleX":1,"width":87.85,"rotation":0,"scaleY":1,"height":132.25}},{"className":"Dec14","params":{"x":5540,"y":280,"scaleX":1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec16","params":{"x":5640,"y":280,"scaleX":1,"width":118.55,"rotation":6,"scaleY":1,"height":238.5}},{"className":"Dec15","params":{"x":6610,"y":280,"scaleX":1,"width":87.85,"rotation":0,"scaleY":1,"height":132.25}},{"className":"Dec14","params":{"x":6646,"y":280,"scaleX":-1,"width":264,"rotation":0,"scaleY":1,"height":331.2}},{"className":"Dec29","params":{"rotation":0,"x":4510,"height":82.25,"y":370,"width":63.15}}],[{"className":"GlassCrashed1","params":{"x":663,"y":200,"ttl":0.5,"width":66,"rotation":0,"height":18,"safeId":-1}},{"className":"GlassCrashed1","params":{"x":727,"y":200,"ttl":0.5,"width":66,"rotation":0,"height":18,"safeId":-1}},{"className":"GlassCrashed1","params":{"x":792,"y":200,"ttl":0.5,"width":66,"rotation":0,"height":18,"safeId":-1}},{"className":"GlassCrashed1","params":{"x":1482,"y":394,"ttl":0.5,"width":66,"rotation":-9,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1542,"y":376,"ttl":0.5,"width":66,"rotation":-23,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1597,"y":345,"ttl":0.5,"width":66,"rotation":-37,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1703,"y":192,"ttl":0.5,"width":66,"rotation":-74,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1679,"y":250,"ttl":0.5,"width":66,"rotation":-62,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1644,"y":302,"ttl":0.5,"width":66,"rotation":-48,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1816,"y":-166,"ttl":0.5,"width":66,"rotation":-69,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1796,"y":-107,"ttl":0.5,"width":66,"rotation":-73,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1778,"y":-49,"ttl":0.5,"width":66,"rotation":-73,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1723,"y":129,"ttl":0.5,"width":66,"rotation":-73,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1741,"y":71,"ttl":0.5,"width":66,"rotation":-73,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1759,"y":12,"ttl":0.5,"width":66,"rotation":-73,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1844,"y":-221,"ttl":0.5,"width":66,"rotation":-58,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1883,"y":-268,"ttl":0.5,"width":66,"rotation":-42.00000000000004,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1933,"y":-304,"ttl":0.5,"width":66,"rotation":-30.000000000000043,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":1990,"y":-328,"ttl":0.5,"width":66,"rotation":-14.000000000000043,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2050,"y":-335,"ttl":0.5,"width":66,"rotation":-4.285460875053104e-14,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2113,"y":-329,"ttl":0.5,"width":66,"rotation":9.999999999999957,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2169,"y":-309,"ttl":0.5,"width":66,"rotation":28.999999999999968,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2221,"y":-275,"ttl":0.5,"width":66,"rotation":37.99999999999997,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2271,"y":-239,"ttl":0.5,"width":66,"rotation":33.99999999999997,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2327,"y":-212,"ttl":0.5,"width":66,"rotation":16.99999999999997,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2388,"y":-200,"ttl":0.5,"width":66,"rotation":3.999999999999972,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2713,"y":-366,"ttl":0.5,"width":66,"rotation":-35.00000000000003,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2451,"y":-202,"ttl":0.5,"width":66,"rotation":-8.000000000000028,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2511,"y":-218,"ttl":0.5,"width":66,"rotation":-22.000000000000036,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2566,"y":-247,"ttl":0.5,"width":66,"rotation":-36.000000000000036,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2615,"y":-287,"ttl":0.5,"width":66,"rotation":-43.00000000000003,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2663,"y":-329,"ttl":0.5,"width":66,"rotation":-39.00000000000002,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2766,"y":-401,"ttl":0.5,"width":66,"rotation":-31.00000000000003,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2821,"y":-431,"ttl":0.5,"width":66,"rotation":-27.000000000000025,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2878,"y":-458,"ttl":0.5,"width":66,"rotation":-23.000000000000025,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":2938,"y":-480,"ttl":0.5,"width":66,"rotation":-19.000000000000025,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":3000,"y":-499,"ttl":0.5,"width":66,"rotation":-15.000000000000025,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":3063,"y":-513,"ttl":0.5,"width":66,"rotation":-11.000000000000023,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":3125,"y":-524,"ttl":0.5,"width":66,"rotation":-9.000000000000021,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":3188,"y":-533,"ttl":0.5,"width":66,"rotation":-7.000000000000019,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":3251,"y":-540,"ttl":0.5,"width":66,"rotation":-5.000000000000017,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":3313,"y":-544,"ttl":0.5,"width":66,"rotation":-3.000000000000017,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3659,"y":-546,"ttl":1,"width":132,"rotation":0,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3789,"y":-546,"ttl":1,"width":132,"rotation":0,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3919,"y":-546,"ttl":1,"width":132,"rotation":0,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":4049,"y":-546,"ttl":1,"width":132,"rotation":0,"height":18,"safeId":2}},{"className":"GlassCrashed1","params":{"x":3561,"y":-547,"ttl":1,"width":66,"rotation":0,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":4056,"y":-414,"ttl":1,"width":132,"rotation":-27,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3940,"y":-354,"ttl":1,"width":132,"rotation":-27,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3824,"y":-295,"ttl":1,"width":132,"rotation":-27,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3708,"y":-236,"ttl":1,"width":132,"rotation":-27,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3593,"y":-206,"ttl":1,"width":132,"rotation":0,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3572,"y":43,"ttl":0.7,"width":132,"rotation":36,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3678,"y":119,"ttl":0.7,"width":132,"rotation":36,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3784,"y":195,"ttl":0.7,"width":132,"rotation":36,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3889,"y":271,"ttl":0.7,"width":132,"rotation":36,"height":18,"safeId":2}},{"className":"GlassCrashed0","params":{"x":3995,"y":348,"ttl":0.7,"width":132,"rotation":36,"height":18,"safeId":2}},{"className":"Removed0","params":{"x":4176,"id":-1,"type":0,"y":296,"safeId":2,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4276,"id":-1,"type":0,"y":256,"safeId":2,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4246,"id":-1,"type":0,"y":296,"safeId":2,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4176,"id":-1,"type":0,"y":306,"safeId":2,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4276,"id":-1,"type":0,"y":356,"safeId":2,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4246,"id":-1,"type":0,"y":306,"safeId":2,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4211,"id":-1,"type":0,"y":356,"safeId":2,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4146,"id":-1,"type":0,"y":256,"safeId":2,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4176,"id":-1,"type":0,"y":316,"safeId":2,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4211,"id":-1,"type":0,"y":256,"safeId":2,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4146,"id":-1,"type":0,"y":356,"safeId":2,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4246,"id":-1,"type":0,"y":316,"safeId":2,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":356,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":356,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":356,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":316,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":316,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":276,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":276,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":276,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":236,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":236,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":196,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":196,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":196,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":156,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":156,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":116,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":116,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":116,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":76,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":76,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":36,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":36,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":36,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":-4,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":-4,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":-44,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":-44,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":-44,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":-84,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":-84,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":-124,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":-124,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":-124,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":-164,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":-164,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":4906,"id":-1,"type":0,"y":-204,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4971,"id":-1,"type":0,"y":-204,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":5036,"id":-1,"type":0,"y":-204,"safeId":1,"width":12.3,"rotation":0,"active":true,"height":72}},{"className":"Removed0","params":{"x":4936,"id":-1,"type":0,"y":-244,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"Removed0","params":{"x":5006,"id":-1,"type":0,"y":-244,"safeId":1,"width":12.3,"rotation":90.00000000000006,"active":true,"height":72}},{"className":"BoostE","params":{"x":6660,"y":-260,"safeId":1,"width":100,"rotation":0,"height":99,"time":2,"force":5000}}],null,[{"className":"PlayerWP","params":{"rotation":0,"x":300,"height":32,"y":110,"width":64}},{"className":"SafePointE","params":{"x":4540,"id":1,"y":250,"width":128,"rotation":0,"height":645}},{"className":"SafePointE","params":{"x":3440,"id":2,"y":-640,"width":128,"rotation":0,"height":248}}],[{"className":"MotorJointE","params":{"x":3603,"useWeld":false,"y":-437,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":3,"safeId":2,"snd":false,"rate":180}},{"className":"MotorJointE","params":{"x":4015,"useWeld":false,"y":-112,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":3,"safeId":2,"snd":false,"rate":-180}},{"className":"MotorJointE","params":{"x":3585,"useWeld":false,"y":358,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":3,"safeId":2,"snd":false,"rate":180}},{"className":"MotorJointE","params":{"x":2070,"useWeld":false,"y":-45,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":3,"safeId":2,"snd":false,"rate":180}},{"className":"MotorJointE","params":{"x":2990,"useWeld":false,"y":-95,"width":17,"rotation":0,"graphic":1,"height":17,"time":0,"id":3,"safeId":2,"snd":false,"rate":-80}},{"className":"ToggleE","params":{"x":590,"sndId":-1,"y":100,"safeId":-1,"width":64,"rotation":0,"off":false,"id":3,"height":229,"hint":-1,"id_off":-1}},{"className":"ToggleE","params":{"x":3440,"sndId":-1,"y":-550,"safeId":2,"width":151,"rotation":0,"off":false,"id":3,"height":64,"hint":-1,"id_off":-1}}]],"settings":{"theme":3,"countdown":0,"gravityY":500,"prizes":"26,36,47"}} \ No newline at end of file diff --git a/assets/levels/menu_skeleton.json b/assets/levels/menu_skeleton.json new file mode 100644 index 0000000..2b950a8 --- /dev/null +++ b/assets/levels/menu_skeleton.json @@ -0,0 +1 @@ +{"frameRate":24,"name":"menu anim","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":"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_01","transform":{"x":-10.2,"y":-13.75,"skX":11.71,"skY":11.71,"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":"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":"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_01","parent":"hand_01"},{"name":"hand 2","parent":"hand 2"},{"name":"head","parent":"head"}],"skin":[{"slot":[{"name":"back","display":[{"name":"back-123123","transform":{"x":44.4,"y":-11.3}}]},{"name":"road","display":[{"name":"ass","transform":{"x":-56,"y":-112.95}}]},{"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":0.25,"y":2.9}}]},{"name":"body_01","display":[{"name":"body-01","transform":{"x":0.25,"y":0.05}}]},{"name":"leg_01","display":[{"name":"leg_01","transform":{"x":6.3,"y":4.3}}]},{"name":"leg_02","display":[{"name":"leg_02","transform":{"x":2.2,"y":-13.6}}]},{"name":"hand_01","display":[{"name":"hand_01","transform":{"x":3.6,"y":3.8}}]},{"name":"hand 2","display":[{"name":"hand)92","transform":{"x":-1.55,"y":-0.2}}]},{"name":"head","display":[{"name":"head","transform":{"x":6.95,"y":-8.05}}]}]}],"animation":[{"duration":170,"fadeInTime":0.3,"name":"biker menu animation","frame":[{"duration":169},{}],"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":164,"tweenEasing":0,"x":-34.65,"y":-2.75},{"tweenEasing":0,"x":-214,"y":-1.45}],"scaleFrame":[{"duration":170}]},{"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":370.49,"y":-138.37}],"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":98.19}],"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":309.02,"y":-160.9},{"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":108.62},{"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_01","translateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":87.34,"y":-1.07},{"duration":7,"tweenEasing":0,"x":135.59,"y":-34},{"duration":9,"tweenEasing":0,"x":265.15,"y":-118.31},{"duration":142,"tweenEasing":1,"x":326.99,"y":-146.33},{"tweenEasing":0,"x":377.91,"y":-124.94}],"rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-10.21},{"duration":7,"tweenEasing":0,"rotate":-30.22},{"duration":9,"tweenEasing":0,"rotate":-2.24},{"duration":142,"tweenEasing":1,"rotate":14.47},{"tweenEasing":0,"rotate":29.47}],"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.209,"y":1.209},{"duration":142,"tweenEasing":1,"x":1.6171,"y":1.6171},{"tweenEasing":0,"x":1.5796,"y":1.5796}]},{"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":"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}]}]}]},{"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 copy","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/assets/levels/menu_texture.json b/assets/levels/menu_texture.json new file mode 100644 index 0000000..3a4d980 --- /dev/null +++ b/assets/levels/menu_texture.json @@ -0,0 +1 @@ +{"imagePath":"menu_texture.png","name":"menu anim","SubTexture":[{"height":274,"name":"back-123123","x":0,"y":0,"width":666},{"height":289,"name":"ass","x":667,"y":0,"width":284},{"height":46,"name":"bike_body_01","x":0,"y":275,"width":86},{"height":28,"name":"body-01","x":997,"y":32,"width":18},{"height":11,"name":"leg_01","x":997,"y":70,"width":18},{"height":31,"name":"leg_02","x":997,"y":0,"width":16},{"height":14,"name":"hand_01","x":997,"y":82,"width":15},{"height":8,"name":"hand)92","x":997,"y":61,"width":21},{"height":29,"name":"head","x":953,"y":88,"width":34},{"height":43,"name":"moto_wheel_01","x":953,"y":44,"width":43},{"height":43,"name":"moto_wheel_01 copy","x":953,"y":0,"width":43}]} \ No newline at end of file diff --git a/assets/levels/objects.json b/assets/levels/objects.json new file mode 100644 index 0000000..ea5ab15 --- /dev/null +++ b/assets/levels/objects.json @@ -0,0 +1,491 @@ +{ + "point1": { + "x": 40, + "y": 233 + }, + "point24": { + "x": 672, + "y": 192 + }, + "point23": { + "x": 672, + "y": 107 + }, + "point18": { + "x": 502, + "y": 188 + }, + "point17": { + "x": 487, + "y": 99 + }, + "point16": { + "x": 399, + "y": 75 + }, + "point8": { + "x": 276, + "y": 317 + }, + "point20": { + "x": 643, + "y": 325 + }, + "point19": { + "x": 564, + "y": 330 + }, + "point15": { + "x": 425, + "y": 301 + }, + "point13": { + "x": 348, + "y": 317 + }, + "point14": { + "x": 462, + "y": 374 + }, + "point21": { + "x": 581, + "y": 196 + }, + "point22": { + "x": 550, + "y": 99 + }, + "point12": { + "x": 356, + "y": 216 + }, + "point11": { + "x": 333, + "y": 117 + }, + "point10": { + "x": 262, + "y": 40 + }, + "point9": { + "x": 271, + "y": 188 + }, + "point7": { + "x": 199, + "y": 360 + }, + "point6": { + "x": 208, + "y": 251 + }, + "point5": { + "x": 183, + "y": 127 + }, + "point4": { + "x": 105, + "y": 90 + }, + "point3": { + "x": 128, + "y": 216 + }, + "point2": { + "x": 92, + "y": 360 + }, + "point0": { + "x": 49, + "y": 141 + }, + "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": 46, + "y": 16, + "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": 46, + "y": 16, + "r": 63.00018310546875, + "g": "suspend_front5" + }, + "base": { + "x": 0, + "y": 0, + "r": 0, + "g": "bike_5_base" + }, + "suspend_back": { + "x": -6, + "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 + }, + "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/assets/sound/accel01.ogg b/assets/sound/accel01.ogg new file mode 100644 index 0000000..8c9c843 Binary files /dev/null and b/assets/sound/accel01.ogg differ diff --git a/assets/sound/accel02.ogg b/assets/sound/accel02.ogg new file mode 100644 index 0000000..024c9ab Binary files /dev/null and b/assets/sound/accel02.ogg differ diff --git a/assets/sound/accel03.ogg b/assets/sound/accel03.ogg new file mode 100644 index 0000000..d5cc4e1 Binary files /dev/null and b/assets/sound/accel03.ogg differ diff --git a/assets/sound/accel04.ogg b/assets/sound/accel04.ogg new file mode 100644 index 0000000..dee14a6 Binary files /dev/null and b/assets/sound/accel04.ogg differ diff --git a/assets/sound/barrel_hit0.ogg b/assets/sound/barrel_hit0.ogg new file mode 100644 index 0000000..8f2bfb8 Binary files /dev/null and b/assets/sound/barrel_hit0.ogg differ diff --git a/assets/sound/barrel_hit1.ogg b/assets/sound/barrel_hit1.ogg new file mode 100644 index 0000000..528c602 Binary files /dev/null and b/assets/sound/barrel_hit1.ogg differ diff --git a/assets/sound/boost.ogg b/assets/sound/boost.ogg new file mode 100644 index 0000000..8530e1c Binary files /dev/null and b/assets/sound/boost.ogg differ diff --git a/assets/sound/button.ogg b/assets/sound/button.ogg new file mode 100644 index 0000000..593443d Binary files /dev/null and b/assets/sound/button.ogg differ diff --git a/assets/sound/dead_01.ogg b/assets/sound/dead_01.ogg new file mode 100644 index 0000000..3b9a7e6 Binary files /dev/null and b/assets/sound/dead_01.ogg differ diff --git a/assets/sound/dead_02.ogg b/assets/sound/dead_02.ogg new file mode 100644 index 0000000..9d99b29 Binary files /dev/null and b/assets/sound/dead_02.ogg differ diff --git a/assets/sound/dead_03.ogg b/assets/sound/dead_03.ogg new file mode 100644 index 0000000..5c2dcac Binary files /dev/null and b/assets/sound/dead_03.ogg differ diff --git a/assets/sound/dead_04.ogg b/assets/sound/dead_04.ogg new file mode 100644 index 0000000..ecadd4a Binary files /dev/null and b/assets/sound/dead_04.ogg differ diff --git a/assets/sound/dead_05.ogg b/assets/sound/dead_05.ogg new file mode 100644 index 0000000..0d9b581 Binary files /dev/null and b/assets/sound/dead_05.ogg differ diff --git a/assets/sound/dead_06.ogg b/assets/sound/dead_06.ogg new file mode 100644 index 0000000..4fda09b Binary files /dev/null and b/assets/sound/dead_06.ogg differ diff --git a/assets/sound/driver_spikes.ogg b/assets/sound/driver_spikes.ogg new file mode 100644 index 0000000..545b5f7 Binary files /dev/null and b/assets/sound/driver_spikes.ogg differ diff --git a/assets/sound/eng_loop.ogg b/assets/sound/eng_loop.ogg new file mode 100644 index 0000000..237790e Binary files /dev/null and b/assets/sound/eng_loop.ogg differ diff --git a/assets/sound/engine_finish.ogg b/assets/sound/engine_finish.ogg new file mode 100644 index 0000000..35ebe58 Binary files /dev/null and b/assets/sound/engine_finish.ogg differ diff --git a/assets/sound/engine_start.ogg b/assets/sound/engine_start.ogg new file mode 100644 index 0000000..981543e Binary files /dev/null and b/assets/sound/engine_start.ogg differ diff --git a/assets/sound/explode1.ogg b/assets/sound/explode1.ogg new file mode 100644 index 0000000..b5ca1fe Binary files /dev/null and b/assets/sound/explode1.ogg differ diff --git a/assets/sound/explode2.ogg b/assets/sound/explode2.ogg new file mode 100644 index 0000000..fdd1897 Binary files /dev/null and b/assets/sound/explode2.ogg differ diff --git a/assets/sound/flip_01.ogg b/assets/sound/flip_01.ogg new file mode 100644 index 0000000..3d343b5 Binary files /dev/null and b/assets/sound/flip_01.ogg differ diff --git a/assets/sound/flip_02.ogg b/assets/sound/flip_02.ogg new file mode 100644 index 0000000..403b862 Binary files /dev/null and b/assets/sound/flip_02.ogg differ diff --git a/assets/sound/flip_03.ogg b/assets/sound/flip_03.ogg new file mode 100644 index 0000000..edff250 Binary files /dev/null and b/assets/sound/flip_03.ogg differ diff --git a/assets/sound/flip_04.ogg b/assets/sound/flip_04.ogg new file mode 100644 index 0000000..9ce8000 Binary files /dev/null and b/assets/sound/flip_04.ogg differ diff --git a/assets/sound/flip_05.ogg b/assets/sound/flip_05.ogg new file mode 100644 index 0000000..d6c343d Binary files /dev/null and b/assets/sound/flip_05.ogg differ diff --git a/assets/sound/flip_06.ogg b/assets/sound/flip_06.ogg new file mode 100644 index 0000000..5a7977a Binary files /dev/null and b/assets/sound/flip_06.ogg differ diff --git a/assets/sound/fly_01.ogg b/assets/sound/fly_01.ogg new file mode 100644 index 0000000..59e8d56 Binary files /dev/null and b/assets/sound/fly_01.ogg differ diff --git a/assets/sound/fly_02.ogg b/assets/sound/fly_02.ogg new file mode 100644 index 0000000..396ffb8 Binary files /dev/null and b/assets/sound/fly_02.ogg differ diff --git a/assets/sound/fly_03.ogg b/assets/sound/fly_03.ogg new file mode 100644 index 0000000..dffae88 Binary files /dev/null and b/assets/sound/fly_03.ogg differ diff --git a/assets/sound/game_track.ogg b/assets/sound/game_track.ogg new file mode 100644 index 0000000..bbab475 Binary files /dev/null and b/assets/sound/game_track.ogg differ diff --git a/assets/sound/glass_crash.ogg b/assets/sound/glass_crash.ogg new file mode 100644 index 0000000..9571a77 Binary files /dev/null and b/assets/sound/glass_crash.ogg differ diff --git a/assets/sound/landing.ogg b/assets/sound/landing.ogg new file mode 100644 index 0000000..c29ea0f Binary files /dev/null and b/assets/sound/landing.ogg differ diff --git a/assets/sound/menu_track_1.ogg b/assets/sound/menu_track_1.ogg new file mode 100644 index 0000000..a272e79 Binary files /dev/null and b/assets/sound/menu_track_1.ogg differ diff --git a/assets/sound/motor.ogg b/assets/sound/motor.ogg new file mode 100644 index 0000000..78de3ec Binary files /dev/null and b/assets/sound/motor.ogg differ diff --git a/assets/sound/safepoint.ogg b/assets/sound/safepoint.ogg new file mode 100644 index 0000000..4a98d98 Binary files /dev/null and b/assets/sound/safepoint.ogg differ diff --git a/assets/sound/stones.ogg b/assets/sound/stones.ogg new file mode 100644 index 0000000..5eb4f2f Binary files /dev/null and b/assets/sound/stones.ogg differ diff --git a/assets/sound/wendy.ogg b/assets/sound/wendy.ogg new file mode 100644 index 0000000..ae0db2a Binary files /dev/null and b/assets/sound/wendy.ogg differ diff --git a/assets/sound/wood_hit0.ogg b/assets/sound/wood_hit0.ogg new file mode 100644 index 0000000..a26e3d5 Binary files /dev/null and b/assets/sound/wood_hit0.ogg differ diff --git a/download.jpeg b/download.jpeg new file mode 100644 index 0000000..3a02f92 Binary files /dev/null and b/download.jpeg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..6960fbe --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ + + + + MotoX3M Winter + + + + + + + + + + + + + \ No newline at end of file diff --git a/motox3m.min.js b/motox3m.min.js new file mode 100644 index 0000000..4d6c894 --- /dev/null +++ b/motox3m.min.js @@ -0,0 +1,778 @@ +!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(40);e.Drawing=n.Drawing;var o=i(18);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(41);e.GamePhysics=p.GamePhysics;var f=i(42);e.NapePhysics=f.NapePhysics;var y=i(71);e.GameView=y.GameView;var g=i(31);e.RaceCamera=g.RaceCamera;var m=i(32);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(34);e.GameData=I.GameData;var M=i(33);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 D=i(88);e.FrameGraphic=D.FrameGraphic;var L=i(46);e.GroundPartClip=L.GroundPartClip;var k=i(45);e.SmokePartClip=k.SmokePartClip;var F=i(89);e.TrailPart=F.TrailPart;var G=i(90);e.WheelGraphic=G.WheelGraphic;var U=i(91);e.BgEl=U.BgEl;var N=i(92);e.LandscapeShape=N.LandscapeShape;var j=i(47);e.CarObject=j.CarObject;var W=i(93);e.BikeObject=W.BikeObject;var X=i(94);e.CorpseObject=X.CorpseObject;var H=i(95);e.DriverObject=H.DriverObject;var V=i(96);e.FrameObject=V.FrameObject;var Y=i(97);e.PartObject=Y.PartObject;var q=i(98);e.WheelObject=q.WheelObject;var z=i(99);e.BgObject=z.BgObject;var K=i(100);e.DecorActObject=K.DecorActObject;var J=i(101);e.DecorMultiObject=J.DecorMultiObject;var Z=i(48);e.DecorObject=Z.DecorObject;var Q=i(102);e.VectorDecor=Q.VectorDecor;var $=i(38);e.CarExplodeObject=$.CarExplodeObject;var tt=i(103);e.GlassExplodeObject=tt.GlassExplodeObject;var et=i(37);e.TrailParticlesSystem=et.TrailParticlesSystem;var it=i(44);e.TrailPartObject=it.TrailPartObject;var st=i(104);e.GlassBlock=st.GlassBlock;var nt=i(49);e.GlassBlockPart=nt.GlassBlockPart;var ot=i(105);e.GroundObject=ot.GroundObject;var at=i(106);e.PlankObject=at.PlankObject;var rt=i(107);e.ShaperObject=rt.ShaperObject;var ht=i(108);e.WaterObject=ht.WaterObject;var lt=i(110);e.BoostObject=lt.BoostObject;var ct=i(51);e.DynamicBodyObject=ct.DynamicBodyObject;var ut=i(111);e.FinishObject=ut.FinishObject;var dt=i(112);e.MotorObject=dt.MotorObject;var pt=i(113);e.MoverPatherObject=pt.MoverPatherObject;var ft=i(114);e.PivotObject=ft.PivotObject;var yt=i(115);e.RemovedBodyObjects=yt.RemovedBodyObjects;var gt=i(116);e.SafePointObject=gt.SafePointObject;var mt=i(117);e.SpikesObject=mt.SpikesObject;var vt=i(118);e.TntObject=vt.TntObject;var bt=i(119);e.ToggleObject=bt.ToggleObject;var xt=i(120);e.CameraZone=xt.CameraZone;var _t=i(121);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(9);e.Materials=Tt.Materials;var St=i(122);e.MaxPhysics=St.MaxPhysics;var At=i(123);e.BodyEffector=At.BodyEffector;var Et=i(124);e.BoostEffector=Et.BoostEffector;var It=i(125);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(35),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","RoadLine0_7","RoadLine0_8","LineSpike0","UnLine0","UnLine1","LineChain","CandyGround","RoadLine0_Bg"]],t.PILLAR_LINE=[["RoadPillar0_0","CandyPillar","RoadPillar0_2"]],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=[["Dec1","Dec2","Dec3","Dec4","Dec5","Dec6","Dec7","Dec8","Dec9","Dec10","Dec11","Dec12","Dec13","Dec14","Dec15","Dec16","Dec17","Dec18","Dec19","Dec29","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"],["Dec1","Dec2","Dec3","Dec4","Dec5","Dec6","Dec7","Dec8","Dec9","Dec10","Dec11","Dec12","Dec13","Dec14","Dec15","Dec16","Dec17","Dec18","Dec19","Dec29","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"],["Dec13","Dec14","Dec15","Dec16","Dec29","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","PlankCandy","PlankBone"],["Tnt1","BarrelE","SpikesE","Removed0","Removed1","Plank0","GlassCrashed0","GlassCrashed1","BoostE","PlankCandy","PlankBone"],["Tnt1","BarrelE","SpikesE","Removed0","Removed1","Plank0","GlassCrashed0","GlassCrashed1","BoostE","PlankCandy","PlankBone"]],t.FRAMES_ANCHORX=[.48,null,.458,null,.594],t.FRAMES_ANCHORY=[.65,null,.629,null,.647],t.SUSPEND_BACK_ANCHORX=[.05,null,.05,null,-.06],t.SUSPEND_BACK_ANCHORY=[.5,null,.5,null,.5],t.SUSPEND_FRONT_ANCHORX=[.8,null,.8,null,.904],t.SUSPEND_FRONT_ANCHORY=[.2,null,.5,null,.478],t.HEAD_ANCHORX=[.5,null,.394,null,.603],t.HEAD_ANCHORY=[.5,null,.518,null,.372],t.HIP_ANCHORX=[.5,null,.545,null,.571],t.HIP_ANCHORY=[.5,null,.5,null,.5],t.SHIN_ANCHORX=[.5,null,.388,null,.409],t.SHIN_ANCHORY=[.5,null,.516,null,.448],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]):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,a){var r=new o.LandscapeShape(e,i,a),h=0;r.x=e.params.x-i,r.y=e.params.y-a;var l=null;l="RoadTile0_1";var c=e.params.layer;1===c?l="tile_bg":2===c?l="tile":3===c?l="tile_saw":4===c?l="tile_rivet":5===c?l="tile_rivet_bg":6===c&&(l="tile_stone");var u=e.params.vertices,d,p=null;0===c?p="RoadLine0_4":1===c?(l="tile_bg",p="RoadLine0_Bg"):2===c?!0===e.params.line&&(p="line"):3===c?p="UnLine0":4===c?p="line_rivet":5===c||6===c&&(p="line_stone_shape");var f=new Array;(Math.abs(u[0].x-u[u.length-1].x)>4||Math.abs(u[0].y-u[u.length-1].y)>4)&&(d=new n.Point(.5*(u[0].x+u[u.length-1].x)+i,.5*(u[0].y+u[u.length-1].y)+a),f[0]=d);var y=new n.Graphics(this.game,0,0);r.addChildAt(y,0);var g=new n.Point(115e3,115e3),m=u[0];y.beginFill(16776960,.5),y.moveTo(m.x+i,m.y+a);var v=u.length,b=0;for(b=0;bMath.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=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){"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){(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(17),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),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.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.tint=16777215):(this.btn.tint=10066329,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;ithis.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=i(6),n=nape.constraint.PivotJoint,o=nape.geom.GeomPoly,a=nape.geom.GeomPolyList,r=nape.geom.Vec2,h=nape.phys.Body,l=nape.phys.BodyList,c=nape.phys.BodyType,u=nape.shape.Circle,d=nape.shape.Polygon,p=function(){function t(){}return t.disposeBody=function(e){t.clearUserData(e),e.cbTypes.clear(),e.compound?e.compound=null:e.space=null},t.stopBody=function(t,e){void 0===e&&(e=!0),t.type===c.DYNAMIC&&(t.torque=0),t.velocity.x=0,t.velocity.y=0,t.angularVel=0,e||(t.allowMovement=t.allowRotation=e)},t.setupStartPos=function(t){t.userData.sx=t.position.x,t.userData.sy=t.position.y,t.userData.sr=t.rotation},t.resetStartPos=function(t){t.position.x=t.userData.sx,t.position.y=t.userData.sy,t.rotation=t.userData.sr},t.clearUserData=function(t){for(var e in t.userData)t.userData.hasOwnProperty(e)&&(t.userData[e]=null)},t.createRectBody=function(e,i,n,o,a,r){void 0===a&&(a=null),void 0===r&&(r=null);var h=new d(d.box(o.width,o.height,!0),r,i);h.sensorEnabled=n;var l=t.createBody(e,o.x,o.y,s.default.TO_RAD*o.rotation,a);return l.shapes.add(h),l},t.createRectBodyWH=function(e,i,s,n,o,a,r,h,l,c){void 0===a&&(a=0),void 0===r&&(r=0),void 0===h&&(h=0),void 0===l&&(l=null),void 0===c&&(c=null);var u=new d(d.box(n,o,!0),c,i);u.sensorEnabled=s;var p=t.createBody(e,a,r,h,l);return p.shapes.add(u),p},t.createRegularBody=function(e,i,s,n,o,a,r,h,l,c,u){void 0===r&&(r=0),void 0===h&&(h=0),void 0===l&&(l=0),void 0===c&&(c=null),void 0===u&&(u=null);var p=new d(d.regular(.5*n,.5*o,a,0,!0),u,i);p.sensorEnabled=s;var f=t.createBody(e,r,h,l,c);return f.shapes.add(p),f},t.createBody=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=null);var o=new h(t,r.weak(e,i));return o.rotation=s,null!=n&&o.cbTypes.add(n),o},t.createCircleBody=function(e,i,s,n,o,a,r,h,l){void 0===o&&(o=0),void 0===a&&(a=0),void 0===r&&(r=0),void 0===h&&(h=null),void 0===l&&(l=null);var c=new u(n,null,l,i);c.sensorEnabled=s;var d=t.createBody(e,o,a,r,h);return null!=h&&d.cbTypes.add(h),d.shapes.add(c),d},t.bodiesInCircle=function(e,i,s,n,o){return void 0===n&&(n=!1),void 0===o&&(o=null),t.bodyList.clear(),e.bodiesInCircle(i,s,n,o,t.bodyList),t.bodyList},t.bodiesUnderPoint=function(e,i,s){return void 0===s&&(s=null),t.bodyList.clear(),e.bodiesUnderPoint(i,s,t.bodyList),t.bodyList},t.createPolyBody=function(e,i,s,n){var a,l;e instanceof Array?(l=e,a=new h(n)):(l=e.vertices,a=new h(n,r.weak(e.x,e.y)));for(var c=l.length,u=[],p=0;p0&&(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=3===t,h=5===t;r||(s="Wheel0",this.parseStaticGraphic(i,s),s="Wheel1",this.parseStaticGraphic(i,s)),s="suspend_back",this.parseStaticGraphic(i,s),h&&(s="suspend_front",this.parseStaticGraphic(i,s)),s="base",this.parseStaticGraphic(i,s),r&&(s="Wheel0",this.parseStaticGraphic(i,s),s="Wheel1",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),h||(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 l="EQUIPPED";e.carList[e.currCar]!==g.Inventory.instance.skin&&(l="EQUIP IT"),this.changeBike=new n.default(this.game,l,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 c=new v.default(this.game,0,15,this.getPrice(),a.default.styleMoney);if("FREE"===this.getPrice())c.anchor.set(.5);else{c.anchor.set(1.05,.5);var u=this.game.add.sprite(0,15,o.default.Garage,"w_star0000");u.anchor.set(.15,.5),this.priceTxt.label.parent.addChild(u)}this.priceTxt.label.parent.addChild(c),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,15,40],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(20),o=i(19),a=i(24),r=i(8),h=i(25),l=i(21),c=i(126),u=i(16),d=i(39),p=i(29),f=i(34),y=i(0),g=i(14),m=i(15),v=i(26),b=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),new d.default(this.game,0,null),this.resize()},e.prototype.onMenu=function(){new u.default(this.game,0,v.default.Name)},e.prototype.createButtons=function(){for(var t=0;t<25;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=b},function(t,e,i){"use strict";e.__esModule=!0;var s=function(){function t(){this.brandInstances={},this.brandDomains=[],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"}return t.getInstance=function(){return null===t.instance&&(t.instance=new t),t.instance},t.prototype.checkDomain=function(t){for(var e=0;e.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(22),a=i(20),r=i(14),h=i(15),l=i(8),c=i(16),u=i(4),d=i(0),p=i(28),f=i(17),y=i(36),g=i(21),m=i(2),v=i(23),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._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===25)this.onChooseZone();else{o.default.LevelNum++;var i=n.JSONData.list.indexOf(n.JSONData.Level001),s=o.default.LevelNum;o.default.CurrentLevel=n.JSONData.list[i+s],d.GameData.raceId=s+1,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);-1===e.currCar&&(e.currCar=Math.round(2*Math.random())),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.onMoreGames=function(){window.open(v.default.MOTO1,"_blank")},e.prototype.setNewViewCar=function(){e.currCar++,e.currCar>=2&&(e.currCar=0),null!==this._armatureDisplay&&this._armatureDisplay.destroy();var t="biker"+e.currCar+"_anim_btn";this._armatureDisplay=dragonBones.PhaserFactory.factory.buildArmatureDisplay(t),this._armatureDisplay.x=0,this._armatureDisplay.y=150,this._armatureDisplay.animation.play("animation",0),this.popup.addChild(this._armatureDisplay)},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();this.createPopup(),1!==t&&(u.MaxGameCore.instance.paused=!0,y.default.instance.flipTexts.alpha=0);var i=null,s="GAME PAUSED",h=o.default.LevelNum,l=null;if(1===t){s=h+1<10?"LEVEL 0"+(h+1)+" COMPLETE":"LEVEL "+(h+1)+" COMPLETE",this.setNewViewCar(),l=new r.default(this.game,s,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,s,n.Constants.styleFinish);if(c.anchor.set(.5),l.label.parent.addChildAt(c,0),c.stroke="#FFFFFF",c.strokeThickness=5,2!==e.currCar){var d=null;d=new r.default(this.game,"CHANGE BIKE",n.Constants.styleFinish1,this.onGarage,this,a.default.Garage),d.y=190,d.setFrames("orange_btn_big0000","orange_btn_big0000","orange_btn_big0000","orange_btn_big0000"),d.label.setMaxSize(200,40),d.label.y=-1,d.label.setText("CHANGE BIKE"),d.label.setShadow(1,1,"rgba(0,0,0,0.8)",5),this.popup.getChildAt(1).addChild(d)}y.default.instance.timer.visible=!1}else{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),l=new r.default(this.game,s,n.Constants.stylePause,null,this,a.default.Garage),l.y=-145,l.label.stroke="#000000",l.label.strokeThickness=2;var p=this.game.add.group();this.popup.getChildAt(1).addChild(p),this.setPauseViewCar(p)}l.setFrames("bg0000","bg0000","bg0000","bg0000"),this.popup.getChildAt(1).addChild(l);var g=new r.default(this.game,"",n.Constants.styleCredits1,this.onChooseZone,this,a.default.Garage);g.x=-270,g.y=200,g.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000"),g.scale.set(.8);var m=this.game.add.sprite(0,-11,a.default.Garage,"exit_btn0000");m.anchor.set(.5),g.label.parent.addChild(m),this.popup.getChildAt(1).addChild(g);var v=new r.default(this.game,"",n.Constants.stylePopBtn2,1===t?this.onPlayNextLevel:this.onResume,this,a.default.Garage);v.x=270,v.y=200,v.setFrames("orange_btn0000","orange_btn0000","orange_btn0000","orange_btn0000"),v.scale.set(.8);var b=this.game.add.sprite(0,-7,a.default.Garage,"next_btn0000");if(b.anchor.set(.5),v.label.parent.addChild(b),this.popup.getChildAt(1).addChild(v),1===t){var x=this.game.add.group();this.popup.getChildAt(1).addChild(x),this.postRace(x)}this.resizePopup(1)},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.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(8),o=i(15),a=i(127),r=i(3),h=i(14),l=i(39),c=i(16),u=i(12),d=i(0),p=i(17),f=i(22),y=i(29),g=i(21),m=i(28),v=i(23),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.Level023="map23",t.Level024="map24",t.Level025="map25",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.Car001,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.Level023,t.Level024,t.Level025,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(16),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";e.__esModule=!0;var s=i(0),n=i(32),o=function(){function t(){this.object=null,this.car=null,this.tweening=!1}return t.prototype.setup=function(t,e,i,s){this.maxScale=this.maxScale,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))r=t.SCALE_MULT*this.viewportH/h,l=e+t.CAR_DX/r,c=i-100;else{var u=200,d=o-i+200;d>h&&(h=d),r=t.SCALE_MULT*this.viewportH/h,c=o-.5*h,l=e+t.CAR_DX/r,a=n.CameraPathes.instance.tweened}a&&(this.tweening=!0),this.update(l,c,r,this.tweening)},t.prototype.focusOnCameraZone=function(t,e){var i=s.CameraZone.current,n=i.x,o=i.y;i.move===s.CameraZone.HOR?n=ti.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(8),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.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;0!==n.RacesData.map.settings.theme&&2!==n.RacesData.map.settings.theme||(this.type=o.ObjectTypes.LANDSCAPE_BACK,0===e.indexOf("Dec")&&Number(e.slice(3,e.length))<=7&&(this.type=o.ObjectTypes.FRONT));var i=e.indexOf("_dup");i>=0&&(e=e.substring(0,i));var s=r.AssetsStorage.instance.getByKey(e);if(s){var h=s+"0000";if(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),this.graphic.anchor.set(.5),0===h.indexOf("Sign")&&"SignPillar0000"!==h&&(this.type=o.ObjectTypes.LANDSCAPE),"Dec120000"===h){var l=this.graphic;l.animations.add(e,Phaser.Animation.generateFrameNames(e,0,22,"",4)),l.anchor.set(.5,.7),l.animations.getAnimation(e).play(30,!0)}else if("Dec130000"===h){var l=this.graphic;l.anchor.set(.22142857142857142,.4854771784232365)}else if("Dec140000"===h){var l=this.graphic;l.anchor.set(.7979274611398963,.5563380281690141)}else if("Dec150000"===h){var l=this.graphic;l.anchor.set(.4943820224719101,.023255813953488372)}else if("Dec160000"===h){var l=this.graphic;l.anchor.set(.6333333333333333,.4309623430962343)}else if("Dec290000"===h){var l=this.graphic;l.anchor.set(.453125,.6987951807228916)}else if("Dec300000"===h){var l=this.graphic;l.anchor.set(.6375,1)}else if("Dec310000"===h){var l=this.graphic;l.anchor.set(.5,1)}else if("Dec320000"===h){var l=this.graphic;l.anchor.set(.5,1)}else if("Dec330000"===h){var l=this.graphic;l.anchor.set(.5025641025641026,.5116279069767442)}else if("Dec340000"===h){var l=this.graphic;l.anchor.set(.5,.5)}else if("Dec350000"===h){var l=this.graphic;l.anchor.set(.5,.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||s.indexOf("Bone")>0;if(b){var x="PlankCandy"+Math.floor(e.CANDIES_COUNT*Math.random());this.graphic=l.GraphicUtil.createImageWithObj(f,x)}else this.graphic=l.GraphicUtil.createImageWithObj(f,i.getByKey(s));o.NapeUtil.setupStartPos(this.body),this.body.userData.graphicEx=this.graphic,s.indexOf("Barrel")>=0&&this.body.cbTypes.add(c.CbTypes.BARREL),0===s.indexOf("Removed")&&this.body.cbTypes.add(c.CbTypes.WOOD),(b||0===s.indexOf("Plank"))&&(this.body.userData.isGround=!0,b&&(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.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.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;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.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(23),a=i(16),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),o.default.getInstance().checkDomain(document.URL.split("//")[1].split("/")[0])?this.preloadSplash():this.preloadLock()},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),o.default.getInstance().checkDomain(document.URL.split("//")[1].split("/")[0])?this.createSplash():this.createLock()},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(36),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(){var t=this;["https://cdn.jsdelivr.net/npm/@orange-games/phaser-cachebuster@2.0/build/phaser-cachebuster.min.js","https://cdn.jsdelivr.net/npm/@orange-games/phaser-super-storage@1.0/build/phaser-super-storage.min.js","assets/box2dweb/dragonBones.min.js"].forEach(function(e){t.load.script(e,e)})},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 D=s.getClosestEdge(e,n,y,!0),L=s.getClosestEdge(c,d,y);if(-1===D||-1===L)return 0;for(var k=0;k<2;k++){var F=D,G=L,U=e,N=c,j=i,W=u,X=n,H=d,V=t,Y=o;if(0===k){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,D=E.length;C!==D;C+=2)for(var L=E[C],k=E[C+1],F=0,G=L.shapes.length;F!==G;F++)for(var W=L.shapes[F],X=W.position,H=W.angle,V=0,q=k.shapes.length;V!==q;V++){var z=k.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,L,W,X,H,k,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,D=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,D/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=1580211208607;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&&3!==u&&(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&&3!==u&&(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=3!=u;y&&(f.add(a.backWheel),f.add(a.frontWheel)),a.suspendBack&&f.add(a.suspendBack);var v=!1;return 5===g.Inventory.instance.skin&&(v=!0,a.suspendFront&&f.add(a.suspendFront)),f.add(a.frame),y||(f.add(a.backWheel),f.add(a.frontWheel)),v||a.suspendFront&&f.add(a.suspendFront),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),5===u?(f.add(a.driver.parts[2]),f.add(a.driver.parts[1]),f.add(a.driver.parts[0]),f.add(a.driver.parts[3]),f.add(a.driver.parts[4]),f.add(a.driver.parts[5])):2===u?(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])):(f.add(a.driver.parts[0]),f.add(a.driver.parts[1]),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.geom.Vec2,r=i(0),h=i(1),l=i(37),c=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=h.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.effector=new r.BodyEffector(this.body)},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)},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),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,r){void 0===r&&(r=0);var h=a.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=r,r>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-r,u+r,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 l.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}(r.GameObject);e.DriverPartObject=c},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(19),c=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?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||"Plank0"===i||"PlankBone"===i||"PlankCandy"===i?new o.DynamicBodyObject:0===i.indexOf("VecDec_")?new o.VectorDecor:"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:null},t.prototype.dispose=function(){this.complete.removeAll()},t}();e.RaceBuilder=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=nape.phys.BodyType,o=i(0),a=i(5),r=i(11),h=i(7),l=i(1),c=i(6),u=i(9),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=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(18),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(18),r=i(37),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(31),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=0),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(9),g=i(2),m=i(8),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;if(T||e.graphic){var A=null;if(T?S="pillar_line"+_.toString():1===_?A="CandyPather":S=4===_||5===_||6===_?"road_line9":"road_line"+(_+5).toString(),null==A&&(A=p.AssetsStorage.instance.getByKey(S)),A){var E=u.GraphicUtil.game.add.group();E.inputEnableChildren=!1,f=s.length;var I=[],M=void 0,O=void 0;for(y=0;y=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.graphic.visible=t},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.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(9),d=i(4),p=i(109),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=c.Filters.WATER;this.body=a.NapeUtil.createPolyBody(e,f,y,o.STATIC),this.body.cbTypes.add(l.CbTypes.WATER),3===e.layer&&this.body.cbTypes.add(l.CbTypes.SAW),this.body.align();var g=0,m=0;if(this.body&&(g=-this.body.position.x+i,m=-this.body.position.y+s),0===a.RacesData.map.settings.theme&&(this.bgShape=new p.WaterShape(t,g,m,!0)),this.graphic=new p.WaterShape(t,g,m),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=u.GraphicUtil.createImageWithObj(t.params,p.AssetsStorage.instance.getByKey("Motor"+(t.params.graphic-1).toString())),this.graphicRot=0)}this.snd=!0===t.params.snd,e.dispose()},e.prototype.activate=function(t){void 0===t&&(t=!0),this.active||this.motor&&(this.motor.body2.allowRotation=!0,this.motor.active=t,this.timer=this.time,this.active=!0)},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.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.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-=t,this.timer<=0&&(this.motor.active=!1,e.angularVel=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.restart()},e.prototype.isActive=function(){return!0},e}(r.GameObject);e.MotorObject=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=nape.geom.Vec2,o=nape.phys.Body,a=nape.phys.BodyType,r=nape.shape.Circle,h=i(0),l=i(4),c=i(9),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=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.create=function(t){void 0===t&&(t=null),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),c=null,u=null,d=!0;!s.empty();){var p=s.pop();if(p.isDynamic()){if(null===c)c=p;else if(!0!==c.userData.isPT&&!0===p.userData.isPT)u=c,c=p;else if(null===u){if(u=p,!0===u.userData.isPT)break}else if(!0!==u.userData.isPT&&!0===p.userData.isPT){u=p;break}}else null===u&&(u=p)}if(c){null===u&&(u=this.space.world);var f=c.worldPointToLocal(i),y=u.worldPointToLocal(i);this.pivot=new n(c,u,f,y),this.pivot.ignore=!0,this.pivot.space=this.space,f.dispose(),y.dispose();var g=null===e.graphic?0:e.graphic;if(g>0){var m=l.AssetsStorage.instance,v="Pivot"+(g-1).toString();this.graphic=h.GraphicUtil.createImageWithObj(e,m.getByKey(v)),this.graphic&&(this.isDynamic=!(c.isStatic()||u.isStatic()),this.body2=u)}}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=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(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(9),u=i(8),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(9),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(9),f=i(38),y=i(2),g=i(8),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(9),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.int1.castBody.userData.handler;e&&(e.processDriverGround(),e.processDriverSpikes()),l.NapeUtil.stopBody(t.int1.castBody),t.int1.castBody.allowMovement=t.int1.castBody.allowRotation=!1},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(35),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(20),o=i(19),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(17),o=i(3),a=i(8),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/replit.nix b/replit.nix new file mode 100644 index 0000000..82dea6f --- /dev/null +++ b/replit.nix @@ -0,0 +1,6 @@ +{ pkgs }: { + deps = [ + pkgs.nodePackages.vscode-langservers-extracted + pkgs.nodePackages.typescript-language-server + ]; +} \ No newline at end of file